summaryrefslogtreecommitdiff
path: root/src/jit/emitxarch.cpp
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2019-06-24 11:19:58 -0700
committerJan Kotas <jkotas@microsoft.com>2019-06-24 11:19:58 -0700
commitbad8d915c267057bf74cb819c9e027d68cd1fa35 (patch)
tree0e4ce8df894b0b2e303539da9f2a374bcef4840b /src/jit/emitxarch.cpp
parent6c9deb470b1d4f704127979552a94126285e02d7 (diff)
downloadcoreclr-bad8d915c267057bf74cb819c9e027d68cd1fa35.tar.gz
coreclr-bad8d915c267057bf74cb819c9e027d68cd1fa35.tar.bz2
coreclr-bad8d915c267057bf74cb819c9e027d68cd1fa35.zip
JIT: see if jmp offset will fit in 32 bit displacement (#25348)
On x86 we can always reach any IAT_PVALUE entry via a 32 bit indirect jump, and proper handling of jmp epilogs depends on this. So check if the target address is reachable in 32 bits, and if so, use the jmp [addr] form on x86, and the jmp [rip + disp] form for x64. Fixes #25345 Fixes #25346 Undoes the assertion change from #25302 Fixes #25286
Diffstat (limited to 'src/jit/emitxarch.cpp')
-rw-r--r--src/jit/emitxarch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp
index 1f529ff694..8a6b34b2d4 100644
--- a/src/jit/emitxarch.cpp
+++ b/src/jit/emitxarch.cpp
@@ -7057,7 +7057,7 @@ void emitter::emitIns_Call(EmitCallType callType,
if (isJump)
{
- assert(callType == EC_FUNC_TOKEN || callType == EC_INDIR_ARD);
+ assert(callType == EC_FUNC_TOKEN || callType == EC_FUNC_TOKEN_INDIR || callType == EC_INDIR_ARD);
if (callType == EC_FUNC_TOKEN)
{
ins = INS_l_jmp;