burs.append(MIR_Binary.create(PPC_ADDIC, R(t), R(one), I(-1))); burs.append(MIR_Binary.create(PPC_SUBFE, R(def), R(t), R(one)));
burs.append(MIR_Binary.create(PPC_ADDIC, R(t), one, I(-1))); burs.append(MIR_Binary.create(PPC_SUBFE, def, R(t), one.copyRO()));
  boolean boolean_cmp_imm(OPT_BURS burs, OPT_Register def, 			  OPT_Register one, 			  int value, OPT_ConditionOperand cmp) {    OPT_Register t1, t = burs.ir.regpool.getInteger(false);    OPT_Register zero = burs.ir.regpool.getPhysicalRegisterSet().getTemp();    boolean convert = true;    switch (cmp.value) {    case OPT_ConditionOperand.EQUAL:      if (value == 0) {	burs.append(MIR_Unary.create(PPC_CNTLZW, R(t), R(one)));       } else {	burs.append(MIR_Binary.create(PPC_SUBFIC, R(t), R(one), I(value)));	burs.append(MIR_Unary.create(PPC_CNTLZW, R(t), R(t)));      }      burs.append(MIR_Binary.create(PPC_SRWI, R(def), R(t), I(5)));      break;    case OPT_ConditionOperand.NOT_EQUAL:      if (value == 0) {	burs.append(MIR_Binary.create(PPC_ADDIC, R(t), R(one), I(-1)));	burs.append(MIR_Binary.create(PPC_SUBFE, R(def), R(t), R(one)));      } else {	t1 = burs.ir.regpool.getInteger(false);	burs.append(MIR_Binary.create(PPC_SUBFIC, R(t1), R(one), I(value)));	burs.append(MIR_Binary.create(PPC_ADDIC, R(t), R(t1), I(-1)));	burs.append(MIR_Binary.create(PPC_SUBFE, R(def), R(t), R(t1)));      }      break;    case OPT_ConditionOperand.LESS:      if (value == 0) {	burs.append(MIR_Binary.create(PPC_SRWI, R(def), R(one), I(31)));      } else if (value > 0) {	burs.append(MIR_Binary.create(PPC_SRWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_SUBFIC, R(zero), R(one), 				      I(value - 1)));	burs.append(MIR_Unary.create(PPC_ADDZE, R(def), R(t)));      } else if (value != 0xFFFF8000) {	burs.append(MIR_Binary.create(PPC_SRWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_SUBFIC, R(zero), R(one), 				      I(value - 1)));	burs.append(MIR_Unary.create(PPC_ADDME, R(def), R(t)));      } else {                  // value = 0xFFFF8000	burs.append(MIR_Binary.create(PPC_SRWI, R(t), R(one), I(31)));	burs.append(MIR_Unary.create(PPC_LDIS, R(zero), I(1)));	burs.append(MIR_Binary.create(PPC_SUBFC, R(zero), R(one), R(zero)));	burs.append(MIR_Unary.create(PPC_ADDME, R(def), R(t)));      }      break;    case OPT_ConditionOperand.GREATER:      if (value == 0) {	burs.append(MIR_Unary.create(PPC_NEG, R(t), R(one)));	burs.append(MIR_Binary.create(PPC_ANDC, R(t), R(t), R(one)));	burs.append(MIR_Binary.create(PPC_SRWI, R(def), R(t), I(31)));      } else if (value >= 0) {	burs.append(MIR_Binary.create(PPC_SRAWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_ADDIC, R(zero), R(one), 				      I(-value - 1)));	burs.append(MIR_Unary.create(PPC_ADDZE, R(def), R(t)));      } else {	t1 = burs.ir.regpool.getInteger(false);	burs.append(MIR_Unary.create(PPC_LDI, R(t1), I(1)));	burs.append(MIR_Binary.create(PPC_SRAWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_ADDIC, R(zero), R(one), 				      I(-value - 1)));	burs.append(MIR_Binary.create(PPC_ADDE, R(def), R(t), R(t1)));      }      break;    case OPT_ConditionOperand.LESS_EQUAL:      if (value == 0) {	burs.append(MIR_Binary.create(PPC_ADDI, R(t), R(one), I(-1)));	burs.append(MIR_Binary.create(PPC_OR, R(t), R(t), R(one)));	burs.append(MIR_Binary.create(PPC_SRWI, R(def), R(t), I(31)));      } else if (value >= 0) {	burs.append(MIR_Binary.create(PPC_SRWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_SUBFIC, R(zero), R(one), I(value)));	burs.append(MIR_Unary.create(PPC_ADDZE, R(def), R(t)));      } else {	burs.append(MIR_Binary.create(PPC_SRWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_SUBFIC, R(zero), R(one), I(value)));	burs.append(MIR_Unary.create(PPC_ADDME, R(def), R(t)));      }      break;    case OPT_ConditionOperand.GREATER_EQUAL:      if (value == 0) {	burs.append(MIR_Binary.create(PPC_SRWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_XORI, R(def), R(t), I(1)));      } else if (value >= 0) {	burs.append(MIR_Binary.create(PPC_SRAWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_ADDIC, R(zero), R(one), I(-value)));	burs.append(MIR_Unary.create(PPC_ADDZE, R(def), R(t)));      } else if (value != 0xFFFF8000) {	t1 = burs.ir.regpool.getInteger(false);	burs.append(MIR_Unary.create(PPC_LDI, R(t1), I(1)));	burs.append(MIR_Binary.create(PPC_SRAWI, R(t), R(one), I(31)));	burs.append(MIR_Binary.create(PPC_ADDIC, R(zero), R(one), I(-value)));	burs.append(MIR_Binary.create(PPC_ADDE, R(def), R(t), R(t1)));      } else {	t1 = burs.ir.regpool.getInteger(false);	burs.append(MIR_Unary.create(PPC_LDI, R(t1), I(1)));	burs.append(MIR_Binary.create(PPC_SRAWI, R(t), R(one), I(31)));	burs.append(MIR_Unary.create(PPC_LDIS, R(zero), I(1)));	burs.append(MIR_Binary.create(PPC_ADDC, R(zero), R(one), R(zero)));	burs.append(MIR_Binary.create(PPC_ADDE, R(def), R(t), R(t1)));      }      break;    case OPT_ConditionOperand.HIGHER:      return false; // todo    case OPT_ConditionOperand.LOWER:      return false; // todo    case OPT_ConditionOperand.HIGHER_EQUAL:      return false; // todo    case OPT_ConditionOperand.LOWER_EQUAL:      burs.append(MIR_Unary.create(PPC_LDI, R(t), I(-1)));      burs.append(MIR_Binary.create(PPC_SUBFIC, R(zero), R(one), I(value)));      burs.append(MIR_Unary.create(PPC_SUBFZE, R(def), R(t)));      break;    default:      return false;    }    return true;  }