This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

soft-fp quad.h patch


This patch fixes soft-fp's quad.h for the case where two unsigned long 
long words are being used but unsigned long is only 32 bits (as in MIPS64 
N32).  (This is needed for a separate patch I'll send to libc-ports to 
implement sqrtl for MIPS64.  It would probably be safe to change all such 
bit-fields to _FP_W_TYPE but only these ones need changing for this 
particular use and I haven't tested changing the others.)

2006-06-07  Joseph Myers  <joseph@codesourcery.com>

	* soft-fp/quad.h (_FP_UNION_Q): Use _FP_W_TYPE for frac
	bit-fields.

Index: soft-fp/quad.h
===================================================================
RCS file: /cvs/glibc/libc/soft-fp/quad.h,v
retrieving revision 1.8
diff -u -r1.8 quad.h
--- soft-fp/quad.h	4 Apr 2006 08:24:47 -0000	1.8
+++ soft-fp/quad.h	7 Jun 2006 11:01:10 -0000
@@ -178,11 +178,11 @@
 #if __BYTE_ORDER == __BIG_ENDIAN
     unsigned sign  : 1;
     unsigned exp   : _FP_EXPBITS_Q;
-    unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
-    unsigned long frac0 : _FP_W_TYPE_SIZE;
+    _FP_W_TYPE frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
+    _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE;
 #else
-    unsigned long frac0 : _FP_W_TYPE_SIZE;
-    unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
+    _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE;
+    _FP_W_TYPE frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
     unsigned exp   : _FP_EXPBITS_Q;
     unsigned sign  : 1;
 #endif

-- 
Joseph S. Myers
joseph@codesourcery.com


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