x86-64: Update AVX512FP16 ABI tests for x32

On x32, long is the same as int and pointer is 32 bits.  Update AVX512FP16
ABI tests:

1. Replace long with long long for 64-bit integers.
2. Update type and alignment for long and pointer.
3. Skip tests for long on x32.

	* gcc.target/x86_64/abi/avx512fp16/args.h: Replace long with
	long long.
	(XMM_T): Rename _long to _longlong and _ulong to _ulonglong.
	(X87_T): Rename _ulong to _ulonglong.
	* gcc.target/x86_64/abi/avx512fp16/defines.h (TYPE_SIZE_LONG):
	Define to 4 if __ILP32__ is defined.
	(TYPE_SIZE_POINTER): Likewise.
	(TYPE_ALIGN_LONG): Likewise.
	(TYPE_ALIGN_POINTER): Likewise.
	* gcc.target/x86_64/abi/avx512fp16/test_3_element_struct_and_unions.c
	(main): Skip test for long if __ILP32__ is defined.
	* gcc.target/x86_64/abi/avx512fp16/test_m64m128_returning.c
	(do_test): Replace _long with _longlong.
	* gcc.target/x86_64/abi/avx512fp16/test_struct_returning.c:
	(check_300): Replace _ulong with _ulonglong.
	* gcc.target/x86_64/abi/avx512fp16/m256h/args.h: Replace long
	with long long.
	(YMM_T): Rename _long to _longlong and _ulong to _ulonglong.
	(X87_T): Rename _ulong to _ulonglong.
	* gcc.target/x86_64/abi/avx512fp16/m512h/args.h: Replace long
	with long long.
	(ZMM_T): Rename _long to _longlong and _ulong to _ulonglong.
	(X87_T): Rename _ulong to _ulonglong.
This commit is contained in:
H.J. Lu 2021-09-09 07:23:16 -07:00
parent 013cfc6484
commit de515ce0b2
7 changed files with 148 additions and 30 deletions

View File

