From: Ben Gras Date: Wed, 2 Aug 2006 12:03:02 +0000 (+0000) Subject: Fix by Joren for setjmp to not clobber %ebx. X-Git-Tag: v3.1.3~218 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/syslog.conf.5.html?a=commitdiff_plain;h=5d8c07b3f29fc508b92a15b67307020751b044fa;p=minix.git Fix by Joren for setjmp to not clobber %ebx. --- 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