diff options
author | Carlos O'Donell <carlos@systemhalted.org> | 2013-05-15 11:47:47 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@systemhalted.org> | 2013-05-15 12:05:10 -0400 |
commit | b7f7d28b61a806f02e1f4cea81213027c088be8b (patch) | |
tree | a4d7b1c56605fd6ba907f9eb46d771ee82acbc36 /ports | |
parent | 7abeee129ef9872abd8e2fe0f94b1ad31f4ac591 (diff) | |
download | glibc-b7f7d28b61a806f02e1f4cea81213027c088be8b.zip glibc-b7f7d28b61a806f02e1f4cea81213027c088be8b.tar.gz glibc-b7f7d28b61a806f02e1f4cea81213027c088be8b.tar.bz2 |
hppa: Fix _FPU_GETCW and _FPU_SETCW.
The following patch fixes both _FPU_GETCW and
_FPU_SETCW for hppa. The initial implementation was
flawed and not well tested. We failed to set cw,
and passed in the value of a register to fldd.
This patch fixes both of those errors and allows
the libm tests to pass without failure.
Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Signed-off-by: Carlos O'Donell <carlos@redhat.com>
---
2013-05-15 Guy Martin <gmsoft@tuxicoman.be>
Carlos O'Donell <carlos@redhat.com>
[BZ# 15000]
* ports/sysdeps/hppa/fpu/fpu_control.h (_FPU_GETCW): Set cw.
(_FPU_SETCW): Pass address to fldd.
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ChangeLog.hppa | 7 | ||||
-rw-r--r-- | ports/sysdeps/hppa/fpu/fpu_control.h | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa index 6aa0e91..64bf760 100644 --- a/ports/ChangeLog.hppa +++ b/ports/ChangeLog.hppa @@ -1,3 +1,10 @@ +2013-05-15 Guy Martin <gmsoft@tuxicoman.be> + Carlos O'Donell <carlos@redhat.com> + + [BZ# 15000] + * ports/sysdeps/hppa/fpu/fpu_control.h (_FPU_GETCW): Set cw. + (_FPU_SETCW): Pass address to fldd. + 2013-04-02 Thomas Schwinge <thomas@codesourcery.com> * sysdeps/hppa/math_private.h: New file. diff --git a/ports/sysdeps/hppa/fpu/fpu_control.h b/ports/sysdeps/hppa/fpu/fpu_control.h index 5cac334..627cdd5 100644 --- a/ports/sysdeps/hppa/fpu/fpu_control.h +++ b/ports/sysdeps/hppa/fpu/fpu_control.h @@ -49,7 +49,7 @@ typedef unsigned int fpu_control_t; __asm__ ("fstd %%fr0,0(%1)\n\t" \ "fldd 0(%1),%%fr0\n\t" \ : "=m" (__fullfp.__fpreg) : "r" (&__fullfp.__fpreg) : "%r0"); \ - __fullfp.__halfreg[0]; \ + cw = __fullfp.__halfreg[0]; \ }) #define _FPU_SETCW(cw) \ @@ -57,7 +57,7 @@ typedef unsigned int fpu_control_t; union { __extension__ unsigned long long __fpreg; unsigned int __halfreg[2]; } __fullfp; \ __fullfp.__halfreg[0] = cw; \ __asm__ ("fldd 0(%1),%%fr0\n\t" \ - : : "m" (__fullfp.__fpreg), "r" (__fullfp.__fpreg) : "%r0" ); \ + : : "m" (__fullfp.__fpreg), "r" (&__fullfp.__fpreg) : "%r0" ); \ }) /* Default control word set at startup. */ |