about summary refs log tree commit diff
path: root/ports/sysdeps/unix
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-12-30 09:40:38 +0000
committerMike Frysinger <vapier@gentoo.org>2013-12-30 10:02:49 -0500
commite646a161cef3069fe1a6c92b750a87350630c62d (patch)
treeb9ca2b9348e025a17eff2d2f590819f25e3302d6 /ports/sysdeps/unix
parent030a4976b81de991f53d0d3c4d049f7903bd407c (diff)
downloadglibc-e646a161cef3069fe1a6c92b750a87350630c62d.tar.gz
glibc-e646a161cef3069fe1a6c92b750a87350630c62d.tar.xz
glibc-e646a161cef3069fe1a6c92b750a87350630c62d.zip
ia64: setjmp/longjmp: stop saving/restoring fpsr [BZ #16379]
The new tst-setjmp-fp test has been failing on IA64 because the setjmp
and longjmp helpers take care of saving/restoring the fpsr register.
Per the C standards, this is incorrect, so disable that logic.

URL: https://sourceware.org/bugzilla/show_bug.cgi?id=16379
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ports/sysdeps/unix')
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/setjmp.S8
3 files changed, 10 insertions, 10 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S
index 8a70ae2c2a..4860a8caef 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S
+++ b/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S
@@ -82,12 +82,12 @@ LEAF(__longjmp)
 #ifdef CHECK_RSP
 	CHECK_RSP (r28)
 #endif
-	ld8.fill.nta gp=[r3],16		// r1 (gp)
+	ld8.fill.nta gp=[r3],32		// r1 (gp)
 	dep r11=-1,r23,3,6	// r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp)
 	mov sp=r28		// r12 (sp)
 	;;
 	ld8.nta r16=[r2],16		// caller's unat
-	ld8.nta r17=[r3],16		// fpsr
+//	ld8.nta r17=[r3],16		// fpsr
 	;;
 	ld8.fill.nta r4=[r2],16	// r4
 	ld8.fill.nta r5=[r3],16		// r5 (gp)
@@ -97,7 +97,7 @@ LEAF(__longjmp)
 	ld8.fill.nta r7=[r3],16		// r7
 	;;
 	mov ar.unat=r16			// restore caller's unat
-	mov ar.fpsr=r17			// restore fpsr
+//	mov ar.fpsr=r17			// restore fpsr
 	;;
 	ld8.nta r16=[r2],16		// b0
 	ld8.nta r17=[r3],16		// b1
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S
index 41cc303c29..db61a2c58d 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S
+++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S
@@ -75,11 +75,11 @@ LEAF(__ia64_longjmp)
 	mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12)
 	;;
 	ld8.fill.nta sp=[r2],16	// r12 (sp)
-	ld8.fill.nta gp=[r3],16 // r1 (gp)
+	ld8.fill.nta gp=[r3],32 // r1 (gp)
 	dep r11=-1,r23,3,6	// r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp)
 	;;
 	ld8.nta r16=[r2],16		// caller's unat
-	ld8.nta r17=[r3],16		// fpsr
+//	ld8.nta r17=[r3],16		// fpsr
 	;;
 	ld8.fill.nta r4=[r2],16		// r4
 	ld8.fill.nta r5=[r3],16		// r5 (gp)
@@ -88,7 +88,7 @@ LEAF(__ia64_longjmp)
 	ld8.fill.nta r7=[r3],16		// r7
 	;;
 	mov ar.unat=r16			// restore caller's unat
-	mov ar.fpsr=r17			// restore fpsr
+//	mov ar.fpsr=r17			// restore fpsr
 	;;
 	ld8.nta r16=[r2],16		// b0
 	ld8.nta r17=[r3],16		// b1
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S
index bf1b980f4e..1be53cca4d 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S
+++ b/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S
@@ -25,7 +25,7 @@
   	0x000	stack pointer (r12)	; unchangeable (see _JMPBUF_UNWINDS)
   	0x008	r1 (gp)
 	0x010	caller's unat
-	0x018	fpsr
+	0x018	fpsr			; disabled per the C standard; BZ 16379
   	0x020	r4
   	0x028	r5
   	0x030	r6
@@ -89,15 +89,15 @@ ENTRY(__sigsetjmp)
 	.save ar.unat, loc2
 	mov loc2=ar.unat
 	;;
-	mov r17=ar.fpsr
+//	mov r17=ar.fpsr
 	mov r2=in0
 	add r3=8,in0
 	;;
 .mem.offset 8,0;	st8.spill.nta [r2]=sp,16	// r12 (sp)
-.mem.offset 0,0;	st8.spill.nta [r3]=gp,16	// r1 (gp)
+.mem.offset 0,0;	st8.spill.nta [r3]=gp,32	// r1 (gp)
 	;;
 	st8.nta [r2]=loc2,16		// save caller's unat
-	st8.nta [r3]=r17,16		// save fpsr
+//	st8.nta [r3]=r17,16		// save fpsr
 	add r8=0xa0,in0
 	;;
 .mem.offset 8,0;	st8.spill.nta [r2]=r4,16	// r4