code: void _emitRexRM(int w, int opReg, Operand rm) {
          if (is64()) {
  
              boolean r = (opReg & 0x8) != 0;
              boolean x = false;
              boolean b = false;
  
              if (rm.isReg()) {
                  b = (((BaseReg) rm).code() & 0x8) != 0;
  
              } else if (rm.isMem()) {
                  x = (((Mem) rm).index() & 0x8) != 0 && ((Mem) rm).index() != NO_REG;
                  b = (((Mem) rm).base() & 0x8) != 0 && ((Mem) rm).base() != NO_REG;
              }
  
              // w Default operand size(0=Default, 1=64 bits).
              // r Register field (1=high bit extension of the ModR/M REG field).
              // x Index field (1=high bit extension of the SIB Index field).
              // b Base field (1=high bit extension of the ModR/M or SIB Base field).
              if (w != 0 || r || x || b || (_properties & (1 << PROPERTY_X86_FORCE_REX)) != 0) {
                  _emitByte(0x40 | (w << 3) | (intValue(r) << 2) | (intValue(x) << 1) | intValue(b));
              }
          }
      }
docs: Emit REX prefix (64 bit mode only).