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}.
android/android_framework/dex-maker/src/main/java/com/android/dx/Code.java