public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Committed: Fix PR target/35496
@ 2008-03-09 13:38 Uros Bizjak
  2008-03-09 14:26 ` H.J. Lu
  0 siblings, 1 reply; 8+ messages in thread
From: Uros Bizjak @ 2008-03-09 13:38 UTC (permalink / raw)
  To: GCC Patches

Hello!

We have to compute alignment of VECTOR_CST and INTEGER_CST constants via 
ALIGN_MODE_128 in the same way as other ALIGN_MODE_128 data is aligned.

2008-03-09  Uros Bizjak  <ubizjak@gmail.com>

        PR target/35496
        * config/i386/i386.c (ix86_constant_algnment): Compute alignment 
using
        ALIGN_MODE_128 for VECTOR_CST and INTEGER_CST in addition to 
REAL_CST.

Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu 
{,-m32}. Patch is committed to mainline, but I think that it should be 
committed to 4.3 branch as well.

Uros.

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 133051)
+++ config/i386/i386.c  (working copy)
@@ -16789,7 +16789,8 @@
 int
 ix86_constant_alignment (tree exp, int align)
 {
-  if (TREE_CODE (exp) == REAL_CST)
+  if (TREE_CODE (exp) == REAL_CST || TREE_CODE (exp) == VECTOR_CST
+      || TREE_CODE (exp) == INTEGER_CST)
     {
       if (TYPE_MODE (TREE_TYPE (exp)) == DFmode && align < 64)
        return 64;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-03-10 14:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-09 13:38 [PATCH, i386]: Committed: Fix PR target/35496 Uros Bizjak
2008-03-09 14:26 ` H.J. Lu
2008-03-09 17:07   ` Uros Bizjak
2008-03-09 17:33     ` H.J. Lu
2008-03-09 18:40       ` Uros Bizjak
2008-03-09 20:17         ` H.J. Lu
2008-03-09 20:53           ` Uros Bizjak
2008-03-10 14:58             ` Kaveh R. GHAZI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).