if (match(DCMP, JUMP) || match(FCMP, JUMP)) {
// for float and double
current.condition(current.remove(1), EQ, current.remove(0), node);
} else if (match(LCMP, JUMP)) {
// for long
current.addOperand(new OperandCondition(operateLong("equals"), NE, ZERO, node));
} else {
// others
current.condition(current.remove(0), EQ, ZERO, node);
}
break;
case IFNE: // != 0
if (match(DCMP, JUMP) || match(FCMP, JUMP)) {
// for float and double
current.condition(current.remove(1), NE, current.remove(0), node);
} else if (match(LCMP, JUMP)) {
// for long
current.addOperand(new OperandCondition(operateLong("notEquals"), NE, ZERO, node));
} else {
// others
current.condition(current.remove(0), NE, ZERO, node);
}
break;
case IFGE: // => 0
if (match(DCMP, JUMP) || match(FCMP, JUMP)) {
// for float and double
current.condition(current.remove(1), GE, current.remove(0), node);
} else if (match(LCMP, JUMP)) {
// for long
current.addOperand(new OperandCondition(operateLong("greaterThanOrEqual"), NE, ZERO, node));
} else {
// others
current.condition(current.remove(0), GE, ZERO, node);
}
break;
case IFGT: // > 0
if (match(DCMP, JUMP) || match(FCMP, JUMP)) {
// for float and double
current.condition(current.remove(1), GT, current.remove(0), node);
} else if (match(LCMP, JUMP)) {
// for long
current.addOperand(new OperandCondition(operateLong("greaterThan"), NE, ZERO, node));
} else {
// others
current.condition(current.remove(0), GT, ZERO, node);
}
break;
case IFLE: // <= 0
if (match(DCMP, JUMP) || match(FCMP, JUMP)) {
// for float and double
current.condition(current.remove(1), LE, current.remove(0), node);
} else if (match(LCMP, JUMP)) {
// for long
current.addOperand(new OperandCondition(operateLong("lessThanOrEqual"), NE, ZERO, node));
} else {
// others
current.condition(current.remove(0), LE, ZERO, node);
}
break;
case IFLT: // < 0
if (match(DCMP, JUMP) || match(FCMP, JUMP)) {
// for float and double
current.condition(current.remove(1), LT, current.remove(0), node);
} else if (match(LCMP, JUMP)) {
// for long
current.addOperand(new OperandCondition(operateLong("lessThan"), NE, ZERO, node));
} else {
// others
current.condition(current.remove(0), LT, ZERO, node);
}
break;