[interp] Reduce register pressure in endfinally.
authorJay Krell <jaykrell@microsoft.com>
Fri, 6 Sep 2019 11:52:45 +0000 (04:52 -0700)
committerLarry Ewing <lewing@microsoft.com>
Wed, 11 Sep 2019 16:19:44 +0000 (11:19 -0500)
Eventually this could contribute to stack savings. On its own, nothing.
The compiler apparently likes to create temporaries, like ip and ip - 1.
Which then have to survive functions calls, on the stack, if nonvolatile registers are exhausted.
This combats that and in a larger PR helped.

Commit migrated from https://github.com/mono/mono/commit/f4c1358ed0c496865c24ee32efa498ace0e8ed5e

src/mono/mono/mini/interp/interp.c

index d3d53f8..13017ef 100644 (file)
@@ -5866,8 +5866,8 @@ main_loop:
                        ip ++;
                        MINT_IN_BREAK;
                MINT_IN_CASE(MINT_ENDFINALLY) {
-                       ip ++;
                        gboolean pending_abort = mono_threads_end_abort_protected_block ();
+                       ip ++;
 
                        // After mono_threads_end_abort_protected_block to conserve stack.
                        const int clause_index = *ip;