Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit615397eb2c179787e23867e86907113d7c169c88 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-10-04 08:36:11 +0300
Committer
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-10-05 22:13:47 +0300
Filescb502d0a3ffdf0d2c2d900f7669719bc80a6f6e5
IPL-615397eb2c179787e23867e86907113d7c169c88.tar
IPL-615397eb2c179787e23867e86907113d7c169c88.tar.gz
IPL-615397eb2c179787e23867e86907113d7c169c88.zip
Parentd4758752cb0b76c1a4e87d7e2a211bc5ad53bd0d (diff)
Add 32-bit platforms to projects and CI
3 files changed, 17 insertions, 15 deletions
-rw-r--r--JSImpl/solution/genie.lua1
-rw-r--r--appveyor.yml6
-rw-r--r--spasm/src/value.hpp25
diff --git a/JSImpl/solution/genie.lua b/JSImpl/solution/genie.lua
index aa5889d..247f72d 100644
--- a/JSImpl/solution/genie.lua
+++ b/JSImpl/solution/genie.lua
@@ -1,6 +1,5 @@
solution 'JSImpl'
configurations {'Debug', 'Release'}
- platforms { 'x64' }
flags {
'FatalWarnings',
'ExtraWarnings',
diff --git a/appveyor.yml b/appveyor.yml
index 87783ea..641cbca 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -13,6 +13,10 @@ configuration:
- Debug
- Release
+platform:
+ - x86
+ - x64
+
build:
project: JSImpl/solution/JSImpl.sln
verbosity: minimal
@@ -24,7 +28,7 @@ for:
only:
- image: Ubuntu
build_script:
- - make -C $APPVEYOR_BUILD_FOLDER/JSImpl/solution -j config=`echo ${CONFIGURATION} | sed -e 'y/DR/dr/'`64
+ - make -C $APPVEYOR_BUILD_FOLDER/JSImpl/solution -j config=`echo ${CONFIGURATION} | sed -e 'y/DR/dr/'``echo ${PLATFORM} | sed -e 's/x86//' | sed -e 's/x64/64/'`
test_script:
- '$APPVEYOR_BUILD_FOLDER/JSImpl/build/bin/$CONFIGURATION/Test'
after_test:
diff --git a/spasm/src/value.hpp b/spasm/src/value.hpp
index d86c0ef..725d48c 100644
--- a/spasm/src/value.hpp
+++ b/spasm/src/value.hpp
@@ -25,39 +25,38 @@ struct Value
explicit Value(double v) { m_value.as_double = v; }
- explicit Value(bool v) : Value(ValueType::Boolean, (size_t)v) {}
+ explicit Value(bool v) : Value(ValueType::Boolean, (uint64_t)v) {}
- Value(ValueType tag, size_t payload)
+ Value(ValueType tag, uint64_t payload)
{
assert(tag != ValueType::Number && "Zero tag is plain double");
assert(!(payload >> 48) && "Use only pointers to the heap.");
m_value.as_pointer.pointer = payload;
- m_value.as_pointer.tag = size_t(tag);
+ m_value.as_pointer.tag = uint64_t(tag);
m_value.as_pointer.nan = 0x1fff;
}
- Value(ValueType tag, void* pointer) : Value(tag, (size_t)pointer) {}
+ Value(ValueType tag, void* pointer) : Value(tag, (uint64_t)pointer) {}
struct NanPointer
{
- size_t pointer : 48;
- size_t tag : 3;
- size_t nan : 13;
+ uint64_t pointer : 48;
+ uint64_t tag : 3;
+ uint64_t nan : 13;
};
struct CheckType
{
- size_t payload : 48;
- size_t check : 16;
+ uint64_t payload : 48;
+ uint64_t check : 16;
};
union {
double as_double;
NanPointer as_pointer;
CheckType to_check;
- size_t as_int64;
+ uint64_t as_int64;
} m_value;
- static_assert(sizeof(size_t) == 8, "unsupported arch");
static_assert(sizeof(double) == 8, "unsupported arch");
bool is_double() const { return m_value.to_check.check <= 0xFFF8; }
@@ -76,7 +75,7 @@ struct Value
void* get_pointer() const
{
- return (void*)(size_t)m_value.as_pointer.pointer;
+ return (void*)(uint64_t)m_value.as_pointer.pointer;
}
bool get_boolean() const
@@ -173,4 +172,4 @@ inline Value operator!=(const Value& lhs, const Value& rhs)
return Value(lhs.get_double() != rhs.get_double());
}
-} // namespace Spasm \ No newline at end of file
+} // namespace Spasm