scc-patches

scc patches
Log | Files | Refs | README

0004-lib-c-Update-longjmp.s.patch (1043B)


      1 From f0fcc2a26a3c47ee265622d96426bb730cd13be9 Mon Sep 17 00:00:00 2001
      2 From: zerous Naveen Narayanan <zerous@nocebo.space>
      3 Date: Fri, 1 Nov 2019 15:21:47 +0100
      4 Subject: [PATCH 04/11] [lib/c] Update longjmp.s
      5 
      6 ---
      7  src/libc/arch/i386/longjmp.s | 20 +++++++++++---------
      8  1 file changed, 11 insertions(+), 9 deletions(-)
      9 
     10 diff --git a/src/libc/arch/i386/longjmp.s b/src/libc/arch/i386/longjmp.s
     11 index 7dd062c5..77c7f412 100644
     12 --- a/src/libc/arch/i386/longjmp.s
     13 +++ b/src/libc/arch/i386/longjmp.s
     14 @@ -1,19 +1,21 @@
     15  	.file	"longjmp.s"
     16  
     17  	.text
     18 -	.globl	_longjmp
     19 +	.globl	longjmp,_longjmp
     20  _longjmp:
     21 +longjmp:
     22  	mov  	4(%esp),%edx
     23  	mov  	8(%esp),%eax
     24  	test    %eax,%eax
     25  	jnz 	1f
     26  	inc     %eax
     27  1:
     28 -	mov   	(%edx),%ebx
     29 -	mov  	4(%edx),%esi
     30 -	mov  	8(%edx),%edi
     31 -	mov 	12(%edx),%ebp
     32 -	mov 	16(%edx),%ecx
     33 -	mov     %ecx,%esp
     34 -	mov 	20(%edx),%ecx
     35 -	jmp 	*%ecx
     36 +	movl   	(%edx),%ebx
     37 +	movl  	4(%edx),%ecx
     38 +	movl 	8(%edx),%esi
     39 +	movl 	12(%edx),%edi
     40 +	movl	16(%edx),%ebp
     41 +	movl	20(%edx),%esp
     42 +	pushl   24(%edx)
     43 +	popl	%edx
     44 +	jmp 	*%edx
     45 -- 
     46 2.23.0
     47