summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBen Vanik <ben.vanik@gmail.com>2014-08-23 22:35:08 -0700
committerBen Vanik <ben.vanik@gmail.com>2014-08-23 22:35:08 -0700
commitd242e37d84572aa1fddc9017c205cafa99e3f2e8 (patch)
tree51723c9e1ca2643a1cb9008623074cdf2ab03778 /tools
parent28bae464c27469daa43d16f1e0ef4fca06287dfa (diff)
Running (IVM) tests on osx.
Diffstat (limited to 'tools')
-rw-r--r--tools/alloy-test/test_add.cc2
-rw-r--r--tools/alloy-test/test_vector_add.cc4
-rw-r--r--tools/alloy-test/util.h7
3 files changed, 12 insertions, 1 deletions
diff --git a/tools/alloy-test/test_add.cc b/tools/alloy-test/test_add.cc
index 6805cbfc6..3a6f6146a 100644
--- a/tools/alloy-test/test_add.cc
+++ b/tools/alloy-test/test_add.cc
@@ -9,6 +9,8 @@
#include <tools/alloy-test/util.h>
+#include <cfloat>
+
using namespace alloy;
using namespace alloy::hir;
using namespace alloy::runtime;
diff --git a/tools/alloy-test/test_vector_add.cc b/tools/alloy-test/test_vector_add.cc
index 08a60715d..ed236743a 100644
--- a/tools/alloy-test/test_vector_add.cc
+++ b/tools/alloy-test/test_vector_add.cc
@@ -9,6 +9,8 @@
#include <tools/alloy-test/util.h>
+#include <cfloat>
+
using namespace alloy;
using namespace alloy::hir;
using namespace alloy::runtime;
@@ -262,7 +264,7 @@ TEST_CASE("VECTOR_ADD_F32", "[instr]") {
REQUIRE(result == vec128i(0x7F800000));
});
test.Run([](PPCContext* ctx) {
- ctx->v[4] = vec128f(FLT_MIN);
+ ctx->v[4] = vec128f(-FLT_MIN);
ctx->v[5] = vec128f(-1.0f);
},
[](PPCContext* ctx) {
diff --git a/tools/alloy-test/util.h b/tools/alloy-test/util.h
index 175140f37..e6673dfe5 100644
--- a/tools/alloy-test/util.h
+++ b/tools/alloy-test/util.h
@@ -22,6 +22,9 @@
#include <third_party/catch/single_include/catch.hpp>
+#define ALLOY_TEST_IVM 1
+//#define ALLOY_TEST_X64 1
+
namespace alloy {
namespace test {
@@ -82,6 +85,7 @@ class TestFunction {
memory_size = 16 * 1024 * 1024;
memory.reset(new SimpleMemory(memory_size));
+#if ALLOY_TEST_IVM
{
auto runtime = std::make_unique<Runtime>(memory.get());
auto frontend =
@@ -91,6 +95,8 @@ class TestFunction {
runtime->Initialize(std::move(frontend), std::move(backend));
runtimes.emplace_back(std::move(runtime));
}
+#endif // ALLOY_TEST_IVM
+#ifdef ALLOY_TEST_X64
{
auto runtime = std::make_unique<Runtime>(memory.get());
auto frontend =
@@ -100,6 +106,7 @@ class TestFunction {
runtime->Initialize(std::move(frontend), std::move(backend));
runtimes.emplace_back(std::move(runtime));
}
+#endif // ALLOY_TEST_X64
for (auto& runtime : runtimes) {
auto module = std::make_unique<alloy::runtime::TestModule>(