search for: r16table

Displaying 2 results from an estimated 2 matches for "r16table".

2013 Dec 12
3
[LLVMdev] [RFC PATCH 1/2] x86: Fix ModR/M byte output in 16-bit addressing mode
...essing forms of the ModR/M byte have a different encoding for + // the R/M field and are far more limited in which registers can be used. + if (Is16BitMemOperand(MI, Op)) { + if (BaseReg) { + // See Table 2-1 "16-Bit Addressing Forms with the ModR/M byte" + static const int R16Table[] = { 0, 0, 0, 7, 0, 6, 4, 5 }; + unsigned RMfield = R16Table[BaseRegNo]; + + assert(RMfield && "invalid 16-bit base register"); + + if (IndexReg.getReg()) { + unsigned IndexReg16 = R16Table[GetX86RegNum(IndexReg)]; + + // Must have one of SI,DI (4,5),...
2013 Dec 16
0
[LLVMdev] [RFC PATCH 1/2] x86: Fix ModR/M byte output in 16-bit addressing mode
...e a different encoding > for > + // the R/M field and are far more limited in which registers can be > used. > + if (Is16BitMemOperand(MI, Op)) { > + if (BaseReg) { > + // See Table 2-1 "16-Bit Addressing Forms with the ModR/M byte" > + static const int R16Table[] = { 0, 0, 0, 7, 0, 6, 4, 5 }; > + unsigned RMfield = R16Table[BaseRegNo]; > + > + assert(RMfield && "invalid 16-bit base register"); > + > + if (IndexReg.getReg()) { > + unsigned IndexReg16 = R16Table[GetX86RegNum(IndexReg)]; > + > +...