On Sat, Mar 18, 2017 at 03:47:18PM +0100, Mark Kettenis wrote:
> Just like we did on other architectures.
> 
> ok?

guenther@ had the same diff (but he also removed the movn x1), which
looked good to me as well.  Basically still ok patrick@. ;)

> 
> 
> Index: lib/libc/arch/aarch64/sys/cerror.S
> ===================================================================
> RCS file: /cvs/src/lib/libc/arch/aarch64/sys/cerror.S,v
> retrieving revision 1.2
> diff -u -p -r1.2 cerror.S
> --- lib/libc/arch/aarch64/sys/cerror.S        25 Jan 2017 10:43:37 -0000      
> 1.2
> +++ lib/libc/arch/aarch64/sys/cerror.S        18 Mar 2017 14:45:58 -0000
> @@ -28,17 +28,13 @@
>  
>  #include "SYS.h"
>  
> +/* offsetof(struct tib, tib_errno) - offsetof(struct tib, __tib_tcb) */
> +#define TCB_OFFSET_ERRNO     (-12)
> +
>  _ENTRY(CERROR)
> -     stp     x0, x30, [sp,#-16]!
> -     bl      _C_LABEL(__errno)
> -     ldp     x1, x30, [sp],#16
> -     str     w1, [x0]
> +     mrs     x1, tpidr_el0
> +     str     w0, [x1, #TCB_OFFSET_ERRNO]
>       movn    x0, #0
>       movn    x1, #0
>       ret
>  END(CERROR)
> -
> -#if !defined(__PIC__)
> -.Lerrno:
> -     .word   errno
> -#endif
> 

Reply via email to