RyuJIT/x86: add support for EH
authorBruce Forstall <brucefo@microsoft.com>
Fri, 1 Jul 2016 23:55:01 +0000 (16:55 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Fri, 1 Jul 2016 23:57:25 +0000 (16:57 -0700)
commit0f22b1348d4f92e9d3afc450dfadcb82cdf99ffc
treee395aed6854ef147b2f70ec7cba3cc5c5a2dce6f
parent7bebb651b00fd43d1b34ab5a5eaad2e5561e6c50
RyuJIT/x86: add support for EH

This change implements the necessary x86 support in RyuJIT for exception handling.
It removes the EH-related NYI. The number of NYI fallbacks in an x86 test run drops
by about 13000. There are 10 new asserts which are now suppressed: 6 appear to be
new and 4 are new instances of existing known asserts.

The various changes are:
1. Implement code generation for BBJ_CALLFINALLY/BBJ_ALWAYS blocks for invoking a finally.
This requires appropriately modifying the ShadowSP slot structure before the call.
2. Implement BBJ_EHFINALLYRET/BBJ_EHFILTERRET control transfer. The related GT_RETFILT
code was already implemented.
3. Implement GT_END_LFIN for handling return-from-finally cleanup, namely, clearing the
appropriate slot in the ShadowSP structure.

Commit migrated from https://github.com/dotnet/coreclr/commit/239856a9e4ea33d94e15a9822bbd070e425c3b85
src/coreclr/src/jit/codegenxarch.cpp
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/lowerxarch.cpp
src/coreclr/tests/issues.targets