src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/vector/AMD64VectorBinary.java
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/vector/AMD64VectorBinary.java Thu Nov 14 11:16:14 2019 -0800
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/vector/AMD64VectorBinary.java Thu Nov 14 12:21:00 2019 -0800
@@ -40,7 +40,6 @@
import org.graalvm.compiler.lir.LIRInstructionClass;
import org.graalvm.compiler.lir.Opcode;
import org.graalvm.compiler.lir.amd64.AMD64AddressValue;
-import org.graalvm.compiler.lir.amd64.AMD64LIRInstruction;
import org.graalvm.compiler.lir.asm.CompilationResultBuilder;
import jdk.vm.ci.amd64.AMD64Kind;
@@ -48,20 +47,18 @@
public class AMD64VectorBinary {
- public static final class AVXBinaryOp extends AMD64LIRInstruction {
+ public static final class AVXBinaryOp extends AMD64VectorInstruction {
public static final LIRInstructionClass<AVXBinaryOp> TYPE = LIRInstructionClass.create(AVXBinaryOp.class);
@Opcode private final VexRVMOp opcode;
- private final AVXKind.AVXSize size;
@Def({REG}) protected AllocatableValue result;
@Use({REG}) protected AllocatableValue x;
@Use({REG, STACK}) protected AllocatableValue y;
public AVXBinaryOp(VexRVMOp opcode, AVXKind.AVXSize size, AllocatableValue result, AllocatableValue x, AllocatableValue y) {
- super(TYPE);
+ super(TYPE, size);
this.opcode = opcode;
- this.size = size;
this.result = result;
this.x = x;
this.y = y;
@@ -77,22 +74,20 @@
}
}
- public static final class AVXBinaryConstOp extends AMD64LIRInstruction {
+ public static final class AVXBinaryConstOp extends AMD64VectorInstruction {
public static final LIRInstructionClass<AVXBinaryConstOp> TYPE = LIRInstructionClass.create(AVXBinaryConstOp.class);
@Opcode private final VexRRIOp opcode;
- private final AVXKind.AVXSize size;
@Def({REG}) protected AllocatableValue result;
@Use({REG}) protected AllocatableValue x;
protected int y;
public AVXBinaryConstOp(VexRRIOp opcode, AVXKind.AVXSize size, AllocatableValue result, AllocatableValue x, int y) {
- super(TYPE);
+ super(TYPE, size);
assert (y & 0xFF) == y;
this.opcode = opcode;
- this.size = size;
this.result = result;
this.x = x;
this.y = y;
@@ -104,22 +99,20 @@
}
}
- public static final class AVXBinaryConstFloatOp extends AMD64LIRInstruction {
+ public static final class AVXBinaryConstFloatOp extends AMD64VectorInstruction {
public static final LIRInstructionClass<AVXBinaryConstFloatOp> TYPE = LIRInstructionClass.create(AVXBinaryConstFloatOp.class);
@Opcode private final VexRVMOp opcode;
- private final AVXKind.AVXSize size;
@Def({REG}) protected AllocatableValue result;
@Use({REG}) protected AllocatableValue x;
protected ConstantValue y;
public AVXBinaryConstFloatOp(VexRVMOp opcode, AVXKind.AVXSize size, AllocatableValue result, AllocatableValue x, ConstantValue y) {
- super(TYPE);
+ super(TYPE, size);
assert y.getPlatformKind() == AMD64Kind.SINGLE || y.getPlatformKind() == AMD64Kind.DOUBLE;
this.opcode = opcode;
- this.size = size;
this.result = result;
this.x = x;
this.y = y;
@@ -136,11 +129,10 @@
}
}
- public static final class AVXBinaryMemoryOp extends AMD64LIRInstruction {
+ public static final class AVXBinaryMemoryOp extends AMD64VectorInstruction {
public static final LIRInstructionClass<AVXBinaryMemoryOp> TYPE = LIRInstructionClass.create(AVXBinaryMemoryOp.class);
@Opcode private final VexRVMOp opcode;
- private final AVXKind.AVXSize size;
@Def({REG}) protected AllocatableValue result;
@Use({REG}) protected AllocatableValue x;
@@ -148,9 +140,8 @@
@State protected LIRFrameState state;
public AVXBinaryMemoryOp(VexRVMOp opcode, AVXKind.AVXSize size, AllocatableValue result, AllocatableValue x, AMD64AddressValue y, LIRFrameState state) {
- super(TYPE);
+ super(TYPE, size);
this.opcode = opcode;
- this.size = size;
this.result = result;
this.x = x;
this.y = y;