1 /* Check calling convention with variable argument lists in the vector
4 /* { dg-do run { target { s390*-*-* } } } */
5 /* { dg-require-effective-target vector } */
6 /* { dg-options "-O3 -mzarch -march=z13 --save-temps" } */
8 /* Make sure arguments are fetched from the argument overflow area. */
9 /* { dg-final { scan-assembler "vl\t%v\[0-9\]*,352\\(%r15\\)" { target lp64 } } } */
10 /* { dg-final { scan-assembler "ld\t%v\[0-9\]*,368\\(%r15\\)" { target lp64 } } } */
11 /* { dg-final { scan-assembler "vl\t%v\[0-9\]*,376\\(%r15\\)" { target lp64 } } } */
12 /* { dg-final { scan-assembler "ld\t%v\[0-9\]*,392\\(%r15\\)" { target lp64 } } } */
14 /* { dg-final { scan-assembler "vl\t%v\[0-9\]*,208\\(%r15\\)" { target ilp32 } } } */
15 /* { dg-final { scan-assembler "ld\t%v\[0-9\]*,224\\(%r15\\)" { target ilp32 } } } */
16 /* { dg-final { scan-assembler "vl\t%v\[0-9\]*,232\\(%r15\\)" { target ilp32 } } } */
17 /* { dg-final { scan-assembler "ld\t%v\[0-9\]*,248\\(%r15\\)" { target ilp32 } } } */
19 /* { dg-final { cleanup-saved-temps } } */
23 extern void abort (void);
25 typedef long long v2di
__attribute__((vector_size(16)));
26 typedef int v2si
__attribute__((vector_size(8)));
28 v2di
__attribute__((noinline
))
33 v2di di_result
= { 0, 0 };
34 v2si si_result
= (v2si
){ 0, 0 };
38 di_result
+= va_arg (va
, v2di
);
39 si_result
+= va_arg (va
, v2si
);
40 di_result
+= va_arg (va
, v2di
);
41 si_result
+= va_arg (va
, v2si
);
45 di_result
[0] += si_result
[0];
46 di_result
[1] += si_result
[1];
54 v2di r
= add (4, (v2di
){ 11, 21 }, (v2si
){ 12, 22 }, (v2di
){ 13, 23 }, (v2si
){ 14, 24 });
56 if (r
[0] != 50 || r
[1] != 90)