From 74234daabb28a4b9c804bf8bf908e7334bd4d400 Mon Sep 17 00:00:00 2001 From: Anton Kirilov Date: Fri, 13 Jan 2017 14:42:47 +0000 Subject: 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 --- compiler/optimizing/common_arm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'compiler/optimizing/common_arm.h') 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 -- cgit v1.2.3-59-g8ed1b