@ -23,9 +23,9 @@ typedef union {
_Float16 __Float16[8];
float _float[4];
double _double[2];
long _long[2];
long long _longlong[2];
int _int[4];
unsigned long _ulong[2];
ulonglong _ulonglong[2];
#ifdef CHECK_M64_M128
__m64 _m64[2];
__m128 _m128[1];
@ -38,13 +38,13 @@ typedef union {
float _float;
double _double;
ldouble _ldouble;
ulong _ulong[2];
ulonglong _ulonglong[2];
} X87_T;
extern void (*callthis)(void);
extern unsigned long rax,rbx,rcx,rdx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15;
extern unsigned long long rax,rbx,rcx,rdx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15;
XMM_T xmm_regs[16];
X87_T x87_regs[8];
extern volatile unsigned long volatile_var;
extern volatile unsigned long long volatile_var;
extern void snapshot (void);
extern void snapshot_ret (void);
#define WRAP_CALL(N) \
@ -75,7 +75,7 @@ extern void snapshot_ret (void);
these are used or even really available. */
struct IntegerRegisters
{
unsigned long rax, rbx, rcx, rdx, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15;
unsigned long long rax, rbx, rcx, rdx, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15;
};
struct FloatRegisters
{

View File

@ -4,7 +4,7 @@
/* Get __m64 and __m128. */
#include <immintrin.h>
typedef unsigned long ulong;
typedef unsigned long long ulonglong;
typedef long double ldouble;
/* These defines determines what part of the test should be run. When
@ -47,7 +47,11 @@ typedef long double ldouble;
#define TYPE_SIZE_CHAR 1
#define TYPE_SIZE_SHORT 2
#define TYPE_SIZE_INT 4
#define TYPE_SIZE_LONG 8
#ifdef __ILP32__
# define TYPE_SIZE_LONG 4
#else
# define TYPE_SIZE_LONG 8
#endif
#define TYPE_SIZE_LONG_LONG 8
#define TYPE_SIZE_INT128 16
#define TYPE_SIZE_FLOAT16 2
@ -58,12 +62,20 @@ typedef long double ldouble;
#define TYPE_SIZE_M64 8
#define TYPE_SIZE_M128 16
#define TYPE_SIZE_ENUM 4
#define TYPE_SIZE_POINTER 8
#ifdef __ILP32__
# define TYPE_SIZE_POINTER 4
#else
# define TYPE_SIZE_POINTER 8
#endif
#define TYPE_ALIGN_CHAR 1
#define TYPE_ALIGN_SHORT 2
#define TYPE_ALIGN_INT 4
#define TYPE_ALIGN_LONG 8
#ifdef __ILP32__
# define TYPE_ALIGN_LONG 4
#else
# define TYPE_ALIGN_LONG 8
#endif
#define TYPE_ALIGN_LONG_LONG 8
#define TYPE_ALIGN_INT128 16
#define TYPE_ALIGN_FLOAT16 2
@ -74,7 +86,11 @@ typedef long double ldouble;
#define TYPE_ALIGN_M64 8
#define TYPE_ALIGN_M128 16
#define TYPE_ALIGN_ENUM 4
#define TYPE_ALIGN_POINTER 8
#ifdef __ILP32__
# define TYPE_ALIGN_POINTER 4
#else
# define TYPE_ALIGN_POINTER 8
#endif
/* These defines control the building of the list of types to check. There
is a string identifying the type (with a comma after), a size of the type

View File

@ -33,9 +33,9 @@ typedef union {
_Float16 __Float16[16];
float _float[8];
double _double[4];
long _long[4];
long long _longlong[4];
int _int[8];
unsigned long _ulong[4];
unsigned long long _ulonglong[4];
__m64 _m64[4];
__m128 _m128[2];
__m256 _m256[1];
@ -46,13 +46,13 @@ typedef union {
float _float;
double _double;
long double _ldouble;
unsigned long _ulong[2];
unsigned long long _ulonglong[2];
} X87_T;
extern void (*callthis)(void);
extern unsigned long rax,rbx,rcx,rdx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15;
extern unsigned long long rax,rbx,rcx,rdx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15;
YMM_T ymm_regs[16];
X87_T x87_regs[8];
extern volatile unsigned long volatile_var;
extern volatile unsigned long long volatile_var;
extern void snapshot (void);
extern void snapshot_ret (void);
#define WRAP_CALL(N) \
@ -83,7 +83,7 @@ extern void snapshot_ret (void);
these are used or even really available. */
struct IntegerRegisters
{
unsigned long rax, rbx, rcx, rdx, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15;
unsigned long long rax, rbx, rcx, rdx, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15;
};
struct FloatRegisters
{

View File

@ -33,9 +33,9 @@ typedef union {
_Float16 __Float16[32];
float _float[16];
double _double[8];
long _long[8];
long long _longlong[8];
int _int[16];
unsigned long _ulong[8];
unsigned long long _ulonglong[8];
__m64 _m64[8];
__m128 _m128[4];
__m256 _m256[2];
@ -47,13 +47,13 @@ typedef union {
float _float;
double _double;
long double _ldouble;
unsigned long _ulong[2];
unsigned long long _ulonglong[2];
} X87_T;
extern void (*callthis)(void);
extern unsigned long rax,rbx,rcx,rdx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15;
extern unsigned long long rax,rbx,rcx,rdx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15;
ZMM_T zmm_regs[32];
X87_T x87_regs[8];
extern volatile unsigned long volatile_var;
extern volatile unsigned long long volatile_var;
extern void snapshot (void);
extern void snapshot_ret (void);
#define WRAP_CALL(N) \
@ -84,7 +84,7 @@ extern void snapshot_ret (void);
these are used or even really available. */
struct IntegerRegisters
{
unsigned long rax, rbx, rcx, rdx, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15;
unsigned long long rax, rbx, rcx, rdx, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15;
};
struct FloatRegisters
{

View File

@ -10,7 +10,9 @@ main (void)
check_struct_and_union3(char, char, char, 3, 1);
check_struct_and_union3(char, char, short, 4, 2);
check_struct_and_union3(char, char, int, 8, 4);
#ifndef __ILP32__
check_struct_and_union3(char, char, long, 16, 8);
#endif
check_struct_and_union3(char, char, long long, 16, 8);
check_struct_and_union3(char, char, float, 8, 4);
check_struct_and_union3(char, char, double, 16, 8);
@ -18,7 +20,9 @@ main (void)
check_struct_and_union3(char, short, char, 6, 2);
check_struct_and_union3(char, short, short, 6, 2);
check_struct_and_union3(char, short, int, 8, 4);
#ifndef __ILP32__
check_struct_and_union3(char, short, long, 16, 8);
#endif
check_struct_and_union3(char, short, long long, 16, 8);
check_struct_and_union3(char, short, float, 8, 4);
check_struct_and_union3(char, short, double, 16, 8);
@ -26,11 +30,14 @@ main (void)
check_struct_and_union3(char, int, char, 12, 4);
check_struct_and_union3(char, int, short, 12, 4);
check_struct_and_union3(char, int, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(char, int, long, 16, 8);
#endif
check_struct_and_union3(char, int, long long, 16, 8);
check_struct_and_union3(char, int, float, 12, 4);
check_struct_and_union3(char, int, double, 16, 8);
check_struct_and_union3(char, int, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(char, long, char, 24, 8);
check_struct_and_union3(char, long, short, 24, 8);
check_struct_and_union3(char, long, int, 24, 8);
@ -39,6 +46,7 @@ main (void)
check_struct_and_union3(char, long, float, 24, 8);
check_struct_and_union3(char, long, double, 24, 8);
check_struct_and_union3(char, long, long double, 32, 16);
#endif
check_struct_and_union3(char, long long, char, 24, 8);
check_struct_and_union3(char, long long, short, 24, 8);
check_struct_and_union3(char, long long, int, 24, 8);
@ -50,7 +58,9 @@ main (void)
check_struct_and_union3(char, float, char, 12, 4);
check_struct_and_union3(char, float, short, 12, 4);
check_struct_and_union3(char, float, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(char, float, long, 16, 8);
#endif
check_struct_and_union3(char, float, long long, 16, 8);
check_struct_and_union3(char, float, float, 12, 4);
check_struct_and_union3(char, float, double, 16, 8);
@ -74,7 +84,9 @@ main (void)
check_struct_and_union3(short, char, char, 4, 2);
check_struct_and_union3(short, char, short, 6, 2);
check_struct_and_union3(short, char, int, 8, 4);
#ifndef __ILP32__
check_struct_and_union3(short, char, long, 16, 8);
#endif
check_struct_and_union3(short, char, long long, 16, 8);
check_struct_and_union3(short, char, float, 8, 4);
check_struct_and_union3(short, char, double, 16, 8);
@ -82,7 +94,9 @@ main (void)
check_struct_and_union3(short, short, char, 6, 2);
check_struct_and_union3(short, short, short, 6, 2);
check_struct_and_union3(short, short, int, 8, 4);
#ifndef __ILP32__
check_struct_and_union3(short, short, long, 16, 8);
#endif
check_struct_and_union3(short, short, long long, 16, 8);
check_struct_and_union3(short, short, float, 8, 4);
check_struct_and_union3(short, short, double, 16, 8);
@ -90,11 +104,14 @@ main (void)
check_struct_and_union3(short, int, char, 12, 4);
check_struct_and_union3(short, int, short, 12, 4);
check_struct_and_union3(short, int, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(short, int, long, 16, 8);
#endif
check_struct_and_union3(short, int, long long, 16, 8);
check_struct_and_union3(short, int, float, 12, 4);
check_struct_and_union3(short, int, double, 16, 8);
check_struct_and_union3(short, int, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(short, long, char, 24, 8);
check_struct_and_union3(short, long, short, 24, 8);
check_struct_and_union3(short, long, int, 24, 8);
@ -103,6 +120,7 @@ main (void)
check_struct_and_union3(short, long, float, 24, 8);
check_struct_and_union3(short, long, double, 24, 8);
check_struct_and_union3(short, long, long double, 32, 16);
#endif
check_struct_and_union3(short, long long, char, 24, 8);
check_struct_and_union3(short, long long, short, 24, 8);
check_struct_and_union3(short, long long, int, 24, 8);
@ -114,7 +132,9 @@ main (void)
check_struct_and_union3(short, float, char, 12, 4);
check_struct_and_union3(short, float, short, 12, 4);
check_struct_and_union3(short, float, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(short, float, long, 16, 8);
#endif
check_struct_and_union3(short, float, long long, 16, 8);
check_struct_and_union3(short, float, float, 12, 4);
check_struct_and_union3(short, float, double, 16, 8);
@ -138,7 +158,9 @@ main (void)
check_struct_and_union3(int, char, char, 8, 4);
check_struct_and_union3(int, char, short, 8, 4);
check_struct_and_union3(int, char, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(int, char, long, 16, 8);
#endif
check_struct_and_union3(int, char, long long, 16, 8);
check_struct_and_union3(int, char, float, 12, 4);
check_struct_and_union3(int, char, double, 16, 8);
@ -146,7 +168,9 @@ main (void)
check_struct_and_union3(int, short, char, 8, 4);
check_struct_and_union3(int, short, short, 8, 4);
check_struct_and_union3(int, short, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(int, short, long, 16, 8);
#endif
check_struct_and_union3(int, short, long long, 16, 8);
check_struct_and_union3(int, short, float, 12, 4);
check_struct_and_union3(int, short, double, 16, 8);
@ -154,11 +178,14 @@ main (void)
check_struct_and_union3(int, int, char, 12, 4);
check_struct_and_union3(int, int, short, 12, 4);
check_struct_and_union3(int, int, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(int, int, long, 16, 8);
#endif
check_struct_and_union3(int, int, long long, 16, 8);
check_struct_and_union3(int, int, float, 12, 4);
check_struct_and_union3(int, int, double, 16, 8);
check_struct_and_union3(int, int, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(int, long, char, 24, 8);
check_struct_and_union3(int, long, short, 24, 8);
check_struct_and_union3(int, long, int, 24, 8);
@ -166,6 +193,7 @@ main (void)
check_struct_and_union3(int, long, long long, 24, 8);
check_struct_and_union3(int, long, float, 24, 8);
check_struct_and_union3(int, long, double, 24, 8);
#endif
check_struct_and_union3(int, long, long double, 32, 16);
check_struct_and_union3(int, long long, char, 24, 8);
check_struct_and_union3(int, long long, short, 24, 8);
@ -178,7 +206,9 @@ main (void)
check_struct_and_union3(int, float, char, 12, 4);
check_struct_and_union3(int, float, short, 12, 4);
check_struct_and_union3(int, float, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(int, float, long, 16, 8);
#endif
check_struct_and_union3(int, float, long long, 16, 8);
check_struct_and_union3(int, float, float, 12, 4);
check_struct_and_union3(int, float, double, 16, 8);
@ -199,6 +229,7 @@ main (void)
check_struct_and_union3(int, long double, float, 48, 16);
check_struct_and_union3(int, long double, double, 48, 16);
check_struct_and_union3(int, long double, long double, 48, 16);
#ifndef __ILP32__
check_struct_and_union3(long, char, char, 16, 8);
check_struct_and_union3(long, char, short, 16, 8);
check_struct_and_union3(long, char, int, 16, 8);
@ -222,7 +253,9 @@ main (void)
check_struct_and_union3(long, int, long long, 24, 8);
check_struct_and_union3(long, int, float, 16, 8);
check_struct_and_union3(long, int, double, 24, 8);
#endif
check_struct_and_union3(long, int, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(long, long, char, 24, 8);
check_struct_and_union3(long, long, short, 24, 8);
check_struct_and_union3(long, long, int, 24, 8);
@ -263,10 +296,13 @@ main (void)
check_struct_and_union3(long, long double, float, 48, 16);
check_struct_and_union3(long, long double, double, 48, 16);
check_struct_and_union3(long, long double, long double, 48, 16);
#endif
check_struct_and_union3(long long, char, char, 16, 8);
check_struct_and_union3(long long, char, short, 16, 8);
check_struct_and_union3(long long, char, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(long long, char, long, 24, 8);
#endif
check_struct_and_union3(long long, char, long long, 24, 8);
check_struct_and_union3(long long, char, float, 16, 8);
check_struct_and_union3(long long, char, double, 24, 8);
@ -274,7 +310,9 @@ main (void)
check_struct_and_union3(long long, short, char, 16, 8);
check_struct_and_union3(long long, short, short, 16, 8);
check_struct_and_union3(long long, short, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(long long, short, long, 24, 8);
#endif
check_struct_and_union3(long long, short, long long, 24, 8);
check_struct_and_union3(long long, short, float, 16, 8);
check_struct_and_union3(long long, short, double, 24, 8);
@ -282,18 +320,24 @@ main (void)
check_struct_and_union3(long long, int, char, 16, 8);
check_struct_and_union3(long long, int, short, 16, 8);
check_struct_and_union3(long long, int, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(long long, int, long, 24, 8);
#endif
check_struct_and_union3(long long, int, long long, 24, 8);
check_struct_and_union3(long long, int, float, 16, 8);
check_struct_and_union3(long long, int, double, 24, 8);
check_struct_and_union3(long long, int, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(long long, long, char, 24, 8);
check_struct_and_union3(long long, long, short, 24, 8);
check_struct_and_union3(long long, long, int, 24, 8);
check_struct_and_union3(long long, long, long, 24, 8);
#endif
check_struct_and_union3(long long, long, long long, 24, 8);
#ifndef __ILP32__
check_struct_and_union3(long long, long, float, 24, 8);
check_struct_and_union3(long long, long, double, 24, 8);
#endif
check_struct_and_union3(long long, long, long double, 32, 16);
check_struct_and_union3(long long, long long, char, 24, 8);
check_struct_and_union3(long long, long long, short, 24, 8);
@ -306,7 +350,9 @@ main (void)
check_struct_and_union3(long long, float, char, 16, 8);
check_struct_and_union3(long long, float, short, 16, 8);
check_struct_and_union3(long long, float, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(long long, float, long, 24, 8);
#endif
check_struct_and_union3(long long, float, long long, 24, 8);
check_struct_and_union3(long long, float, float, 16, 8);
check_struct_and_union3(long long, float, double, 24, 8);
@ -330,7 +376,9 @@ main (void)
check_struct_and_union3(float, char, char, 8, 4);
check_struct_and_union3(float, char, short, 8, 4);
check_struct_and_union3(float, char, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(float, char, long, 16, 8);
#endif
check_struct_and_union3(float, char, long long, 16, 8);
check_struct_and_union3(float, char, float, 12, 4);
check_struct_and_union3(float, char, double, 16, 8);
@ -338,7 +386,9 @@ main (void)
check_struct_and_union3(float, short, char, 8, 4);
check_struct_and_union3(float, short, short, 8, 4);
check_struct_and_union3(float, short, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(float, short, long, 16, 8);
#endif
check_struct_and_union3(float, short, long long, 16, 8);
check_struct_and_union3(float, short, float, 12, 4);
check_struct_and_union3(float, short, double, 16, 8);
@ -346,11 +396,14 @@ main (void)
check_struct_and_union3(float, int, char, 12, 4);
check_struct_and_union3(float, int, short, 12, 4);
check_struct_and_union3(float, int, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(float, int, long, 16, 8);
#endif
check_struct_and_union3(float, int, long long, 16, 8);
check_struct_and_union3(float, int, float, 12, 4);
check_struct_and_union3(float, int, double, 16, 8);
check_struct_and_union3(float, int, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(float, long, char, 24, 8);
check_struct_and_union3(float, long, short, 24, 8);
check_struct_and_union3(float, long, int, 24, 8);
@ -358,6 +411,7 @@ main (void)
check_struct_and_union3(float, long, long long, 24, 8);
check_struct_and_union3(float, long, float, 24, 8);
check_struct_and_union3(float, long, double, 24, 8);
#endif
check_struct_and_union3(float, long, long double, 32, 16);
check_struct_and_union3(float, long long, char, 24, 8);
check_struct_and_union3(float, long long, short, 24, 8);
@ -370,7 +424,9 @@ main (void)
check_struct_and_union3(float, float, char, 12, 4);
check_struct_and_union3(float, float, short, 12, 4);
check_struct_and_union3(float, float, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(float, float, long, 16, 8);
#endif
check_struct_and_union3(float, float, long long, 16, 8);
check_struct_and_union3(float, float, float, 12, 4);
check_struct_and_union3(float, float, double, 16, 8);
@ -394,7 +450,9 @@ main (void)
check_struct_and_union3(double, char, char, 16, 8);
check_struct_and_union3(double, char, short, 16, 8);
check_struct_and_union3(double, char, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(double, char, long, 24, 8);
#endif
check_struct_and_union3(double, char, long long, 24, 8);
check_struct_and_union3(double, char, float, 16, 8);
check_struct_and_union3(double, char, double, 24, 8);
@ -402,7 +460,9 @@ main (void)
check_struct_and_union3(double, short, char, 16, 8);
check_struct_and_union3(double, short, short, 16, 8);
check_struct_and_union3(double, short, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(double, short, long, 24, 8);
#endif
check_struct_and_union3(double, short, long long, 24, 8);
check_struct_and_union3(double, short, float, 16, 8);
check_struct_and_union3(double, short, double, 24, 8);
@ -410,17 +470,23 @@ main (void)
check_struct_and_union3(double, int, char, 16, 8);
check_struct_and_union3(double, int, short, 16, 8);
check_struct_and_union3(double, int, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(double, int, long, 24, 8);
#endif
check_struct_and_union3(double, int, long long, 24, 8);
check_struct_and_union3(double, int, float, 16, 8);
check_struct_and_union3(double, int, double, 24, 8);
check_struct_and_union3(double, int, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(double, long, char, 24, 8);
check_struct_and_union3(double, long, short, 24, 8);
check_struct_and_union3(double, long, int, 24, 8);
check_struct_and_union3(double, long, long, 24, 8);
#endif
check_struct_and_union3(double, long, long long, 24, 8);
#ifndef __ILP32__
check_struct_and_union3(double, long, float, 24, 8);
#endif
check_struct_and_union3(double, long, double, 24, 8);
check_struct_and_union3(double, long, long double, 32, 16);
check_struct_and_union3(double, long long, char, 24, 8);
@ -434,7 +500,9 @@ main (void)
check_struct_and_union3(double, float, char, 16, 8);
check_struct_and_union3(double, float, short, 16, 8);
check_struct_and_union3(double, float, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(double, float, long, 24, 8);
#endif
check_struct_and_union3(double, float, long long, 24, 8);
check_struct_and_union3(double, float, float, 16, 8);
check_struct_and_union3(double, float, double, 24, 8);
@ -523,13 +591,17 @@ main (void)
check_struct_and_union3(char, _Float16, char, 6, 2);
check_struct_and_union3(char, _Float16, _Float16, 6, 2);
check_struct_and_union3(char, _Float16, int, 8, 4);
#ifndef __ILP32__
check_struct_and_union3(char, _Float16, long, 16, 8);
#endif
check_struct_and_union3(char, _Float16, long long, 16, 8);
check_struct_and_union3(char, _Float16, float, 8, 4);
check_struct_and_union3(char, _Float16, double, 16, 8);
check_struct_and_union3(char, _Float16, long double, 32, 16);
check_struct_and_union3(char, int, _Float16, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(char, long, _Float16, 24, 8);
#endif
check_struct_and_union3(char, long long, _Float16, 24, 8);
check_struct_and_union3(char, float, _Float16, 12, 4);
check_struct_and_union3(char, double, _Float16, 24, 8);
@ -537,7 +609,9 @@ main (void)
check_struct_and_union3(_Float16, char, char, 4, 2);
check_struct_and_union3(_Float16, char, _Float16, 6, 2);
check_struct_and_union3(_Float16, char, int, 8, 4);
#ifndef __ILP32__
check_struct_and_union3(_Float16, char, long, 16, 8);
#endif
check_struct_and_union3(_Float16, char, long long, 16, 8);
check_struct_and_union3(_Float16, char, float, 8, 4);
check_struct_and_union3(_Float16, char, double, 16, 8);
@ -545,7 +619,9 @@ main (void)
check_struct_and_union3(_Float16, _Float16, char, 6, 2);
check_struct_and_union3(_Float16, _Float16, _Float16, 6, 2);
check_struct_and_union3(_Float16, _Float16, int, 8, 4);
#ifndef __ILP32__
check_struct_and_union3(_Float16, _Float16, long, 16, 8);
#endif
check_struct_and_union3(_Float16, _Float16, long long, 16, 8);
check_struct_and_union3(_Float16, _Float16, float, 8, 4);
check_struct_and_union3(_Float16, _Float16, double, 16, 8);
@ -553,11 +629,14 @@ main (void)
check_struct_and_union3(_Float16, int, char, 12, 4);
check_struct_and_union3(_Float16, int, _Float16, 12, 4);
check_struct_and_union3(_Float16, int, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(_Float16, int, long, 16, 8);
#endif
check_struct_and_union3(_Float16, int, long long, 16, 8);
check_struct_and_union3(_Float16, int, float, 12, 4);
check_struct_and_union3(_Float16, int, double, 16, 8);
check_struct_and_union3(_Float16, int, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(_Float16, long, char, 24, 8);
check_struct_and_union3(_Float16, long, _Float16, 24, 8);
check_struct_and_union3(_Float16, long, int, 24, 8);
@ -565,6 +644,7 @@ main (void)
check_struct_and_union3(_Float16, long, long long, 24, 8);
check_struct_and_union3(_Float16, long, float, 24, 8);
check_struct_and_union3(_Float16, long, double, 24, 8);
#endif
check_struct_and_union3(_Float16, long, long double, 32, 16);
check_struct_and_union3(_Float16, long long, char, 24, 8);
check_struct_and_union3(_Float16, long long, _Float16, 24, 8);
@ -577,7 +657,9 @@ main (void)
check_struct_and_union3(_Float16, float, char, 12, 4);
check_struct_and_union3(_Float16, float, _Float16, 12, 4);
check_struct_and_union3(_Float16, float, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(_Float16, float, long, 16, 8);
#endif
check_struct_and_union3(_Float16, float, long long, 16, 8);
check_struct_and_union3(_Float16, float, float, 12, 4);
check_struct_and_union3(_Float16, float, double, 16, 8);
@ -602,17 +684,22 @@ main (void)
check_struct_and_union3(int, _Float16, char, 8, 4);
check_struct_and_union3(int, _Float16, _Float16, 8, 4);
check_struct_and_union3(int, _Float16, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(int, _Float16, long, 16, 8);
#endif
check_struct_and_union3(int, _Float16, long long, 16, 8);
check_struct_and_union3(int, _Float16, float, 12, 4);
check_struct_and_union3(int, _Float16, double, 16, 8);
check_struct_and_union3(int, _Float16, long double, 32, 16);
check_struct_and_union3(int, int, _Float16, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(int, long, _Float16, 24, 8);
#endif
check_struct_and_union3(int, long long, _Float16, 24, 8);
check_struct_and_union3(int, float, _Float16, 12, 4);
check_struct_and_union3(int, double, _Float16, 24, 8);
check_struct_and_union3(int, long double, _Float16, 48, 16);
#ifndef __ILP32__
check_struct_and_union3(long, char, _Float16, 16, 8);
check_struct_and_union3(long, _Float16, char, 16, 8);
check_struct_and_union3(long, _Float16, _Float16, 16, 8);
@ -621,24 +708,31 @@ main (void)
check_struct_and_union3(long, _Float16, long long, 24, 8);
check_struct_and_union3(long, _Float16, float, 16, 8);
check_struct_and_union3(long, _Float16, double, 24, 8);
#endif
check_struct_and_union3(long, _Float16, long double, 32, 16);
#ifndef __ILP32__
check_struct_and_union3(long, int, _Float16, 16, 8);
check_struct_and_union3(long, long, _Float16, 24, 8);
check_struct_and_union3(long, long long, _Float16, 24, 8);
check_struct_and_union3(long, float, _Float16, 16, 8);
check_struct_and_union3(long, double, _Float16, 24, 8);
#endif
check_struct_and_union3(long, long double, _Float16, 48, 16);
check_struct_and_union3(long long, char, _Float16, 16, 8);
check_struct_and_union3(long long, _Float16, char, 16, 8);
check_struct_and_union3(long long, _Float16, _Float16, 16, 8);
check_struct_and_union3(long long, _Float16, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(long long, _Float16, long, 24, 8);
#endif
check_struct_and_union3(long long, _Float16, long long, 24, 8);
check_struct_and_union3(long long, _Float16, float, 16, 8);
check_struct_and_union3(long long, _Float16, double, 24, 8);
check_struct_and_union3(long long, _Float16, long double, 32, 16);
check_struct_and_union3(long long, int, _Float16, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(long long, long, _Float16, 24, 8);
#endif
check_struct_and_union3(long long, long long, _Float16, 24, 8);
check_struct_and_union3(long long, float, _Float16, 16, 8);
check_struct_and_union3(long long, double, _Float16, 24, 8);
@ -647,13 +741,17 @@ main (void)
check_struct_and_union3(float, _Float16, char, 8, 4);
check_struct_and_union3(float, _Float16, _Float16, 8, 4);
check_struct_and_union3(float, _Float16, int, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(float, _Float16, long, 16, 8);
#endif
check_struct_and_union3(float, _Float16, long long, 16, 8);
check_struct_and_union3(float, _Float16, float, 12, 4);
check_struct_and_union3(float, _Float16, double, 16, 8);
check_struct_and_union3(float, _Float16, long double, 32, 16);
check_struct_and_union3(float, int, _Float16, 12, 4);
#ifndef __ILP32__
check_struct_and_union3(float, long, _Float16, 24, 8);
#endif
check_struct_and_union3(float, long long, _Float16, 24, 8);
check_struct_and_union3(float, float, _Float16, 12, 4);
check_struct_and_union3(float, double, _Float16, 24, 8);
@ -662,13 +760,17 @@ main (void)
check_struct_and_union3(double, _Float16, char, 16, 8);
check_struct_and_union3(double, _Float16, _Float16, 16, 8);
check_struct_and_union3(double, _Float16, int, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(double, _Float16, long, 24, 8);
#endif
check_struct_and_union3(double, _Float16, long long, 24, 8);
check_struct_and_union3(double, _Float16, float, 16, 8);
check_struct_and_union3(double, _Float16, double, 24, 8);
check_struct_and_union3(double, _Float16, long double, 32, 16);
check_struct_and_union3(double, int, _Float16, 16, 8);
#ifndef __ILP32__
check_struct_and_union3(double, long, _Float16, 24, 8);
#endif
check_struct_and_union3(double, long long, _Float16, 24, 8);
check_struct_and_union3(double, float, _Float16, 16, 8);
check_struct_and_union3(double, double, _Float16, 24, 8);

View File

@ -47,16 +47,16 @@ do_test (void)
test_64 = (__m64){72,0};
xmmt1._m64[0] = test_64;
xmmt2._m64[0] = WRAP_RET (fun_test_returning___m64)();
if (xmmt1._long[0] != xmmt2._long[0]
|| xmmt1._long[0] != xmm_regs[0]._long[0])
if (xmmt1._longlong[0] != xmmt2._longlong[0]
|| xmmt1._longlong[0] != xmm_regs[0]._longlong[0])
printf ("fail m64\n"), failed++;
clear_struct_registers;
test_128 = (__m128){73,0};
xmmt1._m128[0] = test_128;
xmmt2._m128[0] = WRAP_RET (fun_test_returning___m128)();
if (xmmt1._long[0] != xmmt2._long[0]
|| xmmt1._long[0] != xmm_regs[0]._long[0])
if (xmmt1._longlong[0] != xmmt2._longlong[0]
|| xmmt1._longlong[0] != xmm_regs[0]._longlong[0])
printf ("fail m128\n"), failed++;
clear_struct_registers;
@ -64,8 +64,8 @@ do_test (void)
6.6f16, 7.7f16, 8.8f16};
xmmt1._m128h[0] = test_128h;
xmmt2._m128h[0] = WRAP_RET (fun_test_returning___m128h)();
if (xmmt1._long[0] != xmmt2._long[0]
|| xmmt1._long[0] != xmm_regs[0]._long[0])
if (xmmt1._longlong[0] != xmmt2._longlong[0]
|| xmmt1._longlong[0] != xmm_regs[0]._longlong[0])
printf ("fail m128h\n"), failed++;
if (failed)

View File

@ -124,7 +124,7 @@ D(313,long long m1; _Float16 m2)
void check_300 (void)
{
XMM_T x;
x._ulong[0] = rax;
x._ulonglong[0] = rax;
switch (current_test) {
case 300: assert ((rax & 0xff) == 42 && x._float[1] == 43); break;
case 301: assert ((rax & 0xff) == 42 && xmm0d[0] == 43); break;