This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
IA64 HFA patch
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Oct 2002 16:59:51 -0700 (PDT)
- Subject: IA64 HFA patch
- Reply-to: sje at cup dot hp dot com
This is a patch to deal with 128 bit floats and HFA's on IA64. If a
structure contains a 128 bit float it is not na HFA (homogenous floating
point aggregate) according to the IA64 Documentation.
Steve Ellcey
sje@cup.hp.com
2002-10-22 Steve Ellcey <sje@cup.hp.com>
* config/ia64/ia64.c (hfa_element_mode): Don't allow 128 bit floats
in HFAs.
*** gcc.orig/gcc/config/ia64/ia64.c Tue Oct 22 16:45:44 2002
--- gcc/gcc/config/ia64/ia64.c Tue Oct 22 16:47:48 2002
*************** hfa_element_mode (type, nested)
*** 3117,3133 ****
gcc's COMPLEX_TYPEs as HFAs. We need to exclude the integral complex
types though. */
case COMPLEX_TYPE:
! if (GET_MODE_CLASS (TYPE_MODE (type)) == MODE_COMPLEX_FLOAT)
return mode_for_size (GET_MODE_UNIT_SIZE (TYPE_MODE (type))
* BITS_PER_UNIT, MODE_FLOAT, 0);
else
return VOIDmode;
case REAL_TYPE:
- /* ??? Should exclude 128-bit long double here. */
/* We want to return VOIDmode for raw REAL_TYPEs, but the actual
mode if this is contained within an aggregate. */
! if (nested)
return TYPE_MODE (type);
else
return VOIDmode;
--- 3117,3133 ----
gcc's COMPLEX_TYPEs as HFAs. We need to exclude the integral complex
types though. */
case COMPLEX_TYPE:
! if (GET_MODE_CLASS (TYPE_MODE (type)) == MODE_COMPLEX_FLOAT
! && (TYPE_MODE (type) != TCmode || INTEL_EXTENDED_IEEE_FORMAT))
return mode_for_size (GET_MODE_UNIT_SIZE (TYPE_MODE (type))
* BITS_PER_UNIT, MODE_FLOAT, 0);
else
return VOIDmode;
case REAL_TYPE:
/* We want to return VOIDmode for raw REAL_TYPEs, but the actual
mode if this is contained within an aggregate. */
! if (nested && (TYPE_MODE (type) != TFmode || INTEL_EXTENDED_IEEE_FORMAT))
return TYPE_MODE (type);
else
return VOIDmode;