This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: x86 generic simd fixlet
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, janis187 at us dot ibm dot com
- Date: Tue, 8 Jul 2003 15:21:09 -0400
- Subject: patch: x86 generic simd fixlet
Janis' testcases expose a myraid of different ICE's on x86.
This one in particular:
typedef int __attribute__((mode(V4SI))) v4si;
void
pass_v4si (v4si v) {}
...aborts on ix86_function_arg_boundary. The problem is that
contains_128bit_aligned_vector_p() is only checking SSE_REG_MODE_P.
It should also check TARGET_SSE because V4SI can be used with generic
simd support.
I also fixed a line wrap problem on the function comment for
contains_128bit_aligned_vector_p.
OK?
Aldy
2003-07-08 Aldy Hernandez <aldyh@redhat.com>
* config/i386/i386.c (contains_128bit_aligned_vector_p): Check
that SSE modes return true only if SSE is enabled.
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.585
diff -c -p -r1.585 i386.c
*** config/i386/i386.c 6 Jul 2003 23:05:09 -0000 1.585
--- config/i386/i386.c 8 Jul 2003 19:11:34 -0000
*************** contains_128bit_aligned_vector_p (type)
*** 2601,2606 ****
--- 2601,2607 ----
{
enum machine_mode mode = TYPE_MODE (type);
if (SSE_REG_MODE_P (mode)
+ && TARGET_SSE
&& (!TYPE_USER_ALIGN (type) || TYPE_ALIGN (type) > 128))
return true;
if (TYPE_ALIGN (type) < 128)
*************** contains_128bit_aligned_vector_p (type)
*** 2651,2658 ****
return false;
}
! /* Gives the alignment boundary, in bits, of an argument with the specified mode
! and type. */
int
ix86_function_arg_boundary (mode, type)
--- 2652,2659 ----
return false;
}
! /* Gives the alignment boundary, in bits, of an argument with the
! specified mode and type. */
int
ix86_function_arg_boundary (mode, type)