Displaying 2 results from an estimated 2 matches for "rmfield".
2013 Dec 12
3
[LLVMdev] [RFC PATCH 1/2] x86: Fix ModR/M byte output in 16-bit addressing mode
...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), and one of BP/BX (6,7)
+ assert(((IndexReg16 ^ R...
2013 Dec 16
0
[LLVMdev] [RFC PATCH 1/2] x86: Fix ModR/M byte output in 16-bit addressing mode
...re 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), and one of BP/BX (6,...