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]

i386: constant_alignment


while i'm at it... x86 needs constant alignment too.

see my note on my answer to your patch approval for vec constants
for the reason why.

2002-02-19  Aldy Hernandez  <aldyh@redhat.com>

	* i386.c (ix86_constant_alignment): Handle vector constants.

	* i386.md ("mmx_uavgv8qi3"): Use const_vector.
	("mmx_uavgv4hi3"): Same.
	("pmulhrwv4hi3"): Same.

Index: config/i386/i386.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/i386/i386.c,v
retrieving revision 1.364
diff -c -p -r1.364 i386.c
*** i386.c	2002/02/18 14:09:38	1.364
--- i386.c	2002/02/18 23:22:28
*************** ix86_constant_alignment (exp, align)
*** 10563,10568 ****
--- 10563,10575 ----
        else if (ALIGN_MODE_128 (TYPE_MODE (TREE_TYPE (exp))) && align < 128)
  	return 128;
      }
+   else if (TREE_CODE (exp) == VECTOR_CST)
+     {
+       if (TYPE_MODE (TREE_TYPE (exp)) == DFmode && align < 64)
+ 	return 64;
+       if (ALIGN_MODE_128 (TYPE_MODE (TREE_TYPE (exp))) && align < 128)
+ 	return 128;
+     }
    else if (TREE_CODE (exp) == STRING_CST && TREE_STRING_LENGTH (exp) >= 31
  	   && align < 256)
      return 256;


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