This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug ports/7001] New: setjmp/longjmp do not save/restore correct FPU registers in N32 ABI mode
- From: "n-redhat-glibc at nsd dot dyndns dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 1 Nov 2008 10:10:10 -0000
- Subject: [Bug ports/7001] New: setjmp/longjmp do not save/restore correct FPU registers in N32 ABI mode
- Reply-to: sourceware-bugzilla at sourceware dot org
In the files
glibc/ports/sysdeps/mips/mips64/setjmp_aux.c
glibc/ports/sysdeps/mips/mips64/__longjmp.c
the innermost #if checks look like this:
#if _MIPS_SIM == _ABI64
[ save/restore f24, f25, ... f31 ]
#else
[ save/restore f20,, f22, ... f30 ] (Even registers only b/c on 32-bit CPUs
the registers are paired even/odd to hold double precision FP numbers)
#endif
Thus in _ABIN32 (64-bit CPU using 32-bit pointers) the 32-bit CPU code is
selected, which fails to save or restore any odd numbered registers. The N32 ABI
defines f24-f31 as callee-saved, same as _ABI64 does.
One fix would be to change the tests from
- #if _MIPS_SIM == _ABI64
+ #if _MIPS_SIM != _ABIO32
This is present in at least glibc-ports-2.7 (where we discovered it), 2.8 and in
CVS HEAD.
-Nicolas Dade
--
Summary: setjmp/longjmp do not save/restore correct FPU registers
in N32 ABI mode
Product: glibc
Version: 2.8
Status: NEW
Severity: normal
Priority: P2
Component: ports
AssignedTo: roland at gnu dot org
ReportedBy: n-redhat-glibc at nsd dot dyndns dot org
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-unknown-linux-gnu
GCC host triplet: mips64-unknown-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=7001
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.