Fix two cases of FP-relative immediate offsets not being checked for encodability
authorBruce Forstall <Bruce_Forstall@msn.com>
Tue, 15 Jan 2019 22:21:48 +0000 (14:21 -0800)
committerBruce Forstall <Bruce_Forstall@msn.com>
Tue, 15 Jan 2019 22:21:48 +0000 (14:21 -0800)
commit91cfbf46e66b6c6339c530c08053cacbb498314a
tree4f75a3ff5c6c783a3f8955d3b326b8e5e3ab1712
parentc4e4036761771bdc3fad060e6ce70daa5b85fe2a
Fix two cases of FP-relative immediate offsets not being checked for encodability

For ARM32/ARM64, the immediate offsets in addressing modes have
limited range that varies by instruction. A couple cases were not
checking for that range, leading to generating potentially
un-encodable instruction.

In particular, the test case shows a case where a very large frame in a function
with a stored generic context would fail on ARM64.

There are no code diffs from this change for ARM64, except we sometimes get
better assembly comments where the local variable referenced is annotated on
the store instruction. For ARM32, the "secret stub param" is now stored using
SP-relative addressing, not FP-relative, if possible (which we generally prefer
in main function bodies).
src/jit/codegencommon.cpp
tests/src/JIT/Regression/JitBlue/GitHub_21990/GitHub_21990.cs [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/GitHub_21990/GitHub_21990.csproj [new file with mode: 0644]