Esempio n. 1
0
  private void remapRegister(RegAllocContext context, Instruction instr, Argument arg) {
    // If Argument2() is mapped to a variable
    if (instr.getMapRegToValue().containsKey(arg.getName())) {
      String strVar = instr.getMapRegToValue().get(arg.getName());

      // Re-write argument 2 with re-mapped register
      if (!strVar.isEmpty()) {
        String strRemapReg = context.variableLocs.get(strVar);

        if (null != strRemapReg && 0 != strRemapReg.compareTo("m")) {
          arg.setName(strRemapReg);
          arg.setOrigName(strRemapReg);
        }
      }
    }
  }