This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Unicosmk native builds for 3.1


Hi,

this patch against the 3.1 branch makes native builds on
alpha-cray-unicosmk (Cray T3E) work again (they don't in the 3.1 release).
The problem was that the standard definitions of
REAL_VALUE_TO_TARGET_{SINGLE|DOUBLE} do not support 64-bit integers. I
don't quite see the point of fixing those since this will work differently
on the mainline anyway so I've added specialised definitions to
unicosmk.h. I hope this is acceptable since it obviously does not affect
any other targets.

There are still two problems left. First, the patch in
http://gcc.gnu.org/ml/gcc-patches/2001-07/msg00182.html
seems to have been lost somehow. Could it be applied both to the branch
and the mainline? There is also a small problem with configure which
doesn't recognise that Unicos headers provide a declaration for
sys_errlist. I will look into that shortly.

Bye

Roman

2002-05-19  Roman Lechtchinsky  <rl@cs.tu-berlin.de>

	* config/alpha/unicosmk.h (REAL_VALUE_TO_TARGET_SINGLE,
	REAL_VALUE_TO_TARGET_DOUBLE): Define for native builds.

Index: config/alpha/unicosmk.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/alpha/unicosmk.h,v
retrieving revision 1.7
diff -c -3 -p -r1.7 unicosmk.h
*** config/alpha/unicosmk.h	20 Dec 2001 17:36:33 -0000	1.7
--- config/alpha/unicosmk.h	19 May 2002 18:55:21 -0000
*************** ssib_section ()			\
*** 574,579 ****
--- 574,603 ----
  #ifndef REAL_ARITHMETIC
  #define REAL_VALUE_ATOF(x,s) atof(x)
  #define REAL_VALUE_HTOF(x,s) atof(x)
+ 
+ #define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT)			\
+ do {								\
+   union {							\
+     float f;							\
+     HOST_WIDE_INT l;						\
+   } u;								\
+ 								\
+   u.f = (IN);							\
+   (OUT) = (u.l >> 32) & 0xFFFFFFFF;				\
+ } while (0) 
+ 
+ #define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT)			\
+ do {								\
+   union {							\
+     REAL_VALUE_TYPE f;						\
+     HOST_WIDE_INT l;						\
+   } u;								\
+ 								\
+   u.f = (IN);							\
+   (OUT)[0] = (u.l >> 32) & 0xFFFFFFFF;				\
+   (OUT)[1] = (u.l & 0xFFFFFFFF);				\
+ } while (0)
+ 
  #endif
  
  #undef NM_FLAGS


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