48 const unsigned rex_w = 3;
49 const unsigned rex_r = 2;
50 const unsigned rex_x = 1;
51 const unsigned rex_b = 0;
108 modrm = mod << modrm_mod;
110 modrm |= rm << modrm_rm;
125 sib =
scale << sib_scale;
139 return disp != 0 && fits_into<s1>(
disp);
143 return disp != 0 && !fits_into<s1>(
disp);
151 return 0xff & (
disp >> 0);
155 return 0xff & (
disp >> 8);
159 return 0xff & (
disp >> 16);
163 return 0xff & (
disp >> 24);
182 ABORT_MSG(
"type not supported",
"x86_64 ModRMOperand::get_scale() type: " << type);
199 ABORT_MSG(
"type not supported",
"x86_64 ModRMOperand::get_scale() type: " << scale);
u1 getRex(const X86_64Register ®, bool opsiz64)
X86_64Register * cast_to< X86_64Register >(Register *reg)
u1 getModRM(const X86_64Register ®)
static const unsigned base
std::size_t op_size() const
X86_64Register * base86_64
alloc::set< EdgeType >::type mod
GPRegister R12("R12", 0x4, true, 0xc *8, 8)
virtual X86_64ModRMOperand * to_X86_64ModRMOperand()
u1 getSIB(const X86_64Register ®)
X86_64Register * index86_64
unsigned get_index() const
static ScaleFactor get_scale(Type::TypeID type)
static const unsigned index
virtual NativeAddress * to_NativeAddress()
embedded_operand_list embedded_operands
TODO describe.
#define ABORT_MSG(EXPR_SHORT, EXPR_LONG)
GPRegister RSP("RSP", 0x4, false, 0x4 *8, 8)