diff options
Diffstat (limited to 'compiler/dex/quick')
| -rw-r--r-- | compiler/dex/quick/arm/int_arm.cc | 8 | ||||
| -rw-r--r-- | compiler/dex/quick/arm64/int_arm64.cc | 8 | ||||
| -rwxr-xr-x | compiler/dex/quick/x86/target_x86.cc | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/compiler/dex/quick/arm/int_arm.cc b/compiler/dex/quick/arm/int_arm.cc index 57544b5187..cab039bfd4 100644 --- a/compiler/dex/quick/arm/int_arm.cc +++ b/compiler/dex/quick/arm/int_arm.cc @@ -16,6 +16,7 @@ /* This file contains codegen for the Thumb2 ISA. */ +#include "arch/instruction_set_features.h" #include "arm_lir.h" #include "codegen_arm.h" #include "dex/quick/mir_to_lir-inl.h" @@ -1119,7 +1120,9 @@ LIR* ArmMir2Lir::OpDecAndBranch(ConditionCode c_code, RegStorage reg, LIR* targe } bool ArmMir2Lir::GenMemBarrier(MemBarrierKind barrier_kind) { -#if ANDROID_SMP != 0 + if (!cu_->GetInstructionSetFeatures()->IsSmp()) { + return false; + } // Start off with using the last LIR as the barrier. If it is not enough, then we will generate one. LIR* barrier = last_lir_insn_; @@ -1149,9 +1152,6 @@ bool ArmMir2Lir::GenMemBarrier(MemBarrierKind barrier_kind) { DCHECK(!barrier->flags.use_def_invalid); barrier->u.m.def_mask = &kEncodeAll; return ret; -#else - return false; -#endif } void ArmMir2Lir::GenNegLong(RegLocation rl_dest, RegLocation rl_src) { diff --git a/compiler/dex/quick/arm64/int_arm64.cc b/compiler/dex/quick/arm64/int_arm64.cc index dfdb76bbab..0e00698388 100644 --- a/compiler/dex/quick/arm64/int_arm64.cc +++ b/compiler/dex/quick/arm64/int_arm64.cc @@ -16,6 +16,7 @@ /* This file contains codegen for the Thumb2 ISA. */ +#include "arch/instruction_set_features.h" #include "arm64_lir.h" #include "codegen_arm64.h" #include "dex/quick/mir_to_lir-inl.h" @@ -978,7 +979,9 @@ LIR* Arm64Mir2Lir::OpDecAndBranch(ConditionCode c_code, RegStorage reg, LIR* tar } bool Arm64Mir2Lir::GenMemBarrier(MemBarrierKind barrier_kind) { -#if ANDROID_SMP != 0 + if (!cu_->GetInstructionSetFeatures()->IsSmp()) { + return false; + } // Start off with using the last LIR as the barrier. If it is not enough, then we will generate one. LIR* barrier = last_lir_insn_; @@ -1014,9 +1017,6 @@ bool Arm64Mir2Lir::GenMemBarrier(MemBarrierKind barrier_kind) { DCHECK(!barrier->flags.use_def_invalid); barrier->u.m.def_mask = &kEncodeAll; return ret; -#else - return false; -#endif } void Arm64Mir2Lir::GenIntToLong(RegLocation rl_dest, RegLocation rl_src) { diff --git a/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc index f5f71132e4..ead31b37b6 100755 --- a/compiler/dex/quick/x86/target_x86.cc +++ b/compiler/dex/quick/x86/target_x86.cc @@ -18,6 +18,7 @@ #include <inttypes.h> #include <string> +#include "arch/instruction_set_features.h" #include "backend_x86.h" #include "codegen_x86.h" #include "dex/compiler_internals.h" @@ -594,7 +595,9 @@ bool X86Mir2Lir::ProvidesFullMemoryBarrier(X86OpCode opcode) { } bool X86Mir2Lir::GenMemBarrier(MemBarrierKind barrier_kind) { -#if ANDROID_SMP != 0 + if (!cu_->GetInstructionSetFeatures()->IsSmp()) { + return false; + } // Start off with using the last LIR as the barrier. If it is not enough, then we will update it. LIR* mem_barrier = last_lir_insn_; @@ -630,9 +633,6 @@ bool X86Mir2Lir::GenMemBarrier(MemBarrierKind barrier_kind) { mem_barrier->u.m.def_mask = &kEncodeAll; } return ret; -#else - return false; -#endif } void X86Mir2Lir::CompilerInitializeRegAlloc() { |