Skip to content

Commit ca81f02

Browse files
committed
Prologue fix
1 parent ceb3bfe commit ca81f02

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

winsup/cygwin/scripts/gendef

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,11 @@ _ZN7_cygtls6lockedEv:
442442
443443
.seh_proc stabilize_sig_stack
444444
stabilize_sig_stack:
445+
// prologue
445446
stp fp, lr, [sp, #-16]! // save FP and LR registers
447+
mov fp, sp // set FP to current SP
446448
sub sp, sp, #32 // allocate 32 bytes on stack
449+
447450
.seh_stackalloc 32
448451
.seh_endprologue
449452
ldr x10, [x18, #0x8] // get thread local storage pointer
@@ -499,6 +502,8 @@ stabilize_sig_stack:
499502
500503
add sp, sp, #32 // restore stack
501504
mov x1, x10 // return TLS address in x0 (return value)
505+
506+
// epilogue
502507
ldp fp, lr, [sp], #16 // restore saved FP and LR registers
503508
ret
504509
.seh_endproc
@@ -653,8 +658,11 @@ sigsetjmp:
653658
.globl setjmp
654659
.seh_proc setjmp
655660
setjmp:
661+
// prologue
656662
stp fp, lr, [sp, #-16]! // save FP and LR registers
663+
mov fp, sp // set FP to current SP
657664
sub sp, sp, #32 // allocate 32 bytes on stack
665+
658666
.seh_stackalloc 32
659667
.seh_endprologue
660668
stp x19, x20, [x0, #0x08] // save x19 and x20 to jmp_buf
@@ -692,6 +700,8 @@ setjmp:
692700
693701
add sp, sp, #32 // restore stack
694702
mov w0, #0 // return 0
703+
704+
// epilogue
695705
ldp fp, lr, [sp], #16 // restore saved FP and LR registers
696706
ret
697707
.seh_endproc

0 commit comments

Comments
 (0)