From: Billy Laws <[email protected]>

Calls to this are synthesized by the linker where it is used for calling
into import libraries, this is referred to as an 'Adjustor Thunk' in
ARM64EC documentation.
---
 mingw-w64-crt/crt/chpe.S | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/mingw-w64-crt/crt/chpe.S b/mingw-w64-crt/crt/chpe.S
index 8311da132..20d962231 100644
--- a/mingw-w64-crt/crt/chpe.S
+++ b/mingw-w64-crt/crt/chpe.S
@@ -83,3 +83,26 @@ EXPORT_SYM(__chpe_metadata)
        .rva  __os_arm64x_helper6
        .rva  __os_arm64x_helper7
        .rva  __os_arm64x_helper8
+
+/*
+ * Calls to this are synthesized by the linker when calling into import 
libraries,
+ * this is referred to as an 'Adjustor Thunk' in ARM64EC documentation.
+*/
+        .text
+        .balign 16
+EXPORT_SYM(__icall_helper_arm64ec)
+       .seh_proc "__icall_helper_arm64ec"
+        stp    fp, lr, [sp, #-16]!
+       .seh_save_fplr_x 16
+       mov     fp, sp
+       .seh_set_fp
+       .seh_endprologue
+       adrp    x16, __os_arm64x_check_icall
+       ldr     x16, [x16, #:lo12:__os_arm64x_check_icall]
+       blr     x16
+       .seh_startepilogue
+       ldp     fp, lr, [sp], #16
+       .seh_save_fplr_x 16
+       .seh_endepilogue
+       br      x11
+       .seh_endproc
-- 
2.49.0



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to