This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
SSE fix 10 - XMM types alignment
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com,radkver at atrey dot karlin dot mff dot cuni dot cz
- Date: Fri, 18 Oct 2002 11:32:34 +0200
- Subject: SSE fix 10 - XMM types alignment
Hi,
ALIGN_MODE_128 in i386.h has missleading comment (XFmode don't have to
be aligned) and return false for several XMM vector modes.
Honza
Fri Oct 18 02:01:43 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.h (ALIGN_MODE_128): Update comment; add missing modes
(SSE_REG_MODE_P, MMX_REG_MODE_P): New macros.
*** i386.h.old Fri Oct 18 00:39:50 2002
--- i386.h Fri Oct 18 01:43:10 2002
*************** extern int x86_prefetch_sse;
*** 712,721 ****
#define BIGGEST_ALIGNMENT 128
! /* Decide whether a variable of mode MODE must be 128 bit aligned. */
#define ALIGN_MODE_128(MODE) \
! ((MODE) == XFmode || (MODE) == TFmode || ((MODE) == TImode) \
! || (MODE) == V4SFmode || (MODE) == V4SImode)
/* The published ABIs say that doubles should be aligned on word
boundaries, so lower the aligment for structure fields unless
--- 712,720 ----
#define BIGGEST_ALIGNMENT 128
! /* Decide whether a variable of mode MODE should be 128 bit aligned. */
#define ALIGN_MODE_128(MODE) \
! ((MODE) == XFmode || (MODE) == TFmode || SSE_REG_MODE_P (MODE))
/* The published ABIs say that doubles should be aligned on word
boundaries, so lower the aligment for structure fields unless
*************** do { \
*** 989,994 ****
--- 988,1004 ----
|| (MODE) == CDImode \
|| (TARGET_64BIT && ((MODE) == TImode || (MODE) == CTImode)))
+ /* Return true for modes passed in SSE registers. */
+ #define SSE_REG_MODE_P(MODE) \
+ ((MODE) == TImode || (MODE) == V16QImode \
+ || (MODE) == V8HImode || (MODE) == V2DFmode || (MODE) == V2DImode \
+ || (MODE) == V4SFmode || (MODE) == V4SImode)
+
+ /* Return true for modes passed in MMX registers. */
+ #define MMX_REG_MODE_P(MODE) \
+ ((MODE) == V8QImode || (MODE) == V4HImode || (MODE) == V2SImode \
+ || (MODE) == V2SFmode)
+
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
#define HARD_REGNO_MODE_OK(REGNO, MODE) \