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]

Re: [PATCH 5/5][testsuite] Use stdint.h when needing int of exact size


On Tue, Jul 24, 2007 at 02:25:43PM -0700, Janis Johnson wrote:
> On Tue, 2007-07-24 at 19:24 +0200, Rask Ingemann Lambertsen wrote:
> > 
> > 2007-07-24  Rask Ingemann Lambertsen  <rask@sygehus.dk>
> > 
> > 	* gcc.dg/torture/pr27743.c (bar): Use an integer of exactly 32 bits
> > 	where required.
> > 	* gcc.c-torture/execute/simd-1.c: Likewise.
> > 	* gcc.c-torture/execute/pr23135.c: Likewise.
> > 	* gcc.c-torture/execute/simd-4.c (__ev_convert_s64)(main): Likewise.
> > 	Use an integer of exactly 64 bits where required.
> 
> I agree with Andrew Pinski that you shouldn't change SImode in
> these tests; it would be better to skip them for targets that
> are not ILP32 or LP64.

   How about this patch which instead forces the vector elements to be
SImode ones? The asm output is unchanged on x86_64-unknown-linux-gnu and I
have verified that pr23135.c still triggers the reload bug in PR 23135 on
trunk revision 102771.

2007-08-28  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	* gcc.c-torture/execute/simd-1.c: Use SImode vector elements.
	* gcc.c-torture/execute/pr23135.c: Likewise.

Index: gcc.c-torture/execute/simd-1.c
===================================================================
--- gcc.c-torture/execute/simd-1.c	(revision 126653)
+++ gcc.c-torture/execute/simd-1.c	(working copy)
@@ -4,7 +4,7 @@
    regardless of if the target has SIMD instructions.
 */
 
-typedef int __attribute__((vector_size (16))) vecint;
+typedef int __attribute__((mode(SI))) __attribute__((vector_size (16))) vecint;
 typedef int __attribute__((mode(SI))) siint;
 
 vecint i = { 150, 100, 150, 200 };
Index: gcc.c-torture/execute/pr23135.c
===================================================================
--- gcc.c-torture/execute/pr23135.c	(revision 126653)
+++ gcc.c-torture/execute/pr23135.c	(working copy)
@@ -7,7 +7,7 @@
 
 typedef struct { char c[STACK_SIZE/2]; } big_t;
 
-typedef int __attribute__((vector_size (8))) vecint;
+typedef int __attribute__((mode(SI))) __attribute__((vector_size (8))) vecint;
 typedef int __attribute__((mode(SI))) siint;
 
 vecint i = { 150, 100 };


-- 
Rask Ingemann Lambertsen


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