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]

128 bit floats on PA64


It looks like the hppa64 platform is using 64 bit long doubles instead
of 128 bits.  This conflicts with the ABI (as the comment in pa-64.h
notes) and we have been using 128 bit floats here with our testing and
have not noticed any regressions.  Here is the patch, but I am not sure
if this will break hppa*64*-*-linux*.  If it does perhaps I should
change the header order in config.gcc and make long-double.h last so it
sets LONG_DOUBLE_TYPE_SIZE to 128 after pa-64.h sets it to 64.  Linux
does not include the long-double.h header.  This still leaves the
CLASS_CANNOT_CHANGE_MODE, CLASS_CANNOT_CHANGE_MODE_P changes as
something that could affect 64 bit linux.  128 bit floats on HP-UX will
not work without removing these macros (or defining
CLASS_CANNOT_CHANGE_MODE as NOREGS).  FYI:  I also removed them from
pa32-regs.h and so no problems on PA32 HP-UX.

Comments?

Steve Ellcey
sje@cup.hp.com

2002-08-30  Steve Ellcey  <sje@cup.hp.com>

	* config/pa/pa-64.h (LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/pa/pa64-regs.h (CLASS_CANNOT_CHANGE_MODE): Remove.
	(CLASS_CANNOT_CHANGE_MODE_P): Remove.

*** gcc.orig/gcc/config/pa/pa-64.h	Fri Aug 30 09:34:47 2002
--- gcc/gcc/config/pa/pa-64.h	Fri Aug 30 09:35:12 2002
*************** Boston, MA 02111-1307, USA.  */
*** 65,74 ****
  #define FLOAT_TYPE_SIZE 32
  #undef DOUBLE_TYPE_SIZE
  #define DOUBLE_TYPE_SIZE 64
- /* This should be 128, but until we work out the ABI for the 128bit
-    FP codes supplied by HP we'll keep it at 64 bits.  */
- #undef LONG_DOUBLE_TYPE_SIZE
- #define LONG_DOUBLE_TYPE_SIZE 64
  
  /* Temporary until we figure out what to do with those *(&@$ 32bit
     relocs which appear in stabs.  */
--- 65,70 ----
*** gcc.orig/gcc/config/pa/pa64-regs.h	Fri Aug 30 09:34:20 2002
--- gcc/gcc/config/pa/pa64-regs.h	Fri Aug 30 09:35:52 2002
*************** enum reg_class { NO_REGS, R1_REGS, GENER
*** 232,247 ****
    {0x00000000, 0x10000000},	/* SHIFT_REGS */		\
    {0xfffffffe, 0x1fffffff}}	/* ALL_REGS */
  
- /* If defined, gives a class of registers that cannot be used as the
-    operand of a SUBREG that changes the mode of the object illegally.  */
- /* ??? This may not actually be necessary anymore.  But until I can prove
-    otherwise it will stay.  */
- #define CLASS_CANNOT_CHANGE_MODE	(FP_REGS)
- 
- /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE.  */
- #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \
-   (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO))
- 
  /* The same information, inverted:
     Return the class number of the smallest class containing
     reg number REGNO.  This could be a conditional expression
--- 232,237 ----


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