Java Code Examples for com.android.dx.rop.code.Rops#opCmpl()
The following examples show how to use
com.android.dx.rop.code.Rops#opCmpl() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Code.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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()))); }
Example 2
Source File: Code.java From dexmaker with Apache License 2.0 | 5 votes |
/** * 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()))); }