Skip to contentSkip to conversation

fix masking error in fesetround() on hppa

PATCH In review Carlos O'Donell 6 participants 17 messages Dec 3, 2002 – Dec 4, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix masking error in fesetround() on hppa

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 <[email protected]>

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

sysdeps/hppa/fpu/fesetround.c +1 -1
@@ -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));
 
#1 lore raw

I've put that fix in. I'm not quite sure what you are suggesting for a new test, but test cases that fail on known bug regressions (i.e. one that fails before your fix and works after it) are always welcome.

Thanks,
Roland

#2 lore raw
In reply to Carlos O'Donell

I've put that fix in. I'm not quite sure what you are suggesting for a new test, but test cases that fail on known bug regressions (i.e. one that fails before your fix and works after it) are always welcome.

Thanks,
Roland

#3 lore raw

[parisc-linux] FATAL: kernel too old

In reply to Carlos O'Donell

I'm getting the following error building glibc-2.3.1-5:

CPP='/home/dave/opt/gnu/bin/gcc -E -x c-header' /home/dave/glibc-2.3.1-5/glibc- 2.3.1/objdir/elf/ld.so.1 --library-path /home/dave/glibc-2.3.1-5/glibc-2.3.1/obj dir:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/math:/home/dave/glibc-2.3.1-5/gl ibc-2.3.1/objdir/elf:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/dlfcn:/home/dav e/glibc-2.3.1-5/glibc-2.3.1/objdir/nss:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objd ir/nis:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/rt:/home/dave/glibc-2.3.1-5/g libc-2.3.1/objdir/resolv:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/crypt:/home /dave/glibc-2.3.1-5/glibc-2.3.1/objdir/linuxthreads /home/dave/glibc-2.3.1-5/gli bc-2.3.1/objdir/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /home/ dave/glibc-2.3.1-5/glibc-2.3.1/objdir/sunrpc/xbootparam_prot.T
FATAL: kernel too old
make[2]: *** [/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/sunrpc/xbootparam_prot .stmp] Error 1

Is 2.4.18-pa52 really too old?

I configured with

../glibc/configure --build=hppa-linux --host=hppa-linux --target=hppa-linux --prefix=/home/dave/opt/gnu --disable-profile --without-cvs --enable-add-ons --enable-hacker-mode --enable-kernel=2.4.8

Oh, I noticed that hppa-linux is not listed in INSTALL or README.

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
#4 lore raw

[parisc-linux] FATAL: kernel too old

In reply to Carlos O'Donell

I'm getting the following error building glibc-2.3.1-5:

CPP='/home/dave/opt/gnu/bin/gcc -E -x c-header' /home/dave/glibc-2.3.1-5/glibc- 2.3.1/objdir/elf/ld.so.1 --library-path /home/dave/glibc-2.3.1-5/glibc-2.3.1/obj dir:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/math:/home/dave/glibc-2.3.1-5/gl ibc-2.3.1/objdir/elf:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/dlfcn:/home/dav e/glibc-2.3.1-5/glibc-2.3.1/objdir/nss:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objd ir/nis:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/rt:/home/dave/glibc-2.3.1-5/g libc-2.3.1/objdir/resolv:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/crypt:/home /dave/glibc-2.3.1-5/glibc-2.3.1/objdir/linuxthreads /home/dave/glibc-2.3.1-5/gli bc-2.3.1/objdir/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /home/ dave/glibc-2.3.1-5/glibc-2.3.1/objdir/sunrpc/xbootparam_prot.T
FATAL: kernel too old
make[2]: *** [/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/sunrpc/xbootparam_prot .stmp] Error 1

Is 2.4.18-pa52 really too old?

I configured with

../glibc/configure --build=hppa-linux --host=hppa-linux --target=hppa-linux --prefix=/home/dave/opt/gnu --disable-profile --without-cvs --enable-add-ons --enable-hacker-mode --enable-kernel=2.4.8

Oh, I noticed that hppa-linux is not listed in INSTALL or README.

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
#5 lore raw

[parisc-linux] Re: FATAL: kernel too old

Check that _dl_osversion (_rtld_global._dl_osversion) is getting initialized.

#7 lore raw

Re: [parisc-linux] FATAL: kernel too old

In reply to John David Anglin
Quoted 16 lines · John David Anglin

I'm getting the following error building glibc-2.3.1-5:

CPP='/home/dave/opt/gnu/bin/gcc -E -x c-header' /home/dave/glibc-2.3.1-5/glibc- 2.3.1/objdir/elf/ld.so.1 --library-path /home/dave/glibc-2.3.1-5/glibc-2.3.1/obj dir:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/math:/home/dave/glibc-2.3.1-5/gl ibc-2.3.1/objdir/elf:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/dlfcn:/home/dav e/glibc-2.3.1-5/glibc-2.3.1/objdir/nss:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objd ir/nis:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/rt:/home/dave/glibc-2.3.1-5/g libc-2.3.1/objdir/resolv:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/crypt:/home /dave/glibc-2.3.1-5/glibc-2.3.1/objdir/linuxthreads /home/dave/glibc-2.3.1-5/gli bc-2.3.1/objdir/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /home/ dave/glibc-2.3.1-5/glibc-2.3.1/objdir/sunrpc/xbootparam_prot.T
FATAL: kernel too old
make[2]: *** [/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/sunrpc/xbootparam_prot .stmp] Error 1

