VM._assert(false);
  private boolean  generateInlineCode(VM_MethodReference methodToBeCalled) {    VM_Atom methodName = methodToBeCalled.getName();        if (methodToBeCalled.getType() == VM_TypeReference.SysCall) {      VM_TypeReference[] args = methodToBeCalled.getParameterTypes();      // (1) Set up arguments according to OS calling convention      int paramWords = methodToBeCalled.getParameterWords();      int gp = FIRST_OS_PARAMETER_GPR;      int fp = FIRST_OS_PARAMETER_FPR;      int stackHeight = currentStackHeight-paramWords;      for (int i=0; i<args.length; i++) {        VM_TypeReference t = args[i];        if (t.isLongType()) {          if (VM.BuildFor64Addr) {            peekToRegister(LONG_TYPE, stackHeight, gp);            gp++;            } else {            peekToRegister(LONG_TYPE, stackHeight, gp);            gp += 2;          }          stackHeight += 2;        } else if (t.isFloatType()) {          peekToRegister(FLOAT_TYPE, stackHeight, fp++);          stackHeight += 1;        } else if (t.isDoubleType()) {          peekToRegister(DOUBLE_TYPE, stackHeight, fp++);          stackHeight += 2;        } else if (t.isIntLikeType()) {          peekToRegister(WORD_TYPE, stackHeight, gp++);          stackHeight += 1;        } else { // t is object          peekToRegister(OBJECT_TYPE, stackHeight, gp++);          stackHeight += 1;        }      }      currentStackHeight -= paramWords;            if (VM.VerifyAssertions) {        VM._assert(currentStackHeight >= 0);        // Laziness.  We don't support sysCalls with so         // many arguments that we would have to spill some to the stack.        VM._assert(gp - 1 <= LAST_OS_PARAMETER_GPR);        VM._assert(fp - 1 <= LAST_OS_PARAMETER_FPR);      }      // (2) Call it      int paramBytes = paramWords * BYTES_IN_STACKSLOT;      VM_Field ip = VM_Entrypoints.getSysCallField(methodName.toString());      generateSysCall(paramBytes, ip);      // (3) Push return value (if any)      VM_TypeReference rtype = methodToBeCalled.getReturnType();      if (rtype.isIntLikeType()) {        pushFromRegister(WORD_TYPE, T0);      } else if (rtype.isWordType() || rtype.isReferenceType()) {        pushFromRegister(OBJECT_TYPE, T0);       } else if (rtype.isDoubleType()) {        pushFromRegister(DOUBLE_TYPE, FIRST_OS_PARAMETER_FPR);      } else if (rtype.isFloatType()) {        pushFromRegister(FLOAT_TYPE, FIRST_OS_PARAMETER_FPR);      } else if (rtype.isLongType()) {        pushFromRegister(LONG_TYPE, T0);      }      return true;    }    if (methodToBeCalled.getType() == VM_TypeReference.Address) {      // Address.xyz magic      VM_TypeReference[] types = methodToBeCalled.getParameterTypes();      // Loads all take the form:      // ..., Address, [Offset] -> ..., Value      if (methodName == VM_MagicNames.loadAddress ||          methodName == VM_MagicNames.loadObjectReference ||          methodName == VM_MagicNames.loadWord) {        if (types.length == 0) {          popToRegister(OBJECT_TYPE, T0);                  // pop base           asm.emitLAddr(T0,  0, T0);    // *(base)          pushFromRegister(OBJECT_TYPE, T0);                 // push *(base)        } else {          popToRegister(WORD_TYPE, T1);                   // pop offset          popToRegister(OBJECT_TYPE, T0);                  // pop base           asm.emitLAddrX(T0, T1, T0);   // *(base+offset)          pushFromRegister(OBJECT_TYPE, T0);                 // push *(base+offset)        }        return true;      }      if (methodName == VM_MagicNames.loadChar ||          methodName == VM_MagicNames.loadShort) {        if (types.length == 0) {          popToRegister(OBJECT_TYPE, T0);                  // pop base          asm.emitLHZ(T0, 0, T0);       // load with zero extension.          pushFromRegister(WORD_TYPE, T0);                  // push *(base)         } else {          popToRegister(WORD_TYPE, T1);                   // pop offset          popToRegister(OBJECT_TYPE, T0);                  // pop base          asm.emitLHZX(T0, T1, T0);     // load with zero extension.          pushFromRegister(WORD_TYPE, T0);                  // push *(base+offset)         }        return true;      }      if (methodName == VM_MagicNames.loadByte) {        if (types.length == 0) {          popToRegister(OBJECT_TYPE, T0);                  // pop base          asm.emitLBZ(T0, 0, T0);       // load with zero extension.          pushFromRegister(WORD_TYPE, T0);                  // push *(base)         } else {          popToRegister(WORD_TYPE, T1);                   // pop offset          popToRegister(OBJECT_TYPE, T0);                  // pop base          asm.emitLBZX(T0, T1, T0);     // load with zero extension.          pushFromRegister(WORD_TYPE, T0);                  // push *(base+offset)         }        return true;      }      if (methodName == VM_MagicNames.loadInt ||          methodName == VM_MagicNames.loadFloat) {        if (types.length == 0) {          popToRegister(OBJECT_TYPE, T0);                  // pop base           asm.emitLInt(T0,  0, T0);     // *(base)          pushFromRegister(WORD_TYPE, T0);                  // push *(base)        } else {          popToRegister(WORD_TYPE, T1);                   // pop offset          popToRegister(OBJECT_TYPE, T0);                  // pop base           asm.emitLIntX(T0, T1, T0);    // *(base+offset)          pushFromRegister(WORD_TYPE, T0);                  // push *(base+offset)        }        return true;      }      if (methodName == VM_MagicNames.loadDouble ||          methodName == VM_MagicNames.loadLong) {        if (types.length == 0) {          popToRegister(OBJECT_TYPE, T1);                  // pop base           asm.emitLFD (F0, 0, T1);      // *(base)          pushFromRegister(DOUBLE_TYPE, F0);               // push double        } else {                 popToRegister(WORD_TYPE, T2);                   // pop offset           popToRegister(OBJECT_TYPE, T1);                  // pop base           asm.emitLFDX (F0, T1, T2);    // *(base+offset)          pushFromRegister(DOUBLE_TYPE, F0);               // push *(base+offset)        }        return true;      }            // Prepares all take the form:      // ..., Address, [Offset] -> ..., Value      if (methodName == VM_MagicNames.prepareInt) {        if (types.length == 0) {          popToRegister(OBJECT_TYPE, T0);                             // pop base           asm.emitLWARX(T0, 0, T0);                // *(base), setting reservation address          // this Integer is not sign extended !!          pushFromRegister(WORD_TYPE, T0);                             // push *(base+offset)        } else {          popToRegister(WORD_TYPE, T1);                              // pop offset          popToRegister(OBJECT_TYPE, T0);                             // pop base           asm.emitLWARX(T0,  T1, T0);              // *(base+offset), setting reservation address          // this Integer is not sign extended !!          pushFromRegister(WORD_TYPE, T0);                             // push *(base+offset)        }        return true;      }      if (methodName == VM_MagicNames.prepareWord ||           methodName == VM_MagicNames.prepareObjectReference ||          methodName == VM_MagicNames.prepareAddress) {        if (types.length == 0) {          popToRegister(OBJECT_TYPE, T0);                             // pop base          if (VM.BuildFor32Addr) {            asm.emitLWARX(T0, 0, T0);            // *(base+offset), setting           } else {                               // reservation address            asm.emitLDARX(T0, 0, T0);          }          pushFromRegister(OBJECT_TYPE, T0);                            // push *(base+offset)        } else {          popToRegister(WORD_TYPE, T1);                              // pop offset          popToRegister(OBJECT_TYPE, T0);                             // pop base          if (VM.BuildFor32Addr) {            asm.emitLWARX(T0,  T1, T0);          // *(base+offset), setting           } else {                               // reservation address            asm.emitLDARX(T0, T1, T0);          }          pushFromRegister(OBJECT_TYPE, T0);                            // push *(base+offset)        }        return true;        }       // Attempts all take the form:      // ..., Address, OldVal, NewVal, [Offset] -> ..., Success?      if (methodName == VM_MagicNames.attempt &&           types[0] == VM_TypeReference.Int) {        if (types.length == 2) {           popToRegister(WORD_TYPE, T2);                            // pop newValue                           pop(WORD_TYPE);                         // ignore oldValue                      popToRegister(OBJECT_TYPE, T0);                           // pop base           asm.emitSTWCXr(T2,  0, T0);            // store new value and set CR0          asm.emitLVAL(T0,  0);                  // T0 := false          VM_ForwardReference fr = asm.emitForwardBC(NE);             // skip, if store failed          asm.emitLVAL(T0,  1);                  // T0 := true          fr.resolve(asm);          pushFromRegister(WORD_TYPE, T0);                           // push success of store        } else {          popToRegister(WORD_TYPE, T1);                            // pop offset          popToRegister(WORD_TYPE, T2);                            // pop newValue                           pop(WORD_TYPE);                         // ignore oldValue                      popToRegister(OBJECT_TYPE, T0);                           // pop base           asm.emitSTWCXr(T2,  T1, T0);           // store new value and set CR0          asm.emitLVAL(T0,  0);                  // T0 := false          VM_ForwardReference fr = asm.emitForwardBC(NE);             // skip, if store failed          asm.emitLVAL(T0,  1);                  // T0 := true          fr.resolve(asm);          pushFromRegister(WORD_TYPE, T0);                           // push success of store        }        return true;      }      if (methodName == VM_MagicNames.attempt &&          (types[0] == VM_TypeReference.Address ||           types[0] == VM_TypeReference.Word)) {        if (types.length == 2) {          popToRegister(OBJECT_TYPE, T2);                             // pop newValue          pop(WORD_TYPE);                           // ignore oldValue          popToRegister(OBJECT_TYPE, T0);                             // pop base           if (VM.BuildFor32Addr) {            asm.emitSTWCXr(T2,  0, T0);          // store new value and set CR0          } else {             asm.emitSTDCXr(T2,  0, T0);          // store new value and set CR0          }          asm.emitLVAL(T0, 0);                   // T0 := false          VM_ForwardReference fr = asm.emitForwardBC(NE);  // skip, if store failed          asm.emitLVAL(T0, 1);                   // T0 := true          fr.resolve(asm);            pushFromRegister(WORD_TYPE, T0);                           // push success of store        } else {          popToRegister(WORD_TYPE, T1);                              // pop offset          popToRegister(OBJECT_TYPE, T2);                             // pop newValue          pop(WORD_TYPE);                           // ignore oldValue          popToRegister(OBJECT_TYPE, T0);                             // pop base           if (VM.BuildFor32Addr) {            asm.emitSTWCXr(T2,  T1, T0);         // store new value and set CR0          } else {            asm.emitSTDCXr(T2,  T1, T0);         // store new value and set CR0          }          asm.emitLVAL(T0, 0);                   // T0 := false          VM_ForwardReference fr = asm.emitForwardBC(NE);             // skip, if store failed          asm.emitLVAL(T0, 1);                   // T0 := true          fr.resolve(asm);            pushFromRegister(WORD_TYPE, T0);                           // push success of store        }        return true;      }      // Stores all take the form:      // ..., Address, Value, [Offset] -> ...      if (methodName == VM_MagicNames.store) {        if(types[0] == VM_TypeReference.Word ||           types[0] == VM_TypeReference.ObjectReference ||           types[0] == VM_TypeReference.Address) {          if (types.length == 1) {            popToRegister(OBJECT_TYPE, T1);                 // pop newvalue            popToRegister(OBJECT_TYPE, T0);                 // pop base             asm.emitSTAddrX(T1, 0, T0);   // *(base) = newvalue          } else {            popToRegister(WORD_TYPE, T1);                  // pop offset            popToRegister(OBJECT_TYPE, T2);                 // pop newvalue            popToRegister(OBJECT_TYPE, T0);                 // pop base             asm.emitSTAddrX(T2, T1, T0); // *(base+offset) = newvalue          }          return true;        }        if(types[0] == VM_TypeReference.Byte) {          if (types.length == 1) {            popToRegister(WORD_TYPE, T1);                  // pop newvalue            popToRegister(OBJECT_TYPE, T0);                 // pop base             asm.emitSTBX(T1, 0, T0);      // *(base) = newvalue          } else {            popToRegister(WORD_TYPE, T1);                  // pop offset            popToRegister(WORD_TYPE, T2);                  // pop newvalue            popToRegister(OBJECT_TYPE, T0);                 // pop base             asm.emitSTBX(T2, T1, T0);    // *(base+offset) = newvalue          }          return true;        }        if(types[0] == VM_TypeReference.Int ||           types[0] == VM_TypeReference.Float) {          if (types.length == 1) {            popToRegister(WORD_TYPE, T1);                  // pop newvalue            popToRegister(OBJECT_TYPE, T0);                 // pop base             asm.emitSTWX(T1, 0, T0);      // *(base+offset) = newvalue          } else {            popToRegister(WORD_TYPE, T1);                  // pop offset            popToRegister(WORD_TYPE, T2);                  // pop newvalue            popToRegister(OBJECT_TYPE, T0);                 // pop base             asm.emitSTWX(T2, T1, T0);    // *(base+offset) = newvalue          }          return true;        }        if(types[0] == VM_TypeReference.Short ||           types[0] == VM_TypeReference.Char) {          if (types.length == 1) {            popToRegister(WORD_TYPE, T1);                  // pop newvalue            popToRegister(OBJECT_TYPE, T0);                 // pop base             asm.emitSTHX(T1, 0, T0);      // *(base) = newvalue          } else {            popToRegister(WORD_TYPE, T1);                  // pop offset            popToRegister(WORD_TYPE, T2);                  // pop newvalue            popToRegister(OBJECT_TYPE, T0);                 // pop base             asm.emitSTHX(T2, T1, T0);    // *(base+offset) = newvalue          }          return true;        }        if(types[0] == VM_TypeReference.Double ||          types[0] == VM_TypeReference.Long) {          if (types.length == 1) {            popToRegister(LONG_TYPE, T1);                      // pop newvalue low and high            popToRegister(OBJECT_TYPE, T0);                          // pop base             if (VM.BuildFor32Addr) {              asm.emitSTWX(T2, 0, T0);             // *(base) = newvalue low              asm.emitSTWX(T1, BYTES_IN_INT, T0);  // *(base+4) = newvalue high            } else {              asm.emitSTDX(T1, 0, T0);           // *(base) = newvalue             }          } else {            popToRegister(WORD_TYPE, T1);                           // pop offset            popToRegister(LONG_TYPE, T2);                      // pop newvalue low and high            popToRegister(OBJECT_TYPE, T0);                          // pop base             if (VM.BuildFor32Addr) {              asm.emitSTWX(T3, T1, T0);           // *(base+offset) = newvalue low              asm.emitADDI(T1, BYTES_IN_INT, T1); // offset += 4              asm.emitSTWX(T2, T1, T0);           // *(base+offset) = newvalue high            } else {              asm.emitSTDX(T2, T1, T0);           // *(base+offset) = newvalue             }          }          return true;        }      }    }    if (methodName == VM_MagicNames.getFramePointer) {      pushFromRegister(OBJECT_TYPE, FP);     } else if (methodName == VM_MagicNames.getCallerFramePointer) {      popToRegister(OBJECT_TYPE, T0);                               // pop  frame pointer of callee frame      asm.emitLAddr(T1, STACKFRAME_FRAME_POINTER_OFFSET, T0); // load frame pointer of caller frame      pushFromRegister(OBJECT_TYPE, T1);                               // push frame pointer of caller frame    } else if (methodName == VM_MagicNames.setCallerFramePointer) {      popToRegister(OBJECT_TYPE, T1); // value      popToRegister(OBJECT_TYPE, T0); // fp      asm.emitSTAddr(T1,  STACKFRAME_FRAME_POINTER_OFFSET, T0); // *(address+SFPO) := value    } else if (methodName == VM_MagicNames.getCompiledMethodID) {      popToRegister(OBJECT_TYPE, T0);                           // pop  frame pointer of callee frame      asm.emitLWZ (T1, STACKFRAME_METHOD_ID_OFFSET, T0); // load compiled method id      pushFromRegister(WORD_TYPE, T1);                           // push method ID     } else if (methodName == VM_MagicNames.setCompiledMethodID) {      popToRegister(WORD_TYPE, T1); // value      popToRegister(OBJECT_TYPE, T0); // fp      asm.emitSTW(T1,  STACKFRAME_METHOD_ID_OFFSET, T0); // *(address+SNIO) := value    } else if (methodName == VM_MagicNames.getNextInstructionAddress) {      popToRegister(OBJECT_TYPE, T0);                                  // pop  frame pointer of callee frame      asm.emitLAddr(T1, STACKFRAME_NEXT_INSTRUCTION_OFFSET, T0); // load frame pointer of caller frame      pushFromRegister(OBJECT_TYPE, T1);                                  // push frame pointer of caller frame    } else if (methodName == VM_MagicNames.setNextInstructionAddress) {      popToRegister(OBJECT_TYPE, T1); // value      popToRegister(OBJECT_TYPE, T0); // fp      asm.emitSTAddr(T1,  STACKFRAME_NEXT_INSTRUCTION_OFFSET, T0); // *(address+SNIO) := value    } else if (methodName == VM_MagicNames.getReturnAddressLocation) {      popToRegister(OBJECT_TYPE, T0);                                  // pop  frame pointer of callee frame      asm.emitLAddr(T1, STACKFRAME_FRAME_POINTER_OFFSET, T0);    // load frame pointer of caller frame      asm.emitADDI (T2, STACKFRAME_NEXT_INSTRUCTION_OFFSET, T1); // get location containing ret addr      pushFromRegister(OBJECT_TYPE, T2);                                  // push frame pointer of caller frame    } else if (methodName == VM_MagicNames.getTocPointer ||               methodName == VM_MagicNames.getJTOC) {      pushFromRegister(OBJECT_TYPE, JTOC);     } else if (methodName == VM_MagicNames.getProcessorRegister) {      pushFromRegister(OBJECT_TYPE, PROCESSOR_REGISTER);    } else if (methodName == VM_MagicNames.setProcessorRegister) {      popToRegister(OBJECT_TYPE, PROCESSOR_REGISTER);    } else if (methodName == VM_MagicNames.getTimeBase) {      if (VM.BuildFor64Addr) {        asm.emitMFTB (T0);      // T0 := time base      } else {        int label = asm.getMachineCodeIndex();        asm.emitMFTBU(T0);                      // T0 := time base, upper        asm.emitMFTB (T1);                      // T1 := time base, lower        asm.emitMFTBU(T2);                      // T2 := time base, upper        asm.emitCMP  (T0, T2);                  // T0 == T2?        asm.emitBC   (NE, label);               // lower rolled over, try again      }      pushFromRegister(LONG_TYPE, T0);                  }  else if (methodName == VM_MagicNames.invokeMain) {      popToRegister(OBJECT_TYPE, T0); // t0 := ip      asm.emitMTCTR(T0);      popToRegister(OBJECT_TYPE, T0); // t0 := parameter      asm.emitBCCTRL();          // call    } else if (methodName == VM_MagicNames.invokeClassInitializer) {      popToRegister(OBJECT_TYPE, T0); // t0 := address to be called      asm.emitMTCTR(T0);      asm.emitBCCTRL();          // call    } else if (methodName == VM_MagicNames.invokeMethodReturningVoid) {      generateMethodInvocation(); // call method    } else if (methodName == VM_MagicNames.invokeMethodReturningInt) {      generateMethodInvocation(); // call method      pushFromRegister(WORD_TYPE, T0);       // push result    } else if (methodName == VM_MagicNames.invokeMethodReturningLong) {      generateMethodInvocation(); // call method      pushFromRegister(LONG_TYPE, T0);       // push result    } else if (methodName == VM_MagicNames.invokeMethodReturningFloat) {      generateMethodInvocation(); // call method      pushFromRegister(FLOAT_TYPE, F0);     // push result    } else if (methodName == VM_MagicNames.invokeMethodReturningDouble) {      generateMethodInvocation(); // call method      pushFromRegister(DOUBLE_TYPE, F0);     // push result    } else if (methodName == VM_MagicNames.invokeMethodReturningObject) {      generateMethodInvocation(); // call method      pushFromRegister(OBJECT_TYPE, T0);       // push result    } else if (methodName == VM_MagicNames.addressArrayCreate) {      VM_Array type = methodToBeCalled.getType().resolve().asArray();      emit_resolved_newarray(type);    } else if (methodName == VM_MagicNames.addressArrayLength) {      emit_arraylength();    } else if (methodName == VM_MagicNames.addressArrayGet) {      if (VM.BuildFor32Addr || methodToBeCalled.getType() == VM_TypeReference.CodeArray) {        emit_iaload();      } else {        if (VM.VerifyAssertions) VM._assert(NOT_REACHED);        emit_laload();      }    } else if (methodName == VM_MagicNames.addressArraySet) {      if (VM.BuildFor32Addr || methodToBeCalled.getType() == VM_TypeReference.CodeArray) {        emit_iastore();        } else {        if (VM.VerifyAssertions) VM._assert(NOT_REACHED);        emit_lastore();      }    } else if (methodName == VM_MagicNames.getIntAtOffset) {       popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitLIntX (T0, T1, T0); // *(object+offset)      pushFromRegister(WORD_TYPE, T0); // push *(object+offset)    } else if (methodName == VM_MagicNames.getObjectAtOffset ||               methodName == VM_MagicNames.getObjectArrayAtOffset) {      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitLAddrX(T0, T1, T0); // *(object+offset)      pushFromRegister(OBJECT_TYPE, T0); // push *(object+offset)    } else if (methodName == VM_MagicNames.getWordAtOffset) {      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitLAddrX(T0, T1, T0); // *(object+offset)      pushFromRegister(WORD_TYPE, T0); // push *(object+offset)    } else if (methodName == VM_MagicNames.getByteAtOffset) {      popToRegister(WORD_TYPE, T1);   // pop offset      popToRegister(OBJECT_TYPE, T0);   // pop object      asm.emitLBZX(T0, T1, T0);   // load byte with zero extension.      pushFromRegister(WORD_TYPE, T0);    // push *(object+offset)     } else if (methodName == VM_MagicNames.getCharAtOffset) {      popToRegister(WORD_TYPE, T1);   // pop offset      popToRegister(OBJECT_TYPE, T0);   // pop object      asm.emitLHZX(T0, T1, T0);   // load byte with zero extension.      pushFromRegister(WORD_TYPE, T0);    // push *(object+offset)     } else if (methodName == VM_MagicNames.setIntAtOffset){      popToRegister(WORD_TYPE, T2); // pop newvalue      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitSTWX(T2, T1, T0); // *(object+offset) = newvalue    } else if (methodName == VM_MagicNames.setObjectAtOffset ||               methodName == VM_MagicNames.setWordAtOffset) {      if (methodToBeCalled.getParameterTypes().length == 4) {        pop(WORD_TYPE); // discard locationMetadata parameter      }      popToRegister(OBJECT_TYPE, T2); // pop newvalue      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitSTAddrX(T2, T1, T0); // *(object+offset) = newvalue    } else if (methodName == VM_MagicNames.setWordAtOffset) {      popToRegister(WORD_TYPE, T2); // pop newvalue      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitSTAddrX(T2, T1, T0); // *(object+offset) = newvalue    } else if (methodName == VM_MagicNames.setByteAtOffset) {      popToRegister(WORD_TYPE, T2); // pop newvalue      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitSTBX(T2, T1, T0); // *(object+offset) = newvalue    } else if (methodName == VM_MagicNames.setCharAtOffset) {      popToRegister(WORD_TYPE, T2); // pop newvalue      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitSTHX(T2, T1, T0); // *(object+offset) = newvalue    } else if (methodName == VM_MagicNames.getLongAtOffset) {      popToRegister(WORD_TYPE, T2); // pop offset      popToRegister(OBJECT_TYPE, T1); // pop object      if (VM.BuildFor32Addr) {        // The long will be stored in T0 and T1        asm.emitLWZX (T0, T1, T2); // *(object+offset)        asm.emitADDI(T2, BYTES_IN_INT, T2); // offset += 4        asm.emitLWZX (T1, T1, T2); // *(object+offset+4)      } else {        asm.emitLDX(T1, T1, T2);      }      pushFromRegister(LONG_TYPE, T0);    } else if (methodName == VM_MagicNames.getDoubleAtOffset) {      popToRegister(WORD_TYPE, T2); // pop offset      popToRegister(OBJECT_TYPE, T1); // pop object      asm.emitLFDX (F0, T1, T2);       pushFromRegister(DOUBLE_TYPE, F0);    } else if (methodName == VM_MagicNames.setLongAtOffset){      popToRegister(LONG_TYPE, T2); // Long goes to T2 and T3      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      if (VM.BuildFor32Addr) {        asm.emitSTWX(T2, T1, T0); // *(object+offset) = newvalue high        asm.emitADDI(T1, BYTES_IN_INT, T1); // offset += 4        asm.emitSTWX(T3, T1, T0); // *(object+offset) = newvalue low      } else {        asm.emitSTDX(T2, T1, T0); // *(object+offset) = newvalue       }     } else if (methodName == VM_MagicNames.setDoubleAtOffset) {      popToRegister(DOUBLE_TYPE, F0);      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      asm.emitSTFDX (F0, T1, T0);  // store double value in object    } else if (methodName == VM_MagicNames.getMemoryInt){      popToRegister(OBJECT_TYPE, T0); // address      asm.emitLInt (T0,  0, T0); // *address      pushFromRegister(WORD_TYPE, T0); // *sp := *address    } else if (methodName == VM_MagicNames.getMemoryWord ||               methodName == VM_MagicNames.getMemoryAddress) {      popToRegister(OBJECT_TYPE, T0); // address      asm.emitLAddr(T0,  0, T0); // *address      pushFromRegister(OBJECT_TYPE, T0); // *sp := *address    } else if (methodName == VM_MagicNames.setMemoryInt ){      popToRegister(WORD_TYPE, T1); // value      popToRegister(OBJECT_TYPE, T0); // address      asm.emitSTW(T1,  0, T0); // *address := value    } else if (methodName == VM_MagicNames.setMemoryWord ||               methodName == VM_MagicNames.setMemoryAddress) {      popToRegister(OBJECT_TYPE, T1); // value      popToRegister(OBJECT_TYPE, T0); // address      asm.emitSTAddr(T1,  0, T0); // *address := value    } else if (methodName == VM_MagicNames.prepareInt){      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      // We always generate code for multiple virtual processors.  This saves      // us some hassle in generating a boot image that will work for both,      // and the extra expense is really cheap.      //      // if (VM.singleVirtualProcessor) {      // asm.emitLWZX (T0, T1, T0); // *(object+offset)      // } else {      asm.emitLWARX(T0,  T1, T0); // *(object+offset), setting processor's reservation address      // } //this Integer is not sign extended !!      pushFromRegister(WORD_TYPE, T0); // push *(object+offset)    } else if (methodName == VM_MagicNames.prepareObject ||               methodName == VM_MagicNames.prepareAddress ||               methodName == VM_MagicNames.prepareWord) {      popToRegister(WORD_TYPE, T1); // pop offset      popToRegister(OBJECT_TYPE, T0); // pop object      // if (VM.singleVirtualProcessor) {      // asm.emitLAddrX(T0, T1, T0); // *(object+offset)      // } else {        if (VM.BuildFor32Addr) {          asm.emitLWARX(T0,  T1, T0); // *(object+offset), setting processor's reservation address        } else {          asm.emitLDARX(T0, T1, T0);        }         // }      pushFromRegister((methodName == VM_MagicNames.prepareWord)?WORD_TYPE:OBJECT_TYPE, T0); // push *(object+offset)    } else if (methodName == VM_MagicNames.attemptInt){      popToRegister(WORD_TYPE, T2);  // pop newValue      pop(WORD_TYPE); // ignore oldValue      popToRegister(WORD_TYPE, T1);  // pop offset      popToRegister(OBJECT_TYPE, T0);  // pop object      // if (VM.singleVirtualProcessor) {      //        asm.emitSTWX(T2, T1, T0); // store new value (on one VP this succeeds by definition)      //        asm.emitLVAL   (T0,  1);   // T0 := true      //        pushFromRegister(WORD_TYPE, T0);  // push success of conditional store      //      } else {        asm.emitSTWCXr(T2,  T1, T0); // store new value and set CR0        asm.emitLVAL   (T0,  0);  // T0 := false        VM_ForwardReference fr = asm.emitForwardBC(NE); // skip, if store failed        asm.emitLVAL   (T0,  1);   // T0 := true        fr.resolve(asm);        pushFromRegister(WORD_TYPE, T0);  // push success of conditional store        //      }    } else if (methodName == VM_MagicNames.attemptObject ||               methodName == VM_MagicNames.attemptAddress ||               methodName == VM_MagicNames.attemptWord) {      popToRegister(OBJECT_TYPE, T2);  // pop newValue      pop(OBJECT_TYPE); // ignore oldValue      popToRegister(WORD_TYPE, T1);  // pop offset      popToRegister(OBJECT_TYPE, T0);  // pop object      //      if (VM.BuildForSingleVirtualProcessor) {      //        asm.emitSTAddrX(T2,  T1, T0); // store new value (on one VP this succeeds by definition)      //        asm.emitLVAL   (T0,  1);   // T0 := true      //        pushFromRegister(OBJECT_TYPE, T0);  // push success of conditional store      //      } else {        if (VM.BuildFor32Addr) {          asm.emitSTWCXr(T2,  T1, T0); // store new value and set CR0        } else {          asm.emitSTDCXr(T2,  T1, T0); // store new value and set CR0        }        asm.emitLVAL   (T0,  0);  // T0 := false        VM_ForwardReference fr = asm.emitForwardBC(NE); // skip, if store failed        asm.emitLVAL   (T0,  1);   // T0 := true        fr.resolve(asm);        pushFromRegister(WORD_TYPE, T0);  // push success of conditional store        //      }    } else if (methodName == VM_MagicNames.saveThreadState) {      peekToRegister(OBJECT_TYPE, T0); // T0 := address of VM_Registers object      asm.emitLAddrToc(S0, VM_Entrypoints.saveThreadStateInstructionsField.getOffset());      asm.emitMTCTR(S0);      asm.emitBCCTRL(); // call out of line machine code      currentStackHeight -= 1;    } else if (methodName == VM_MagicNames.threadSwitch) {      peekToRegister(OBJECT_TYPE, currentStackHeight-1, T1); // T1 := address of VM_Registers of new thread      peekToRegister(OBJECT_TYPE, currentStackHeight-2, T0); // T0 := address of previous VM_Thread object      asm.emitLAddrToc(S0, VM_Entrypoints.threadSwitchInstructionsField.getOffset());      asm.emitMTCTR(S0);      asm.emitBCCTRL();      currentStackHeight -= 2;    } else if (methodName == VM_MagicNames.restoreHardwareExceptionState) {      peekToRegister(OBJECT_TYPE, T0); // T0 := address of VM_Registers object      asm.emitLAddrToc(S0, VM_Entrypoints.restoreHardwareExceptionStateInstructionsField.getOffset());      asm.emitMTLR(S0);      asm.emitBCLR(); // branch to out of line machine code (does not return)    } else if (methodName == VM_MagicNames.returnToNewStack) {      peekToRegister(OBJECT_TYPE, FP);                                  // FP := new stackframe      asm.emitLAddr(S0, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); // fetch...      asm.emitMTLR(S0);                                         // ...return address      asm.emitBCLR ();                                           // return to caller    } else if (methodName == VM_MagicNames.dynamicBridgeTo) {      if (VM.VerifyAssertions) VM._assert(klass.isDynamicBridge());               // fetch parameter (address to branch to) into CT register      //      popToRegister(OBJECT_TYPE, T0);       asm.emitMTCTR(T0);      // restore volatile and non-volatile registers      // (note that these are only saved for "dynamic bridge" methods)      //      int offset = frameSize;      // restore non-volatile and volatile fprs      for (int i = LAST_NONVOLATILE_FPR; i >= FIRST_VOLATILE_FPR; --i)        asm.emitLFD(i, offset -= BYTES_IN_DOUBLE, FP);            // restore non-volatile gprs      for (int i = LAST_NONVOLATILE_GPR; i >= FIRST_NONVOLATILE_GPR; --i)        asm.emitLAddr(i, offset -= BYTES_IN_ADDRESS, FP);                  // skip saved thread-id, processor, and scratch registers      offset -= (FIRST_NONVOLATILE_GPR - LAST_VOLATILE_GPR - 1) * BYTES_IN_ADDRESS;               // restore volatile gprs      for (int i = LAST_VOLATILE_GPR; i >= FIRST_VOLATILE_GPR; --i)        asm.emitLAddr(i, offset -= BYTES_IN_ADDRESS, FP);                // pop stackframe      asm.emitLAddr(FP, 0, FP);               // restore link register      asm.emitLAddr(S0, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP);      asm.emitMTLR(S0);      asm.emitBCCTR(); // branch always, through count register    } else if (methodName == VM_MagicNames.objectAsAddress         ||               methodName == VM_MagicNames.addressAsByteArray      ||               methodName == VM_MagicNames.addressAsIntArray       ||               methodName == VM_MagicNames.addressAsObject         ||               methodName == VM_MagicNames.addressAsObjectArray    ||               methodName == VM_MagicNames.addressAsType           ||               methodName == VM_MagicNames.objectAsType            ||               methodName == VM_MagicNames.objectAsByteArray       ||               methodName == VM_MagicNames.objectAsShortArray      ||               methodName == VM_MagicNames.objectAsIntArray        ||               methodName == VM_MagicNames.addressAsThread         ||               methodName == VM_MagicNames.objectAsThread          ||               methodName == VM_MagicNames.objectAsProcessor       ||               methodName == VM_MagicNames.threadAsCollectorThread ||               methodName == VM_MagicNames.addressAsRegisters      ||               methodName == VM_MagicNames.addressAsStack          ) {      // no-op (a type change, not a representation change)    } else if (methodName == VM_MagicNames.floatAsIntBits) {      assignRegisters(1, WORD_TYPE);      copyByLocation(FLOAT_TYPE,                              registerToLocation(sri0),                              WORD_TYPE,                              registerToLocation(sro0));      cleanupRegisters();           } else if (methodName == VM_MagicNames.intBitsAsFloat) {      assignRegisters(1, FLOAT_TYPE);      copyByLocation(WORD_TYPE,                              registerToLocation(sri0),                              FLOAT_TYPE,                              registerToLocation(sro0));                                         cleanupRegisters();    } else if  (methodName == VM_MagicNames.doubleAsLongBits) {      assignRegisters(1, LONG_TYPE);      copyByLocation(DOUBLE_TYPE,                              registerToLocation(sri0),                              LONG_TYPE,                              registerToLocation(sro0));                                         cleanupRegisters();    } else if (methodName == VM_MagicNames.longBitsAsDouble) {      assignRegisters(1, DOUBLE_TYPE);      copyByLocation(LONG_TYPE,                              registerToLocation(sri0),                              DOUBLE_TYPE,                              registerToLocation(sro0));      cleanupRegisters();    } else if (methodName == VM_MagicNames.getObjectType) {      popToRegister(OBJECT_TYPE, T0);                   // get object pointer      VM_ObjectModel.baselineEmitLoadTIB(asm,T0,T0);      asm.emitLAddr(T0,  TIB_TYPE_INDEX << LOG_BYTES_IN_ADDRESS, T0); // get "type" field from type information block      pushFromRegister(OBJECT_TYPE, T0);                   // *sp := type    } else if (methodName == VM_MagicNames.getArrayLength) {      popToRegister(OBJECT_TYPE, T0);                   // get object pointer      asm.emitLIntOffset(T0, T0, VM_ObjectModel.getArrayLengthOffset()); // get array length field      pushFromRegister(WORD_TYPE, T0);                   // *sp := length    } else if (methodName == VM_MagicNames.sync) {      asm.emitSYNC();    } else if (methodName == VM_MagicNames.isync) {      asm.emitISYNC();    } else if (methodName == VM_MagicNames.dcbst) {      popToRegister(OBJECT_TYPE, T0);    // address      asm.emitDCBST(0, T0);    } else if (methodName == VM_MagicNames.icbi) {      popToRegister(OBJECT_TYPE, T0);    // address      asm.emitICBI(0, T0);    } else if (methodName == VM_MagicNames.wordToInt) {      // no-op      pop(OBJECT_TYPE);      push(WORD_TYPE);    } else if (methodName == VM_MagicNames.wordToAddress ||               methodName == VM_MagicNames.wordToOffset ||               methodName == VM_MagicNames.wordToObject ||               methodName == VM_MagicNames.wordFromObject ||               methodName == VM_MagicNames.wordToObjectReference ||               methodName == VM_MagicNames.wordToExtent ||               methodName == VM_MagicNames.wordToWord) {      // no-op [pop object then push object]    } else if (methodName == VM_MagicNames.wordToLong){      popToRegister(OBJECT_TYPE, T1);      asm.emitLVAL(T0,0);      pushFromRegister(LONG_TYPE, T0);    } else if (methodName == VM_MagicNames.wordFromInt ||               methodName == VM_MagicNames.wordFromIntSignExtend) {      if (VM.BuildFor64Addr) {        popToRegister(WORD_TYPE, T0);        popToRegister(OBJECT_TYPE, T0);      } // else no-op      pop(WORD_TYPE);      push(OBJECT_TYPE);    } else if (methodName == VM_MagicNames.wordFromIntZeroExtend) {      if (VM.BuildFor64Addr) {        if (VM.VerifyAssertions) VM._assert(NOT_REACHED);      } // else no-op      pop(WORD_TYPE);      push(OBJECT_TYPE);    } else if (methodName == VM_MagicNames.wordFromLong) {      pop(LONG_TYPE);      push(OBJECT_TYPE);    } else if (methodName == VM_MagicNames.wordPlus) {      if (VM.BuildFor64Addr && (methodToBeCalled.getParameterTypes()[0] == VM_TypeReference.Int)){        popToRegister(WORD_TYPE, T0);      } else {        popToRegister(OBJECT_TYPE, T0);      }      popToRegister(OBJECT_TYPE, T1);      asm.emitADD (T2, T1, T0);      pushFromRegister(OBJECT_TYPE, T2);    } else if (methodName == VM_MagicNames.wordMinus ||               methodName == VM_MagicNames.wordDiff) {      if (VM.BuildFor64Addr && (methodToBeCalled.getParameterTypes()[0] == VM_TypeReference.Int)){        popToRegister(WORD_TYPE, T0);      } else {        popToRegister(OBJECT_TYPE, T0);      }      popToRegister(OBJECT_TYPE, T1);      asm.emitSUBFC (T2, T0, T1);      pushFromRegister(OBJECT_TYPE, T2);    } else if (methodName == VM_MagicNames.wordLT) {      // unsigned comparison generating a boolean      generateAddrComparison(false, LT);    } else if (methodName == VM_MagicNames.wordLE) {      // unsigned comparison generating a boolean      generateAddrComparison(false, LE);    } else if (methodName == VM_MagicNames.wordEQ) {      // unsigned comparison generating a boolean      generateAddrComparison(false, EQ);    } else if (methodName == VM_MagicNames.wordNE) {      // unsigned comparison generating a boolean      generateAddrComparison(false, NE);    } else if (methodName == VM_MagicNames.wordGT) {      // unsigned comparison generating a boolean      generateAddrComparison(false, GT);    } else if (methodName == VM_MagicNames.wordGE) {      // unsigned comparison generating a boolean      generateAddrComparison(false, GE);    } else if (methodName == VM_MagicNames.wordsLT) {      generateAddrComparison(true, LT);    } else if (methodName == VM_MagicNames.wordsLE) {      generateAddrComparison(true, LE);     } else if (methodName == VM_MagicNames.wordsGT) {      generateAddrComparison(true, GT);    } else if (methodName == VM_MagicNames.wordsGE) {      generateAddrComparison(true, GE);    } else if (methodName == VM_MagicNames.wordIsZero ||               methodName == VM_MagicNames.wordIsNull) {      // unsigned comparison generating a boolean      generateAddrComparison(EQ, 0);    } else if (methodName == VM_MagicNames.wordIsMax) {      // unsigned comparison generating a boolean      generateAddrComparison(EQ, -1);    } else if (methodName == VM_MagicNames.wordZero ||               methodName == VM_MagicNames.wordNull) {      asm.emitLVAL (T0,  0);      pushFromRegister(OBJECT_TYPE, T0);    } else if (methodName == VM_MagicNames.wordOne) {      asm.emitLVAL (T0,  1);      pushFromRegister(OBJECT_TYPE, T0);    } else if (methodName == VM_MagicNames.wordMax) {      asm.emitLVAL (T0, -1);      pushFromRegister(OBJECT_TYPE, T0);    } else if (methodName == VM_MagicNames.wordAnd) {      popToRegister(OBJECT_TYPE, T0);      popToRegister(OBJECT_TYPE, T1);      asm.emitAND(T2, T1, T0);      pushFromRegister(OBJECT_TYPE, T2);    } else if (methodName == VM_MagicNames.wordOr) {      popToRegister(OBJECT_TYPE, T0);      popToRegister(OBJECT_TYPE, T1);      asm.emitOR (T2, T1, T0);      pushFromRegister(OBJECT_TYPE, T2);    } else if (methodName == VM_MagicNames.wordNot) {      popToRegister(OBJECT_TYPE, T0);      asm.emitLVAL(T1, -1);      asm.emitXOR(T2, T1, T0);      pushFromRegister(OBJECT_TYPE, T2);    } else if (methodName == VM_MagicNames.wordXor) {      popToRegister(OBJECT_TYPE, T0);      popToRegister(OBJECT_TYPE, T1);      asm.emitXOR(T2, T1, T0);      pushFromRegister(OBJECT_TYPE, T2);    } else if (methodName == VM_MagicNames.wordLsh) {      popToRegister(WORD_TYPE, T0);      popToRegister(OBJECT_TYPE, T1);      if (VM.BuildFor32Addr)        asm.emitSLW (T2, T1, T0);      else        asm.emitSLD (T2, T1, T0);      pushFromRegister(OBJECT_TYPE, T2);    } else if (methodName == VM_MagicNames.wordRshl) {      popToRegister(WORD_TYPE, T0);      popToRegister(OBJECT_TYPE, T1);      if (VM.BuildFor32Addr)        asm.emitSRW (T2, T1, T0);      else        asm.emitSRD (T2, T1, T0);      pushFromRegister(OBJECT_TYPE, T2);    } else if (methodName == VM_MagicNames.wordRsha) {      popToRegister(WORD_TYPE, T0);      popToRegister(OBJECT_TYPE, T1);      if (VM.BuildFor32Addr)        asm.emitSRAW (T2, T1, T0);      else        asm.emitSRAD (T2, T1, T0);      pushFromRegister(OBJECT_TYPE, T2);    } else {      return false;    }    return true;  }