summaryrefslogtreecommitdiff
path: root/src/vm/exceptionhandling.cpp
diff options
context:
space:
mode:
authorSaeHie Park <saehie.park@gmail.com>2017-02-16 06:46:36 +0900
committerJan Vorlicek <janvorli@microsoft.com>2017-02-15 22:46:36 +0100
commit75cfdc46c862fc118254c429fcfca9124f1ac141 (patch)
tree927e9a5c00ddb7babf0ef5969cdf84290021e946 /src/vm/exceptionhandling.cpp
parent7bb5207734cce3c267032a85331a8891dbdf44dd (diff)
downloadcoreclr-75cfdc46c862fc118254c429fcfca9124f1ac141.tar.gz
coreclr-75cfdc46c862fc118254c429fcfca9124f1ac141.tar.bz2
coreclr-75cfdc46c862fc118254c429fcfca9124f1ac141.zip
[x86/Linux] Fix GetModRMOperandValue() (#9600)
Getting idiv divisor in GetModRMOperandValue() needs to handle x86 also This patch will correct address of divisor when it resides in memory Related unit test case: JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16328/b16328
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
{