Chromium Code Reviews| Index: runtime/vm/unit_test.h |
| =================================================================== |
| --- runtime/vm/unit_test.h (revision 34452) |
| +++ runtime/vm/unit_test.h (working copy) |
| @@ -7,6 +7,8 @@ |
| #include "include/dart_api.h" |
| +#include "platform/globals.h" |
| + |
| #include "vm/ast.h" |
| #include "vm/dart.h" |
| #include "vm/globals.h" |
| @@ -130,8 +132,12 @@ |
| } |
| -#if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS) |
| -#if defined(HOST_ARCH_ARM) || defined(HOST_ARCH_MIPS) |
| +#if defined(TARGET_ARCH_ARM) || \ |
| + defined(TARGET_ARCH_MIPS) || \ |
| + defined(TARGET_ARCH_ARM64) |
| +#if defined(HOST_ARCH_ARM) || \ |
| + defined(HOST_ARCH_MIPS) || \ |
| + defined(HOST_ARCH_ARM64) |
| // Running on actual ARM or MIPS hardware, execute code natively. |
| #define EXECUTE_TEST_CODE_INT32(name, entry) reinterpret_cast<name>(entry)() |
| #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \ |
| @@ -144,9 +150,15 @@ |
| reinterpret_cast<name>(entry)(double_arg) |
| #else |
| // Not running on ARM or MIPS hardware, call simulator to execute code. |
| +#if defined(ARCH_IS_64_BIT) |
| #define EXECUTE_TEST_CODE_INT32(name, entry) \ |
| static_cast<int32_t>(Simulator::Current()->Call( \ |
| + bit_cast<int64_t, uword>(entry), 0, 0, 0, 0)) |
| +#else |
| +#define EXECUTE_TEST_CODE_INT32(name, entry) \ |
| + static_cast<int32_t>(Simulator::Current()->Call( \ |
| bit_cast<int32_t, uword>(entry), 0, 0, 0, 0)) |
| +#endif |
| #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \ |
|
regis
2014/04/01 19:52:53
I suppose you will provide 64-bit versions of thes
zra
2014/04/01 20:35:08
Done.
|
| static_cast<int64_t>(Simulator::Current()->Call( \ |
| bit_cast<int32_t, uword>(entry), \ |