src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java
changeset 52578 7dd81e82d083
parent 50858 2d3e99a72541
child 52910 583fd71c47d6
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java	Thu Nov 15 21:05:47 2018 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java	Thu Nov 15 09:04:07 2018 -0800
@@ -201,6 +201,16 @@
         return result;
     }
 
+    public Value emitAddSubShift(AArch64ArithmeticOp op, Value a, Value b, AArch64MacroAssembler.ShiftType shiftType, int shiftAmount) {
+        assert isNumericInteger(a.getPlatformKind());
+        assert isNumericInteger(b.getPlatformKind());
+        Variable result = getLIRGen().newVariable(LIRKind.combine(a, b));
+        AllocatableValue x = moveSp(asAllocatable(a));
+        AllocatableValue y = moveSp(asAllocatable(b));
+        getLIRGen().append(new AArch64ArithmeticOp.AddSubShiftOp(op, result, x, y, shiftType, shiftAmount));
+        return result;
+    }
+
     private static PlatformKind getFloatConvertResultKind(FloatConvert op) {
         switch (op) {
             case F2I: