summaryrefslogtreecommitdiff
path: root/compiler/optimizing/common_arm.h
diff options
context:
space:
mode:
author Anton Kirilov <anton.kirilov@linaro.org> 2016-10-25 18:17:23 +0100
committer Anton Kirilov <anton.kirilov@linaro.org> 2016-11-02 16:49:30 +0000
commite28d9ae520082caece9dc90c87b69f864bf886e5 (patch)
tree34e0fb6cf8081cc298a4db8e69284c5bb93416c7 /compiler/optimizing/common_arm.h
parent77a0e4541a29c26dba21ed8c1ed1c29ef8d0ce4c (diff)
ARM: VIXL32: Implement the functionality needed by intrinsics.
This patch passes: * 004-UnsafeTest Test: ART_USE_VIXL_ARM_BACKEND=true m test-art-host Test: ART_USE_VIXL_ARM_BACKEND=true m test-art-target Change-Id: I7a3cd410411ef3a520d419734a835090097b2aee
Diffstat (limited to 'compiler/optimizing/common_arm.h')
-rw-r--r--compiler/optimizing/common_arm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/common_arm.h b/compiler/optimizing/common_arm.h
index 8c08a9c8b9..13824ad671 100644
--- a/compiler/optimizing/common_arm.h
+++ b/compiler/optimizing/common_arm.h
@@ -135,6 +135,16 @@ inline vixl::aarch32::Register InputRegister(HInstruction* instr) {
return InputRegisterAt(instr, 0);
}
+inline int32_t Int32ConstantFrom(Location location) {
+ HConstant* instr = location.GetConstant();
+ if (instr->IsIntConstant()) {
+ return instr->AsIntConstant()->GetValue();
+ } else {
+ DCHECK(instr->IsNullConstant()) << instr->DebugName();
+ return 0;
+ }
+}
+
inline int64_t Int64ConstantFrom(Location location) {
HConstant* instr = location.GetConstant();
if (instr->IsIntConstant()) {