src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Ternary.java
equal
deleted
inserted
replaced
35 import org.graalvm.compiler.asm.amd64.AMD64Assembler.VexRVMOp; |
35 import org.graalvm.compiler.asm.amd64.AMD64Assembler.VexRVMOp; |
36 import org.graalvm.compiler.asm.amd64.AMD64MacroAssembler; |
36 import org.graalvm.compiler.asm.amd64.AMD64MacroAssembler; |
37 import org.graalvm.compiler.asm.amd64.AVXKind.AVXSize; |
37 import org.graalvm.compiler.asm.amd64.AVXKind.AVXSize; |
38 import org.graalvm.compiler.lir.LIRInstructionClass; |
38 import org.graalvm.compiler.lir.LIRInstructionClass; |
39 import org.graalvm.compiler.lir.Opcode; |
39 import org.graalvm.compiler.lir.Opcode; |
|
40 import org.graalvm.compiler.lir.amd64.vector.AMD64VectorInstruction; |
40 import org.graalvm.compiler.lir.asm.CompilationResultBuilder; |
41 import org.graalvm.compiler.lir.asm.CompilationResultBuilder; |
41 |
42 |
42 import jdk.vm.ci.meta.AllocatableValue; |
43 import jdk.vm.ci.meta.AllocatableValue; |
43 |
44 |
44 /** |
45 /** |
47 public class AMD64Ternary { |
48 public class AMD64Ternary { |
48 |
49 |
49 /** |
50 /** |
50 * Instruction that has two {@link AllocatableValue} operands. |
51 * Instruction that has two {@link AllocatableValue} operands. |
51 */ |
52 */ |
52 public static class ThreeOp extends AMD64LIRInstruction { |
53 public static class ThreeOp extends AMD64VectorInstruction { |
53 public static final LIRInstructionClass<ThreeOp> TYPE = LIRInstructionClass.create(ThreeOp.class); |
54 public static final LIRInstructionClass<ThreeOp> TYPE = LIRInstructionClass.create(ThreeOp.class); |
54 |
55 |
55 @Opcode private final VexRVMOp opcode; |
56 @Opcode private final VexRVMOp opcode; |
56 private final AVXSize size; |
|
57 |
57 |
58 @Def({REG, HINT}) protected AllocatableValue result; |
58 @Def({REG, HINT}) protected AllocatableValue result; |
59 @Use({REG}) protected AllocatableValue x; |
59 @Use({REG}) protected AllocatableValue x; |
60 /** |
60 /** |
61 * This argument must be Alive to ensure that result and y are not assigned to the same |
61 * This argument must be Alive to ensure that result and y are not assigned to the same |
63 */ |
63 */ |
64 @Alive({REG}) protected AllocatableValue y; |
64 @Alive({REG}) protected AllocatableValue y; |
65 @Alive({REG, STACK}) protected AllocatableValue z; |
65 @Alive({REG, STACK}) protected AllocatableValue z; |
66 |
66 |
67 public ThreeOp(VexRVMOp opcode, AVXSize size, AllocatableValue result, AllocatableValue x, AllocatableValue y, AllocatableValue z) { |
67 public ThreeOp(VexRVMOp opcode, AVXSize size, AllocatableValue result, AllocatableValue x, AllocatableValue y, AllocatableValue z) { |
68 super(TYPE); |
68 super(TYPE, size); |
69 this.opcode = opcode; |
69 this.opcode = opcode; |
70 this.size = size; |
|
71 |
|
72 this.result = result; |
70 this.result = result; |
73 this.x = x; |
71 this.x = x; |
74 this.y = y; |
72 this.y = y; |
75 this.z = z; |
73 this.z = z; |
76 } |
74 } |