summaryrefslogtreecommitdiff
path: root/src/vm/exceptionhandling.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/exceptionhandling.cpp')
-rw-r--r--src/vm/exceptionhandling.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp
index a6c7651004..07d339389a 100644
--- a/src/vm/exceptionhandling.cpp
+++ b/src/vm/exceptionhandling.cpp
@@ -4830,10 +4830,15 @@ DWORD64 GetModRMOperandValue(BYTE rex, BYTE* ip, PCONTEXT pContext, bool is8Bit,
// Get the value we need from the register.
//
- // Check for RIP-relative addressing mode.
+ // Check for RIP-relative addressing mode for AMD64
+ // Check for Displacement only addressing mode for x86
if ((mod == 0) && (rm == 5))
{
+#if defined(_TARGET_AMD64_)
result = (DWORD64)ip + sizeof(INT32) + *(INT32*)ip;
+#else
+ result = (DWORD64)(*(DWORD*)ip);
+#endif // _TARGET_AMD64_
}
else
{