JIT: see if jmp offset will fit in 32 bit displacement (#25348)
authorAndy Ayers <andya@microsoft.com>
Mon, 24 Jun 2019 18:19:58 +0000 (11:19 -0700)
committerJan Kotas <jkotas@microsoft.com>
Mon, 24 Jun 2019 18:19:58 +0000 (11:19 -0700)
commitbad8d915c267057bf74cb819c9e027d68cd1fa35
tree0e4ce8df894b0b2e303539da9f2a374bcef4840b
parent6c9deb470b1d4f704127979552a94126285e02d7
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
src/jit/codegencommon.cpp
src/jit/emit.cpp
src/jit/emitxarch.cpp