graal/com.oracle.graal.lir.ptx/src/com/oracle/graal/lir/ptx/PTXControlFlow.java
Print this page
rev 8592 : Graal PTX enhancements
*** 78,83 ****
--- 78,128 ----
public void negate(LabelRef newDestination) {
destination = newDestination;
condition = condition.negate();
}
}
+
+ public static class CondMoveOp extends PTXLIRInstruction {
+ @Def({REG, HINT}) protected Value result;
+ @Alive({REG}) protected Value trueValue;
+ @Use({REG, STACK, CONST}) protected Value falseValue;
+ private final Condition condition;
+
+ public CondMoveOp(Variable result, Condition condition, Variable trueValue, Value falseValue) {
+ this.result = result;
+ this.condition = condition;
+ this.trueValue = trueValue;
+ this.falseValue = falseValue;
+ }
+
+ @Override
+ public void emitCode(TargetMethodAssembler tasm, PTXAssembler masm) {
+ // cmove(tasm, masm, result, false, condition, false, trueValue, falseValue);
+ // see 8.3 Predicated Execution p. 61 of PTX ISA 3.1
+ throw new InternalError("NYI");
+ }
+ }
+
+
+ public static class FloatCondMoveOp extends PTXLIRInstruction {
+ @Def({REG}) protected Value result;
+ @Alive({REG}) protected Value trueValue;
+ @Alive({REG}) protected Value falseValue;
+ private final Condition condition;
+ private final boolean unorderedIsTrue;
+
+ public FloatCondMoveOp(Variable result, Condition condition, boolean unorderedIsTrue, Variable trueValue, Variable falseValue) {
+ this.result = result;
+ this.condition = condition;
+ this.unorderedIsTrue = unorderedIsTrue;
+ this.trueValue = trueValue;
+ this.falseValue = falseValue;
+ }
+
+ @Override
+ public void emitCode(TargetMethodAssembler tasm, PTXAssembler masm) {
+ // cmove(tasm, masm, result, true, condition, unorderedIsTrue, trueValue, falseValue);
+ // see 8.3 Predicated Execution p. 61 of PTX ISA 3.1
+ throw new InternalError("NYI");
+ }
+ }
}