summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Artem Serov <artem.serov@linaro.org> 2016-11-29 13:31:33 +0000
committer Mathieu Chartier <mathieuc@google.com> 2016-11-29 10:39:10 -0800
commit6287c238a56ef32f6614484eb8ec9bcc9b726a8e (patch)
tree092426b7fd3202eb00e5cbe80b18b96fc5ddf0c7 /compiler
parent8662aaaae4b63b02b2762673873b90b433b2eb2d (diff)
ARM: Fix JNI MacroAssembler after VIXL update.
This patch fixes an issue found here: https://android-review.googlesource.com/#/c/307532/ Also re-enables vixl MacroAssembler for arm. Test: export ART_USE_READ_BARRIER=true; export ART_HEAP_POISONING=true; \ m test-art-host Test: export ART_USE_READ_BARRIER=true; export ART_HEAP_POISONING=true; \ m test-art-target Test: dump-oat-boot with ART_USE_READ_BARRIER=true Change-Id: I03e3014fb250791db2d24a0ab1a76ca96384c332
Diffstat (limited to 'compiler')
-rw-r--r--compiler/utils/arm/jni_macro_assembler_arm_vixl.cc4
-rw-r--r--compiler/utils/jni_macro_assembler.cc4
2 files changed, 6 insertions, 2 deletions
diff --git a/compiler/utils/arm/jni_macro_assembler_arm_vixl.cc b/compiler/utils/arm/jni_macro_assembler_arm_vixl.cc
index f20ed0a0d0..fb6f172cb0 100644
--- a/compiler/utils/arm/jni_macro_assembler_arm_vixl.cc
+++ b/compiler/utils/arm/jni_macro_assembler_arm_vixl.cc
@@ -564,6 +564,8 @@ void ArmVIXLJNIMacroAssembler::CallFromThread(ThreadOffset32 offset ATTRIBUTE_UN
}
void ArmVIXLJNIMacroAssembler::GetCurrentThread(ManagedRegister mtr) {
+ UseScratchRegisterScope temps(asm_.GetVIXLAssembler());
+ temps.Exclude(mtr.AsArm().AsVIXLRegister());
___ Mov(mtr.AsArm().AsVIXLRegister(), tr);
}
@@ -608,6 +610,8 @@ void ArmVIXLJNIMacroAssembler::Jump(JNIMacroLabel* label,
ManagedRegister test) {
CHECK(label != nullptr);
+ UseScratchRegisterScope temps(asm_.GetVIXLAssembler());
+ temps.Exclude(test.AsArm().AsVIXLRegister());
switch (condition) {
case JNIMacroUnaryCondition::kZero:
___ CompareAndBranchIfZero(test.AsArm().AsVIXLRegister(),
diff --git a/compiler/utils/jni_macro_assembler.cc b/compiler/utils/jni_macro_assembler.cc
index 1b743134ed..2f154fb862 100644
--- a/compiler/utils/jni_macro_assembler.cc
+++ b/compiler/utils/jni_macro_assembler.cc
@@ -20,7 +20,7 @@
#include <vector>
#ifdef ART_ENABLE_CODEGEN_arm
-#include "arm/jni_macro_assembler_arm.h"
+#include "arm/jni_macro_assembler_arm_vixl.h"
#endif
#ifdef ART_ENABLE_CODEGEN_arm64
#include "arm64/jni_macro_assembler_arm64.h"
@@ -58,7 +58,7 @@ MacroAsm32UniquePtr JNIMacroAssembler<PointerSize::k32>::Create(
#ifdef ART_ENABLE_CODEGEN_arm
case kArm:
case kThumb2:
- return MacroAsm32UniquePtr(new (arena) arm::ArmJNIMacroAssembler(arena, instruction_set));
+ return MacroAsm32UniquePtr(new (arena) arm::ArmVIXLJNIMacroAssembler(arena));
#endif
#ifdef ART_ENABLE_CODEGEN_mips
case kMips: