All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] [PATCH] fix masking error in fesetround() on hppa
@ 2002-12-03  2:43 Carlos O'Donell
  2002-12-03  2:51 ` [parisc-linux] " Roland McGrath
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Carlos O'Donell @ 2002-12-03  2:43 UTC (permalink / raw)
  To: libc-alpha; +Cc: debian-glibc, parisc-linux

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


libc-alpha,

Thanks to HP's testdrive users, we found and fixed a small masking bug
in fesetround(). Should use ~FE_DOWNWARD since this is the rounding mask
set to all ones, and will clear the mask before or'ing the round value.

It was suggested that a test case could be made of this, where glibc
tries to set and get various combinations of FE_DOWNWARD, FE_UPWARD,
FE_TONEAREST, and FE_UPWARD. I could provide such a testcase if it was
deemed usefull. 

c.

---

2002-12-02  Carlos O'Donell  <carlos@baldric.uwo.ca>

	* sysdeps/hppa/fpu/fesetround.c: 
	(fesetround): Use ~FE_DOWNWARD so both bits of RM are cleared.

[-- Attachment #2: 03-glibc23-hppa-fesetround --]
[-- Type: text/plain, Size: 396 bytes --]

--- glibc-2.3.1/sysdeps/hppa/fpu/fesetround.c	2002-12-02 16:36:36.000000000 -0500
+++ glibc-2.3.1/sysdeps/hppa/fpu/fesetround.c	2002-12-02 16:36:59.000000000 -0500
@@ -31,7 +31,7 @@
 
   /* Get the current status word. */
   __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
-  sw[0] &= ~FE_UPWARD;
+  sw[0] &= ~FE_DOWNWARD;
   sw[0] |= round;
   __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
 

^ permalink raw reply	[flat|nested] 18+ messages in thread
* [parisc-linux] [PATCH] fix masking error in fesetround() on hppa
@ 2002-12-03  2:43 Carlos O'Donell
  0 siblings, 0 replies; 18+ messages in thread
From: Carlos O'Donell @ 2002-12-03  2:43 UTC (permalink / raw)
  To: libc-alpha; +Cc: debian-glibc, parisc-linux

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


libc-alpha,

Thanks to HP's testdrive users, we found and fixed a small masking bug
in fesetround(). Should use ~FE_DOWNWARD since this is the rounding mask
set to all ones, and will clear the mask before or'ing the round value.

It was suggested that a test case could be made of this, where glibc
tries to set and get various combinations of FE_DOWNWARD, FE_UPWARD,
FE_TONEAREST, and FE_UPWARD. I could provide such a testcase if it was
deemed usefull. 

c.

---

2002-12-02  Carlos O'Donell  <carlos@baldric.uwo.ca>

	* sysdeps/hppa/fpu/fesetround.c: 
	(fesetround): Use ~FE_DOWNWARD so both bits of RM are cleared.

[-- Attachment #2: 03-glibc23-hppa-fesetround --]
[-- Type: text/plain, Size: 396 bytes --]

--- glibc-2.3.1/sysdeps/hppa/fpu/fesetround.c	2002-12-02 16:36:36.000000000 -0500
+++ glibc-2.3.1/sysdeps/hppa/fpu/fesetround.c	2002-12-02 16:36:59.000000000 -0500
@@ -31,7 +31,7 @@
 
   /* Get the current status word. */
   __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
-  sw[0] &= ~FE_UPWARD;
+  sw[0] &= ~FE_DOWNWARD;
   sw[0] |= round;
   __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
 

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

end of thread, other threads:[~2002-12-04 23:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-03  2:43 [parisc-linux] [PATCH] fix masking error in fesetround() on hppa Carlos O'Donell
2002-12-03  2:51 ` [parisc-linux] " Roland McGrath
2002-12-03  2:51 ` Roland McGrath
2002-12-04 22:13 ` [parisc-linux] FATAL: kernel too old John David Anglin
2002-12-04 22:13 ` John David Anglin
2002-12-04 22:17   ` [parisc-linux] " Roland McGrath
2002-12-04 22:17   ` Roland McGrath
2002-12-04 22:25   ` [parisc-linux] " M. Grabert
2002-12-04 22:25   ` M. Grabert
2002-12-04 22:30   ` [parisc-linux] " Jeff Bailey
2002-12-04 22:42     ` John David Anglin
2002-12-04 22:42     ` John David Anglin
2002-12-04 22:55       ` Grant Grundler
2002-12-04 22:55       ` Grant Grundler
2002-12-04 23:01         ` John David Anglin
2002-12-04 23:01         ` John David Anglin
2002-12-04 22:30   ` Jeff Bailey
  -- strict thread matches above, loose matches on Subject: below --
2002-12-03  2:43 [parisc-linux] [PATCH] fix masking error in fesetround() on hppa Carlos O'Donell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.