bc2ir.appendInstruction(Binary.create(INT_SUB, op0, o1, o2));
bc2ir.appendInstruction(Binary.create(VM.BuildFor32Addr ? INT_SUB : LONG_SUB, op0, o1, o2));
  static boolean generatePolymorphicMagic(OPT_BC2IR bc2ir,                                           OPT_GenerationContext gc,                                           VM_MethodReference meth, VM_Atom methodName) {    VM_TypeReference [] paramTypes = meth.getParameterTypes();    VM_TypeReference resultType = meth.getReturnType();    if (methodName == VM_MagicNames.wordFromInt ||        methodName == VM_MagicNames.wordFromIntZeroExtend ||        methodName == VM_MagicNames.wordFromIntSignExtend) {      OPT_RegisterOperand reg = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popInt()));      bc2ir.push(reg.copyD2U());    } else if (methodName == VM_MagicNames.wordToInt) {      // a no-op without even a type-conversion      OPT_RegisterOperand reg = gc.temps.makeTempInt();      bc2ir.appendInstruction(Move.create(INT_MOVE, reg, bc2ir.popAddress()));      bc2ir.push(reg.copyD2U());    } else if (methodName == VM_MagicNames.wordToLong) {      if (VM.BuildFor32Addr) {        // This is a really crappy implementation.        // The theory is that this magic isn't going to be used anywhere we        // care about performance so we do something stupid here instead of        // making a new IR operator that we have to plumb all the way through the compiler.        OPT_RegisterOperand reg = gc.temps.makeTempInt();        OPT_RegisterOperand lreg = gc.temps.makeTempLong();        bc2ir.appendInstruction(Move.create(INT_MOVE, reg, bc2ir.popAddress()));        bc2ir.appendInstruction(Unary.create(INT_2LONG, lreg, reg.copyD2U()));        bc2ir.appendInstruction(Binary.create(LONG_AND, lreg.copyD2D(), lreg.copyD2U(),                                              new OPT_LongConstantOperand(0x00000000ffffffffL)));        bc2ir.pushDual(lreg.copyD2U());      } else {        // a no-op without even a type-conversion        OPT_RegisterOperand reg = gc.temps.makeTempLong();        bc2ir.appendInstruction(Move.create(LONG_MOVE, reg, bc2ir.popAddress()));        bc2ir.pushDual(reg.copyD2U());      }    } else if (methodName == VM_MagicNames.wordToWord) {      OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.Word);      bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popAddress()));      bc2ir.push(reg.copyD2U());    } else if (methodName == VM_MagicNames.wordToAddress) {      OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.Address);      bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popAddress()));      bc2ir.push(reg.copyD2U());    } else if (methodName == VM_MagicNames.wordToOffset) {      OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.Offset);      bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popAddress()));      bc2ir.push(reg.copyD2U());    } else if (methodName == VM_MagicNames.wordToExtent) {      OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.Extent);      bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popAddress()));      bc2ir.push(reg.copyD2U());    } else if (methodName == VM_MagicNames.wordAdd) {      OPT_Operand o2 = bc2ir.pop();      OPT_Operand o1 = bc2ir.pop();      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Binary.create(INT_ADD, op0, o1, o2));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordSub) {      OPT_Operand o2 = bc2ir.pop();      OPT_Operand o1 = bc2ir.pop();      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Binary.create(INT_SUB, op0, o1, o2));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordDiff) {      OPT_Operand o2 = bc2ir.pop();      OPT_Operand o1 = bc2ir.pop();      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Binary.create(INT_SUB, op0, o1, o2));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordAnd) {      OPT_Operand o2 = bc2ir.pop();      OPT_Operand o1 = bc2ir.pop();      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Binary.create(INT_AND, op0, o1, o2));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordOr) {      OPT_Operand o2 = bc2ir.pop();      OPT_Operand o1 = bc2ir.pop();      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Binary.create(INT_OR, op0, o1, o2));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordXor) {      OPT_Operand o2 = bc2ir.pop();      OPT_Operand o1 = bc2ir.pop();      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Binary.create(INT_XOR, op0, o1, o2));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordNot) {      OPT_Operand o1 = bc2ir.pop();      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Unary.create(INT_NOT, op0, o1));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordZero) {      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Move.create(INT_MOVE, op0, new OPT_AddressConstantOperand(VM_Address.zero())));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordOne) {      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Move.create(INT_MOVE, op0, new OPT_AddressConstantOperand(VM_Address.fromIntZeroExtend(1))));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordMax) {      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Move.create(INT_MOVE, op0, new OPT_AddressConstantOperand(VM_Address.max())));      bc2ir.push(op0.copyD2U());    } else if (methodName == VM_MagicNames.wordIsZero) {      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Move.create(INT_MOVE, op0, new OPT_AddressConstantOperand(VM_Address.zero())));      OPT_ConditionOperand cond = OPT_ConditionOperand.EQUAL();      cmpHelper(bc2ir,gc,cond, op0);    } else if (methodName == VM_MagicNames.wordIsMax) {      OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Move.create(INT_MOVE, op0, new OPT_AddressConstantOperand(VM_Address.max())));      OPT_ConditionOperand cond = OPT_ConditionOperand.EQUAL();      cmpHelper(bc2ir,gc,cond, op0);    } else if (methodName == VM_MagicNames.wordEQ) {      OPT_ConditionOperand cond = OPT_ConditionOperand.EQUAL();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordNE) {      OPT_ConditionOperand cond = OPT_ConditionOperand.NOT_EQUAL();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordLT) {      OPT_ConditionOperand cond = OPT_ConditionOperand.LOWER();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordLE) {      OPT_ConditionOperand cond = OPT_ConditionOperand.LOWER_EQUAL();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordGT) {      OPT_ConditionOperand cond = OPT_ConditionOperand.HIGHER();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordGE) {      OPT_ConditionOperand cond = OPT_ConditionOperand.HIGHER_EQUAL();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordsLT) {      OPT_ConditionOperand cond = OPT_ConditionOperand.LESS();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordsLE) {      OPT_ConditionOperand cond = OPT_ConditionOperand.LESS_EQUAL();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordsGT) {      OPT_ConditionOperand cond = OPT_ConditionOperand.GREATER();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordsGE) {      OPT_ConditionOperand cond = OPT_ConditionOperand.GREATER_EQUAL();      cmpHelper(bc2ir,gc,cond,null);    } else if (methodName == VM_MagicNames.wordLsh) {      OPT_Operand op2 = bc2ir.popInt();      OPT_Operand op1 = bc2ir.popAddress();      OPT_RegisterOperand res = gc.temps.makeTemp(resultType); // VM_TypeReference.Int);      bc2ir.appendInstruction(Binary.create(VM.BuildFor32Addr ? INT_SHL : LONG_SHL, res, op1, op2));      bc2ir.push(res.copyD2U());    } else if (methodName == VM_MagicNames.wordRshl) {      OPT_Operand op2 = bc2ir.popInt();      OPT_Operand op1 = bc2ir.popAddress();      OPT_RegisterOperand res = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Binary.create(VM.BuildFor32Addr ? INT_USHR : LONG_USHR, res, op1, op2));      bc2ir.push(res.copyD2U());    } else if (methodName == VM_MagicNames.wordRsha) {      OPT_Operand op2 = bc2ir.popInt();      OPT_Operand op1 = bc2ir.popAddress();      OPT_RegisterOperand res = gc.temps.makeTemp(resultType);      bc2ir.appendInstruction(Binary.create(VM.BuildFor32Addr ? INT_SHR : LONG_SHR, res, op1, op2));      bc2ir.push(res.copyD2U());    } else {      return false;    }    return true;  }