From af8e3eb3fbe503da9645692df97b22e130470009 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Wed, 13 Mar 2024 21:27:41 +0100 Subject: [PATCH 1/2] NativeAOT/win-x86: Enable FEATURE_EH_CALLFINALLY_THUNKS --- src/coreclr/jit/targetx86.h | 5 +++++ .../JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj | 1 + 2 files changed, 6 insertions(+) diff --git a/src/coreclr/jit/targetx86.h b/src/coreclr/jit/targetx86.h index 60b2f7793f435b..08a4ab996bd1bf 100644 --- a/src/coreclr/jit/targetx86.h +++ b/src/coreclr/jit/targetx86.h @@ -54,8 +54,13 @@ #define FEATURE_EH 1 // To aid platform bring-up, eliminate exceptional EH clauses (catch, filter, // filter-handler, fault) and directly execute 'finally' clauses. +#ifdef FEATURE_EH_FUNCLETS + #define FEATURE_EH_CALLFINALLY_THUNKS 1 // Generate call-to-finally code in "thunks" in the enclosing EH region, + // protected by "cloned finally" clauses. +#else #define FEATURE_EH_CALLFINALLY_THUNKS 0 // Generate call-to-finally code in "thunks" in the enclosing EH region, // protected by "cloned finally" clauses. +#endif #define ETW_EBP_FRAMED 1 // if 1 we cannot use EBP as a scratch register and must create EBP based // frames for most methods #define CSE_CONSTS 1 // Enable if we want to CSE constants diff --git a/src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj b/src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj index e8b608b208fd80..4b12ebe2683932 100644 --- a/src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj +++ b/src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj @@ -2,6 +2,7 @@ PdbOnly True + true From 76007cbb73cb9eb4992b1d3872213634006e0bde Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Wed, 13 Mar 2024 21:30:02 +0100 Subject: [PATCH 2/2] Update src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj --- src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj b/src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj index 4b12ebe2683932..e8b608b208fd80 100644 --- a/src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj +++ b/src/tests/JIT/jit64/eh/basics/throwinfinallyintryfilter2.ilproj @@ -2,7 +2,6 @@ PdbOnly True - true