public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [AARCH64] Fix syscall setting of errno on bigendian
@ 2013-09-11 21:19 Andrew Pinski
  2013-09-26 17:56 ` pinskia
  2013-09-30 10:00 ` Marcus Shawcroft
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Pinski @ 2013-09-11 21:19 UTC (permalink / raw)
  To: libc-ports

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

Hi,
  When we (Cavium) has been testing aarch64 on bigendian, we noticed
that errno sometimes was not being set correctly.  The problem is that
the store to errno was being a 64bit rather than the correct 32bit so
the value that was being loaded later on from errno was just 0.

OK?  Build and tested on aarch64-linux-gnu and aarch64_be-linux-gnu
without any regressions.

Thanks,ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h
Andrew Pinski

ChangeLog:
* sysdeps/unix/sysv/linux/aarch64/sysdep.h (SYSCALL_ERROR_HANDLER):
Fix store to errno to use 32bits.

PS I don't have git write access.

[-- Attachment #2: fixbigendian-aarch64errno.diff.txt --]
[-- Type: text/plain, Size: 540 bytes --]

diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index 849c904..9a7b167 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -134,7 +134,7 @@ __local_syscall_error:						\
         str     x19, [sp,16];					\
 	neg	x19, x0;					\
 	bl	C_SYMBOL_NAME(__errno_location);		\
-	str	x19, [x0];					\
+	str	w19, [x0];					\
 	mov	x0, -1;						\
         ldr     x19, [sp,16];					\
         ldp     x29, x30, [sp], 32;				\

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-30 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-11 21:19 [AARCH64] Fix syscall setting of errno on bigendian Andrew Pinski
2013-09-26 17:56 ` pinskia
2013-09-30 10:00 ` Marcus Shawcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).