aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/aarch64/aapcs64/test_1.c
blob: 545b0568512965dac467e8a2dec6002af6ecbbc4 (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
/* Test AAPCS64 layout */

/* C.7  If the argument is an Integral Type, the size of the argument is
	less than or equal to 8 bytes and the NGRN is less than 8, the
	argument is copied to the least significant bits in x[NGRN].  The
	NGRN is incremented by one.  The argument has now been allocated.  */

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

#ifndef IN_FRAMEWORK
#define TESTFILE "test_1.c"
/* TODO: review if we need this */
#define RUNTIME_ENDIANNESS_CHECK
#include "abitest.h"
#else
  ARG(int, 4, W0)
  ARG(double, 4.0, D0)
  ARG(int, 3, W1)
  /* TODO: review the way of memcpy char, short, etc.  */
#ifndef __AAPCS64_BIG_ENDIAN__
  ARG(char, 0xEF, X2)
  ARG(short, 0xBEEF, X3)
  ARG(int, 0xDEADBEEF, X4)
#else
  /* TODO: need the model/qemu to be big-endian as well  */
  ARG(char, 0xEF, X2+7)
  ARG(short, 0xBEEF, X3+6)
  ARG(int, 0xDEADBEEF, X4+4)
#endif
  LAST_ARG(long long, 0xDEADBEEFCAFEBABELL, X5)
#endif