This is the mail archive of the gcc@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]

SPARC/Solaris patch



This adds a runtime and compile time optimization for Solaris.  At compile
time, some TARGET_ macros which are always zero on Solaris are #defined as
zero to permit the compiler to eliminate code which depends on them.  At
run time, the 64 bit multiply and divide functions from libc are used.  At
run time Solaris binds an appropriate version of these functions for the
hardware (e.g. on UltraSPARC the library will use the SPARC V9 64 bit
instructions).

Thu Dec  4 20:08:06 1997  John F. Carr  <jfc@mit.edu>

	* sparc/sol2.h: Use 64 bit multiply and divide functions in
 	Solaris libc.  Define TARGET_LIVE_G0 and TARGET_BROKEN_SAVERESTORE
	as 0.

*** sol2.h.egcs	Mon Oct 20 16:49:16 1997
--- sol2.h	Sat Nov  8 17:31:26 1997
***************
*** 174,176 ****
--- 174,188 ----
  /* Define for support of TFmode long double and REAL_ARITHMETIC.
     Sparc ABI says that long double is 4 words.  */
  #define LONG_DOUBLE_TYPE_SIZE 128
+ 
+ #define MULDI3_LIBCALL "__mul64"
+ #define DIVDI3_LIBCALL "__div64"
+ #define UDIVDI3_LIBCALL "__udiv64"
+ #define MODDI3_LIBCALL "__rem64"
+ #define UMODDI3_LIBCALL "__urem64"
+ 
+ /* No weird SPARC variants on Solaris */
+ #undef TARGET_LIVE_G0
+ #define TARGET_LIVE_G0	0
+ #undef TARGET_BROKEN_SAVERESTORE
+ #define TARGET_BROKEN_SAVERESTORE 0


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