Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: libc-alpha@sources.redhat.com
Cc: debian-glibc@lists.debian.org, parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] [PATCH] fix masking error in fesetround() on hppa
Date: Mon, 2 Dec 2002 21:43:58 -0500	[thread overview]
Message-ID: <20021203024358.GA5487@systemhalted> (raw)

[-- 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));
 

             reply	other threads:[~2002-12-03  2:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-03  2:43 Carlos O'Donell [this message]
2002-12-03  2:51 ` [parisc-linux] Re: [PATCH] fix masking error in fesetround() on hppa 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: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:55       ` Grant Grundler
2002-12-04 23:01         ` John David Anglin
2002-12-04 23:01         ` John David Anglin
2002-12-04 22:55       ` Grant Grundler
2002-12-04 22:42     ` John David Anglin
2002-12-04 22:30   ` Jeff Bailey
2002-12-04 22:13 ` [parisc-linux] " John David Anglin
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021203024358.GA5487@systemhalted \
    --to=carlos@baldric.uwo.ca \
    --cc=debian-glibc@lists.debian.org \
    --cc=libc-alpha@sources.redhat.com \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox