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]

[patch soft-fp] Fixes for soft-fp


Hi,


My name is Fredrik Unger, and I am a member of a team porting
the GCC to the NEC SX vector computer series.
( http://en.wikipedia.org/wiki/SX_architecture )

http://code.google.com/p/sx-gcc/

In an initial mail to gcc-patches
http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01354.html
I reported some soft-fp problem.

The fixdfti-floatuntisf.patch was accepted into gcc
and informed me that double.h.patch belongs to libc.

===== double.h problem =====

When compiling soft-fp for a platform with _FP_W_TYPE_SIZE = 64,
the macro definitions for FP_UNPACK_SEMIRAW_D and FP_UNPACK_SEMIRAW_DP
are not correct.

_FP_UNPACK_RAW_1 should be called as the _FP_W_TYPE_SIZE is
equal 64 and the first argument can not be a 1.
The first argument declares an union type :
union _FP_UNION_##fs  (in op-1.h)
and _FP_UNION_1 is not a valid union while _FP_UNION_D is
declared in double.h.

-------- Test regressions/bugtracker information ---------

With this patch fixed our problem for the SX platform with
gcc.dg/torture/fp-int-convert-timode.c
and is partially logged at
http://code.google.com/p/sx-gcc/issues/detail?id=46

=============================

Regarding FSF copyright Assignment I have not signed any
copyright assignment. However the patch so small that I assume
it will be treated as a tiny change.

So here is the patch for double.h, with a ChangeLog entry.

(ChangeLog suggestion, I am a new submitter)

2008-12-01  Fredrik Unger  <fred@tree.se> (tiny change)

	* libc/soft-fp/double.h: Corrected define macro.
	Fixed FP_UNPACK_SEMIRAW_* for _FP_W_TYPE_SIZE >= 64.


If there are any specific comments with regards to soft-fp we
would be interested in hearing them. We have chosen soft-fp over
fp-bit in our GCC port, but if something speaks against it we
are interested in hearing about it.

Please let me know if you need more information.

Thanks,

Fredrik Unger

Index: double.h
===================================================================
RCS file: /cvs/glibc/libc/soft-fp/double.h,v
retrieving revision 1.8
diff -u -r1.8 double.h
--- double.h	20 Mar 2007 12:10:36 -0000	1.8
+++ double.h	1 Dec 2008 15:06:18 -0000
@@ -203,13 +203,13 @@
 
 #define FP_UNPACK_SEMIRAW_D(X,val)	\
   do {					\
-    _FP_UNPACK_RAW_2(1,X,val);		\
+    _FP_UNPACK_RAW_1(D,X,val);		\
     _FP_UNPACK_SEMIRAW(D,1,X);		\
   } while (0)
 
 #define FP_UNPACK_SEMIRAW_DP(X,val)	\
   do {					\
-    _FP_UNPACK_RAW_2_P(1,X,val);	\
+    _FP_UNPACK_RAW_1_P(D,X,val);	\
     _FP_UNPACK_SEMIRAW(D,1,X);		\
   } while (0)
 

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