This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix mmap64 for PPC


Hi,

the recent optimization of mmap64.c for PPC is broken, the attached patch  
fixes that.

Additionally there are new problems with test-float and test-ifloat:

testing float (without inline functions)
Failure: Test: atan2 (0.7, -1.0) == 2.530866689200584621918884506789267
Result:
 is:          2.53086590766906738281e+00   0x1.43f36a00000000000000p+1
 should be:   2.53086662292480468750e+00   0x1.43f37000000000000000p+1
 difference:  7.15255737304687500000e-07   0x1.80000000000000000000p-21
 ulp       :  3.0000
 max.ulp   :  0.0000
Failure: Test: atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267
Result:
 is:         -2.53086590766906738281e+00  -0x1.43f36a00000000000000p+1
 should be:  -2.53086662292480468750e+00  -0x1.43f37000000000000000p+1
 difference:  7.15255737304687500000e-07   0x1.80000000000000000000p-21
 ulp       :  3.0000
 max.ulp   :  0.0000
Failure: Test: atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736
Result:
 is:          2.15714788436889648438e+00   0x1.141d6c00000000000000p+1
 should be:   2.15714883804321289062e+00   0x1.141d7400000000000000p+1
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  4.0000
 max.ulp   :  0.0000
Maximal error of `atan2'
 is      :  4.0000 ulp
 accepted:  0.0000 ulp
 
Test suite completed:
  2472 test cases plus 2270 tests for exception flags executed.
  4 errors occurred.

Franz.


	* sysdeps/unix/sysv/linux/powerpc/mmap64.c: Correct check for invalid offset.

Index: sysdeps/unix/sysv/linux/powerpc/mmap64.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/mmap64.c,v
retrieving revision 1.9
diff -u -p -r1.9 mmap64.c
--- sysdeps/unix/sysv/linux/powerpc/mmap64.c	2001/04/20 04:53:42	1.9
+++ sysdeps/unix/sysv/linux/powerpc/mmap64.c	2001/04/22 00:08:15
@@ -42,7 +42,7 @@ static int have_no_mmap2;
 void *
 __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
 {
-  if (! (offset & ((1 << PAGE_SHIFT)-1)))
+  if (offset & ((1 << PAGE_SHIFT)-1))
     {
       __set_errno (EINVAL);
       return MAP_FAILED;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]