diff options
| author | 2014-06-24 16:08:12 +0000 | |
|---|---|---|
| committer | 2014-06-23 21:45:06 +0000 | |
| commit | 1528b02c4d5241e785bb680f13de70c355e67429 (patch) | |
| tree | 79eefb2dd1ae2cade357ef5d8367973bd08b0a34 /compiler/optimizing/codegen_test.cc | |
| parent | a76724f4bc4a8d36c6c99243835b8e3ddf1eb2d7 (diff) | |
| parent | 20dfc797dc631bf8d655dcf123f46f13332d3074 (diff) | |
Merge "Add some more instruction support to optimizing compiler."
Diffstat (limited to 'compiler/optimizing/codegen_test.cc')
| -rw-r--r-- | compiler/optimizing/codegen_test.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/optimizing/codegen_test.cc b/compiler/optimizing/codegen_test.cc index c3baf1a7b7..fd534ced1f 100644 --- a/compiler/optimizing/codegen_test.cc +++ b/compiler/optimizing/codegen_test.cc @@ -51,7 +51,12 @@ class InternalCodeAllocator : public CodeAllocator { static void Run(const InternalCodeAllocator& allocator, bool has_result, int32_t expected) { typedef int32_t (*fptr)(); CommonCompilerTest::MakeExecutable(allocator.GetMemory(), allocator.GetSize()); - int32_t result = reinterpret_cast<fptr>(allocator.GetMemory())(); + fptr f = reinterpret_cast<fptr>(allocator.GetMemory()); +#if defined(__arm__) + // For thumb we need the bottom bit set. + f = reinterpret_cast<fptr>(reinterpret_cast<uintptr_t>(f) + 1); +#endif + int32_t result = f(); if (has_result) { CHECK_EQ(result, expected); } |