Displaying 3 results from an estimated 3 matches for "disp16".
2013 Dec 12
3
[LLVMdev] [RFC PATCH 1/2] x86: Fix ModR/M byte output in 16-bit addressing mode
...e(2, RegOpcodeField, RMfield), CurByte, OS);
+ } else {
+ // !BaseReg
+ EmitByte(ModRMByte(0, RegOpcodeField, 6), CurByte, OS);
+ }
+
+ // FIXME: Yes we can!
+ assert(Disp.isImm() && "cannot emit 16-bit relocation");
+ // Emit 16-bit displacement for plain disp16 or [REG]+disp16 cases.
+ EmitImmediate(Disp, MI.getLoc(), 2, FK_Data_2, CurByte, OS, Fixups);
+ return;
+ }
+
// Determine whether a SIB byte is needed.
// If no BaseReg, issue a RIP relative instruction only if the MCE can
// resolve addresses on-the-fly, otherwise use SIB (Intel M...
2013 Dec 16
0
[LLVMdev] [RFC PATCH 1/2] x86: Fix ModR/M byte output in 16-bit addressing mode
...OS);
> + } else {
> + // !BaseReg
> + EmitByte(ModRMByte(0, RegOpcodeField, 6), CurByte, OS);
> + }
> +
> + // FIXME: Yes we can!
> + assert(Disp.isImm() && "cannot emit 16-bit relocation");
> + // Emit 16-bit displacement for plain disp16 or [REG]+disp16 cases.
> + EmitImmediate(Disp, MI.getLoc(), 2, FK_Data_2, CurByte, OS, Fixups);
> + return;
> + }
> +
> // Determine whether a SIB byte is needed.
> // If no BaseReg, issue a RIP relative instruction only if the MCE can
> // resolve addresses on-...
2005 Apr 02
1
[PATCH] VMX support for MMIO/PIO in VM8086 mode
...int op16, const unsigned char *inst, int op_size)
{
int mod, reg, rm;
unsigned long val = 0;
@@ -183,14 +193,21 @@
switch(mod) {
case 0:
if (rm == 5) {
- inst = inst + 4; //disp32, skip 4 bytes
+ if (op16)
+ inst = inst + 2; //disp16, skip 2 bytes
+ else
+ inst = inst + 4; //disp32, skip 4 bytes
}
break;
case 1:
inst++; //disp8, skip 1 byte
break;
case 2:
- inst = inst + 4; //disp32, skip 4 bytes
+ if (op16)
+...