Commit d05aa0af by H.J. Lu Committed by H.J. Lu

re PR target/15301 ([3.3/3.4 only] gcc does not pass __m128 arguments correctly)

2004-05-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/15301
	* gcc.dg/compat/union-m128-1.h: New file.
	* gcc.dg/compat/union-m128-1_main.c: Likewise.
	* gcc.dg/compat/union-m128-1_x.c: Likewise.
	* gcc.dg/compat/union-m128-1_y.c: Likewise.

From-SVN: r82077
parent f69a1120
2004-05-20 H.J. Lu <hongjiu.lu@intel.com>
PR target/15301
* gcc.dg/compat/union-m128-1.h: New file.
* gcc.dg/compat/union-m128-1_main.c: Likewise.
* gcc.dg/compat/union-m128-1_x.c: Likewise.
* gcc.dg/compat/union-m128-1_y.c: Likewise.
2004-05-20 H.J. Lu <hongjiu.lu@intel.com>
PR target/15302
* gcc.dg/compat/struct-complex-1.h: New file.
* gcc.dg/compat/struct-complex-1_main.c: Likewise.
......
#include <xmmintrin.h>
typedef struct
{
__m128 x;
} SS_struct_mi128;
typedef union
{
__m128 x;
} SS_union_mi128;
typedef union
{
__m128 x;
unsigned long long u[2];
} union_mi128;
/* { dg-options "-O" } */
#ifdef __x86_64__
/* Test function argument passing. PR target/15301. */
extern void union_m128_1_x (void);
extern void exit (int);
int
main ()
{
union_m128_1_x ();
exit (0);
}
#else
int
main ()
{
return 0;
}
#endif
/* { dg-options "-O" } */
#ifdef __x86_64__
#include "union-m128-1.h"
SS_union_mi128 un;
SS_struct_mi128 st;
extern void bar ();
extern void foo ();
void
union_m128_1_x ()
{
union_mi128 x;
x.u [0] = 0x123456789abcedf0LL;
x.u [1] = 0xfedcba9876543210LL;
un.x = x.x;
st.x = x.x;
bar(un);
bar(st);
foo(un);
foo(st);
}
#endif
/* { dg-options "-O" } */
#ifdef __x86_64__
#include <stdlib.h>
#include "union-m128-1.h"
void
bar (SS_union_mi128 un)
{
union_mi128 x;
x.x = un.x;
if (x.u [0] != 0x123456789abcedf0LL
|| x.u [1] != 0xfedcba9876543210LL)
abort ();
}
void
foo (SS_struct_mi128 st)
{
union_mi128 x;
x.x = st.x;
if (x.u [0] != 0x123456789abcedf0LL
|| x.u [1] != 0xfedcba9876543210LL)
abort ();
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment