summaryrefslogtreecommitdiff
path: root/compiler/optimizing/common_arm.h
diff options
context:
space:
mode:
author Anton Kirilov <anton.kirilov@linaro.org> 2017-01-13 14:42:47 +0000
committer Anton Kirilov <anton.kirilov@linaro.org> 2017-02-17 14:59:27 +0000
commit74234daabb28a4b9c804bf8bf908e7334bd4d400 (patch)
tree0b60cb00ab117c1a9a4b92983514962198b548bf /compiler/optimizing/common_arm.h
parenta7e9bfafeb64b1142433a41b05ddc263cadc61e3 (diff)
ARM: Merge data-processing instructions and shifts/(un)signed extensions
This commit mirrors the work that has already been done for ARM64. Test: m test-art-target-run-test-551-checker-shifter-operand Change-Id: Iec8c1563b035f40f0e18dcffde28d91dc21922f8
Diffstat (limited to 'compiler/optimizing/common_arm.h')
-rw-r--r--compiler/optimizing/common_arm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/optimizing/common_arm.h b/compiler/optimizing/common_arm.h
index ecb86875d6..e184745520 100644
--- a/compiler/optimizing/common_arm.h
+++ b/compiler/optimizing/common_arm.h
@@ -17,6 +17,7 @@
#ifndef ART_COMPILER_OPTIMIZING_COMMON_ARM_H_
#define ART_COMPILER_OPTIMIZING_COMMON_ARM_H_
+#include "instruction_simplifier_shared.h"
#include "debug/dwarf/register.h"
#include "locations.h"
#include "nodes.h"
@@ -29,6 +30,9 @@
#pragma GCC diagnostic pop
namespace art {
+
+using helpers::HasShifterOperand;
+
namespace arm {
namespace helpers {
@@ -218,6 +222,14 @@ inline Location LocationFrom(const vixl::aarch32::SRegister& low,
return Location::FpuRegisterPairLocation(low.GetCode(), high.GetCode());
}
+inline bool ShifterOperandSupportsExtension(HInstruction* instruction) {
+ DCHECK(HasShifterOperand(instruction, kArm));
+ // TODO: HAdd applied to the other integral types could make use of
+ // the SXTAB, SXTAH, UXTAB and UXTAH instructions.
+ return instruction->GetType() == Primitive::kPrimLong &&
+ (instruction->IsAdd() || instruction->IsSub());
+}
+
} // namespace helpers
} // namespace arm
} // namespace art