From 5d8c07b3f29fc508b92a15b67307020751b044fa Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 2 Aug 2006 12:03:02 +0000 Subject: [PATCH] Fix by Joren for setjmp to not clobber %ebx. --- lib/gnu/rts/_setjmp.gs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/gnu/rts/_setjmp.gs b/lib/gnu/rts/_setjmp.gs index 60b86cab4..e9e76034f 100644 --- a/lib/gnu/rts/_setjmp.gs +++ b/lib/gnu/rts/_setjmp.gs @@ -11,7 +11,6 @@ ___setjmp: movl %ebx, 8(%eax) # save program counter movl %esp, 12(%eax) # save stack pointer movl %ebp, 16(%eax) # save frame pointer - movl 20(%eax), %ebx # restore ebx movl %ecx, 24(%eax) movl %edx, 28(%eax) movl %esi, 32(%eax) @@ -19,6 +18,9 @@ ___setjmp: movl 8(%esp), %ebx # save mask? movl %ebx, 0(%eax) # save whether to restore mask + + pushl 20(%eax) # save ebx + testl %ebx, %ebx jz 1f leal 4(%eax), %ebx # pointer to sigset_t @@ -26,6 +28,7 @@ ___setjmp: call ___newsigset # save mask addl $4, %esp 1: + popl %ebx movl $0, %eax ret -- 2.44.0