The CFI directive said %eax, but it is %ecx that has been saved.

libgcc/ChangeLog:

        * config/i386/cygwin.S: Fix a typo in `___chkstk`.

Signed-off-by: LIU Hao <[email protected]>
---
 libgcc/config/i386/cygwin.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgcc/config/i386/cygwin.S b/libgcc/config/i386/cygwin.S
index d96578bdc45d..12cdad48c820 100644
--- a/libgcc/config/i386/cygwin.S
+++ b/libgcc/config/i386/cygwin.S
@@ -79,7 +79,7 @@ ___chkstk:
 ___chkstk:
 __alloca:
        pushl   %ecx                    /* save temp */
-       cfi_push(%eax)
+       cfi_push(%ecx)
        leal    8(%esp), %ecx           /* point past return addr */
        cmpl    $0x1000, %eax           /* > 4k ?*/
        jb      2f
--
2.56.1

From 1840935b0dc829d3eaf44d832ccb8567c294edb6 Mon Sep 17 00:00:00 2001
From: LIU Hao <[email protected]>
Date: Thu, 12 Nov 2026 20:04:20 +0800
Subject: [PATCH 9102/9102] libgcc/cygwin: Fix a typo in `___chkstk`

The CFI directive said %eax, but it is %ecx that has been saved.

libgcc/ChangeLog:

        * config/i386/cygwin.S: Fix a typo in `___chkstk`.

Signed-off-by: LIU Hao <[email protected]>
---
 libgcc/config/i386/cygwin.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgcc/config/i386/cygwin.S b/libgcc/config/i386/cygwin.S
index d96578bdc45d..12cdad48c820 100644
--- a/libgcc/config/i386/cygwin.S
+++ b/libgcc/config/i386/cygwin.S
@@ -79,7 +79,7 @@ ___chkstk:
 ___chkstk:
 __alloca:
        pushl   %ecx                    /* save temp */
-       cfi_push(%eax)
+       cfi_push(%ecx)
        leal    8(%esp), %ecx           /* point past return addr */
        cmpl    $0x1000, %eax           /* > 4k ?*/
        jb      2f
-- 
2.56.1

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to