/** * Compare floats or doubles. This stores -1 in {@code target} if {@code * a < b}, 0 in {@code target} if {@code a == b} and 1 in target if {@code * a > b}. This stores {@code nanValue} in {@code target} if either value * is {@code NaN}. */ public <T extends Number> void compareFloatingPoint( Local<Integer> target, Local<T> a, Local<T> b, int nanValue) { Rop rop; if (nanValue == 1) { rop = Rops.opCmpg(a.type.ropType); } else if (nanValue == -1) { rop = Rops.opCmpl(a.type.ropType); } else { throw new IllegalArgumentException("expected 1 or -1 but was " + nanValue); } addInstruction(new PlainInsn(rop, sourcePosition, target.spec(), RegisterSpecList.make(a.spec(), b.spec()))); }
/** * Compare floats or doubles. This stores -1 in {@code target} if {@code a < b}, 0 in {@code target} if {@code a == b} and 1 in target if {@code a > b}. This stores {@code nanValue} in {@code target} if either value is {@code NaN}. */ public <T extends Number> void compareFloatingPoint(Local<Integer> target, Local<T> a, Local<T> b, int nanValue) { Rop rop; if (nanValue == 1) { rop = Rops.opCmpg(a.type.ropType); } else if (nanValue == -1) { rop = Rops.opCmpl(a.type.ropType); } else { throw new IllegalArgumentException("expected 1 or -1 but was " + nanValue); } addInstruction(new PlainInsn(rop, sourcePosition, target.spec(), RegisterSpecList.make(a.spec(), b.spec()))); }
/** * Compare floats or doubles. */ public <T extends Number> void compare(Local<T> a, Local<T> b, Local<Integer> target, int nanValue) { Rop rop; if (nanValue == 1) { rop = Rops.opCmpg(a.type.ropType); } else if (nanValue == -1) { rop = Rops.opCmpl(a.type.ropType); } else { throw new IllegalArgumentException("expected 1 or -1 but was " + nanValue); } addInstruction(new PlainInsn(rop, sourcePosition, target.spec(), RegisterSpecList.make(a.spec(), b.spec()))); }
/** * Compare floats or doubles. This stores -1 in {@code target} if {@code * a < b}, 0 in {@code target} if {@code a == b} and 1 in target if {@code * a > b}. This stores {@code nanValue} in {@code target} if either value * is {@code NaN}. */ public <T extends Number> void compareFloatingPoint( Local<Integer> target, Local<T> a, Local<T> b, int nanValue) { Rop rop; if (nanValue == 1) { rop = Rops.opCmpg(a.type.ropType); } else if (nanValue == -1) { rop = Rops.opCmpl(a.type.ropType); } else { throw new IllegalArgumentException("expected 1 or -1 but was " + nanValue); } addInstruction(new PlainInsn(rop, sourcePosition, target.spec(), RegisterSpecList.make(a.spec(), b.spec()))); }
case RegOps.NOT: return opNot(dest); case RegOps.CMPL: return opCmpl(sources.getType(0)); case RegOps.CMPG: return opCmpg(sources.getType(0)); case RegOps.CONV: return opConv(dest, sources.getType(0)); case RegOps.TO_BYTE: return TO_BYTE;
case RegOps.NOT: return opNot(dest); case RegOps.CMPL: return opCmpl(sources.getType(0)); case RegOps.CMPG: return opCmpg(sources.getType(0)); case RegOps.CONV: return opConv(dest, sources.getType(0)); case RegOps.TO_BYTE: return TO_BYTE;
case RegOps.NOT: return opNot(dest); case RegOps.CMPL: return opCmpl(sources.getType(0)); case RegOps.CMPG: return opCmpg(sources.getType(0)); case RegOps.CONV: return opConv(dest, sources.getType(0)); case RegOps.TO_BYTE: return TO_BYTE;
case RegOps.NOT: return opNot(dest); case RegOps.CMPL: return opCmpl(sources.getType(0)); case RegOps.CMPG: return opCmpg(sources.getType(0)); case RegOps.CONV: return opConv(dest, sources.getType(0)); case RegOps.TO_BYTE: return TO_BYTE;
case RegOps.NOT: return opNot(dest); case RegOps.CMPL: return opCmpl(sources.getType(0)); case RegOps.CMPG: return opCmpg(sources.getType(0)); case RegOps.CONV: return opConv(dest, sources.getType(0)); case RegOps.TO_BYTE: return TO_BYTE;
case RegOps.NOT: return opNot(dest); case RegOps.CMPL: return opCmpl(sources.getType(0)); case RegOps.CMPG: return opCmpg(sources.getType(0)); case RegOps.CONV: return opConv(dest, sources.getType(0)); case RegOps.TO_BYTE: return TO_BYTE;
case RegOps.NOT: return opNot(dest); case RegOps.CMPL: return opCmpl(sources.getType(0)); case RegOps.CMPG: return opCmpg(sources.getType(0)); case RegOps.CONV: return opConv(dest, sources.getType(0)); case RegOps.TO_BYTE: return TO_BYTE;
case RegOps.NOT: return opNot(dest); case RegOps.CMPL: return opCmpl(sources.getType(0)); case RegOps.CMPG: return opCmpg(sources.getType(0)); case RegOps.CONV: return opConv(dest, sources.getType(0)); case RegOps.TO_BYTE: return TO_BYTE;