summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/codegen_test.cc
diff options
context:
space:
mode:
authorDave Allison <dallison@google.com>2014-06-16 20:44:29 -0700
committerDave Allison <dallison@google.com>2014-06-24 09:05:27 -0700
commit20dfc797dc631bf8d655dcf123f46f13332d3074 (patch)
treec1d4e4f919d54f39a6d39d9d769ed5a844afb22b /compiler/optimizing/codegen_test.cc
parentcbb0e809c0a4e8a4e8b7f5d3768a1864cfb381bb (diff)
downloadandroid_art-20dfc797dc631bf8d655dcf123f46f13332d3074.tar.gz
android_art-20dfc797dc631bf8d655dcf123f46f13332d3074.tar.bz2
android_art-20dfc797dc631bf8d655dcf123f46f13332d3074.zip
Add some more instruction support to optimizing compiler.
This adds a few more DEX instructions to the optimizing compiler's builder (constants, moves, if_xx, etc). Also: * Changes the codegen for IF_XX instructions to use a condition rather than comparing a value against 0. * Fixes some instructions in the ARM disassembler. * Fixes PushList and PopList in the thumb2 assembler. * Switches the assembler for the optimizing compiler to thumb2 rather than ARM. Change-Id: Iaafcd02243ccc5b03a054ef7a15285b84c06740f
Diffstat (limited to 'compiler/optimizing/codegen_test.cc')
-rw-r--r--compiler/optimizing/codegen_test.cc7
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);
}