aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/aarch64/aapcs64/test_25.c
blob: 2f942ff4d108af382c7fa3ae7a0137e8d0ad0364 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Test AAPCS64 layout

   Test homogeneous floating-point aggregates and homogeneous short-vector
   aggregates, which should be passed in SIMD/FP registers or via the
   stack.  */

/* { dg-do run { target aarch64*-*-* } } */

#ifndef IN_FRAMEWORK
#define TESTFILE "test_25.c"

typedef float vf2_t __attribute__((vector_size (8)));
struct x0
{
  vf2_t v;
} s0;
struct x3
{
  vf2_t v[2];
} s3;
struct x4
{
  vf2_t v[3];
} s4;

typedef float vf4_t __attribute__((vector_size(16)));
struct x1
{
  vf4_t v;
} s1;

struct x2
{
  double df[3];
} s2;

#define HAS_DATA_INIT_FUNC
void init_data ()
{
  s0.v = (vf2_t){ 17.f, 18.f };
  s1.v = (vf4_t){ 567.890f, 678.901f, 789.012f, 890.123f };
  s2.df[0] = 123.456;
  s2.df[1] = 234.567;
  s2.df[2] = 345.678;
  s3.v[0] = (vf2_t){ 19.f, 20.f, 21.f, 22.f };
  s3.v[1] = (vf2_t){ 23.f, 24.f, 25.f, 26.f };
  s4.v[0] = (vf2_t){ 27.f, 28.f, 29.f, 30.f };
  s4.v[1] = (vf2_t){ 31.f, 32.f, 33.f, 34.f };
  s4.v[2] = (vf2_t){ 35.f, 36.f, 37.f, 38.f };
}

#include "abitest.h"
#else
ARG_NONFLAT (struct x0, s0, Q0, f32in64)
ARG (struct x2, s2, D1)
ARG (struct x1, s1, Q4)
ARG (struct x3, s3, D5)
ARG (struct x4, s4, STACK)
ARG_NONFLAT (int, 0xdeadbeef, X0, i32in64)
LAST_ARG (double, 456.789, STACK+24)
#endif