Index: src/ia32/disasm-ia32.cc |
diff --git a/src/ia32/disasm-ia32.cc b/src/ia32/disasm-ia32.cc |
index 177041de7ac114225bd65097f90feacd4fd8815f..d91dceb0f75ce30d304d0bd5584143c4a0c6481f 100644 |
--- a/src/ia32/disasm-ia32.cc |
+++ b/src/ia32/disasm-ia32.cc |
@@ -449,8 +449,12 @@ int DisassemblerIA32::PrintRightOperandHelper( |
} else { |
// No sib. |
int disp = |
- mod == 2 ? *reinterpret_cast<int32_t*>(modrmp + 1) : *(modrmp + 1); |
- AppendToBuffer("[%s+0x%x]", (this->*register_name)(rm), disp); |
+ mod == 2 ? *reinterpret_cast<int32_t*>(modrmp + 1) : |
+ *reinterpret_cast<int8_t*>(modrmp + 1); |
+ AppendToBuffer("[%s%s0x%x]", |
+ (this->*register_name)(rm), |
+ disp < 0 ? "-" : "+", |
+ disp < 0 ? -disp : disp); |
titzer
2014/03/04 13:43:35
I think you want a subroutine for adding the displ
Michael Starzinger
2014/03/04 18:29:53
Done for x64. No subroutine though, I think that's
|
return mod == 2 ? 5 : 2; |
} |
break; |