Quoted 7 lines

Is 2.4.18-pa52 really too old?

I configured with

../glibc/configure --build=hppa-linux --host=hppa-linux --target=hppa-linux --prefix=/home/dave/opt/gnu --disable-profile --without-cvs --enable-add-ons --enable-hacker-mode --enable-kernel=2.4.8

                                                        ^^^^^

2.4.8 ? Not 2.4.18? But I don't know whether this make a difference!?

BTW, wasn't there a option for --with-kernel-headers= ? Perhaps the kernel headers weren't picked up properly ...

greetings max

#8 lore raw

Re: [parisc-linux] FATAL: kernel too old

In reply to John David Anglin
Quoted 16 lines · John David Anglin

I'm getting the following error building glibc-2.3.1-5:

CPP='/home/dave/opt/gnu/bin/gcc -E -x c-header' /home/dave/glibc-2.3.1-5/glibc- 2.3.1/objdir/elf/ld.so.1 --library-path /home/dave/glibc-2.3.1-5/glibc-2.3.1/obj dir:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/math:/home/dave/glibc-2.3.1-5/gl ibc-2.3.1/objdir/elf:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/dlfcn:/home/dav e/glibc-2.3.1-5/glibc-2.3.1/objdir/nss:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objd ir/nis:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/rt:/home/dave/glibc-2.3.1-5/g libc-2.3.1/objdir/resolv:/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/crypt:/home /dave/glibc-2.3.1-5/glibc-2.3.1/objdir/linuxthreads /home/dave/glibc-2.3.1-5/gli bc-2.3.1/objdir/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /home/ dave/glibc-2.3.1-5/glibc-2.3.1/objdir/sunrpc/xbootparam_prot.T
FATAL: kernel too old
make[2]: *** [/home/dave/glibc-2.3.1-5/glibc-2.3.1/objdir/sunrpc/xbootparam_prot .stmp] Error 1

Quoted 7 lines

Is 2.4.18-pa52 really too old?

I configured with

../glibc/configure --build=hppa-linux --host=hppa-linux --target=hppa-linux --prefix=/home/dave/opt/gnu --disable-profile --without-cvs --enable-add-ons --enable-hacker-mode --enable-kernel=2.4.8

                                                        ^^^^^

2.4.8 ? Not 2.4.18? But I don't know whether this make a difference!?

BTW, wasn't there a option for --with-kernel-headers= ? Perhaps the kernel headers weren't picked up properly ...

greetings max

#11 lore raw

Re: [parisc-linux] Re: FATAL: kernel too old

Quoted 5 lines · John David Anglin
Quoted 2 lines

Is 2.4.18-pa52 really too old?

Yes. hppa-linux requires 2.4.19

Ok, I try one of the other builds but none so far have been particularly stable on a rp2470c.

Thanks,
Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
#12 lore raw

Re: [parisc-linux] Re: FATAL: kernel too old

In reply to Jeff Bailey
Quoted 5 lines · John David Anglin
Quoted 2 lines

Is 2.4.18-pa52 really too old?

Yes. hppa-linux requires 2.4.19

Ok, I try one of the other builds but none so far have been particularly stable on a rp2470c.

Thanks,
Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
#13 lore raw

Re: [parisc-linux] Re: FATAL: kernel too old

Quoted 2 lines · John David Anglin

Ok, I try one of the other builds but none so far have been particularly stable on a rp2470c.

Dave,
I can build a UP 2.4.20 for the rp2470 and see how that fairs. SMP has in fact not been especially stable for the 2.4.19 hppa releases.

thanks,
grant

#14 lore raw

Re: [parisc-linux] Re: FATAL: kernel too old

Quoted 3 lines

Dave,
I can build a UP 2.4.20 for the rp2470 and see how that fairs. SMP has in fact not been especially stable for the 2.4.19 hppa releases.

That would be great. I was going to try vmlinux-2.4.20-rc1-pa7 after the gcc testsuite run that is in progress completes. I seem to recall that vmlinux-2.4.20-rc1-pa7 wasn't very stable, so it would be nice to find something later than 2.4.18 that works reasonably reliably.

I was trying to get a feel whether of not the current gcc mainline would successfully build the latest glibc.

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
#15 lore raw

Re: [parisc-linux] Re: FATAL: kernel too old

In reply to Grant Grundler
Quoted 3 lines

Dave,
I can build a UP 2.4.20 for the rp2470 and see how that fairs. SMP has in fact not been especially stable for the 2.4.19 hppa releases.

That would be great. I was going to try vmlinux-2.4.20-rc1-pa7 after the gcc testsuite run that is in progress completes. I seem to recall that vmlinux-2.4.20-rc1-pa7 wasn't very stable, so it would be nice to find something later than 2.4.18 that works reasonably reliably.

I was trying to get a feel whether of not the current gcc mainline would successfully build the latest glibc.

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
#16 lore raw

Re: [parisc-linux] Re: FATAL: kernel too old

In reply to John David Anglin
Quoted 2 lines · John David Anglin

Ok, I try one of the other builds but none so far have been particularly stable on a rp2470c.

Dave,
I can build a UP 2.4.20 for the rp2470 and see how that fairs. SMP has in fact not been especially stable for the 2.4.19 hppa releases.

thanks,
grant