On Sun, Apr 16, 2017 at 12:27:51PM +0200, Mark Kettenis wrote:
> We fixed longjmp(), but left _longjmp() alone.  In this case the
> return code is still in w1 so the fix is slightly different.  Makes
> the longjmp regress test pass on arm64.
> 
> ok?

ok jsg@

> 
> 
> Index: lib/libc/arch/aarch64/gen/_setjmp.S
> ===================================================================
> RCS file: /cvs/src/lib/libc/arch/aarch64/gen/_setjmp.S,v
> retrieving revision 1.1
> diff -u -p -r1.1 _setjmp.S
> --- lib/libc/arch/aarch64/gen/_setjmp.S       11 Jan 2017 18:09:24 -0000      
> 1.1
> +++ lib/libc/arch/aarch64/gen/_setjmp.S       16 Apr 2017 10:25:24 -0000
> @@ -91,7 +91,8 @@ ENTRY(_longjmp)
>  #endif
>  
>       /* Load the return value */
> -     mov     x0, x1
> +     cmp     w1, #0
> +     csinc   w0, w1, wzr, ne
>       ret
>  
>  botch:
> 

Reply via email to