]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-1.c
aarch64: Disable branch-protection for pcs tests
[gcc.git] / gcc / testsuite / gcc.target / aarch64 / aapcs64 / func-ret-1.c
CommitLineData
77c4ae24
IB
1/* Test AAPCS64 function result return.
2
3 This test covers most fundamental data types as specified in
4 AAPCS64 \S 4.1. */
5
6/* { dg-do run { target aarch64*-*-* } } */
c9d691a7 7/* { dg-additional-options "-mbranch-protection=none" } */
77c4ae24
IB
8/* { dg-additional-sources "abitest.S" } */
9
10#ifndef IN_FRAMEWORK
11#define TESTFILE "func-ret-1.c"
12#include "type-def.h"
13
14vf2_t vf2 = (vf2_t){ 17.f, 18.f };
15vi4_t vi4 = (vi4_t){ 0xdeadbabe, 0xbabecafe, 0xcafebeef, 0xbeefdead };
b6ec6215
KT
16vlf1_t vlf1 = (vlf1_t) { 17.0 };
17
1b99d71b
CL
18vldf1_t vldf1 = (vldf1_t) { 17.0dl };
19
77c4ae24
IB
20union int128_t qword;
21
22int *int_ptr = (int *)0xabcdef0123456789ULL;
23
24#define HAS_DATA_INIT_FUNC
25void init_data ()
26{
27 /* Init signed quad-word integer. */
28 qword.l64 = 0xfdb9753102468aceLL;
29 qword.h64 = 0xeca8642013579bdfLL;
30}
31
32#include "abitest-2.h"
33#else
34FUNC_VAL_CHECK (0, unsigned char , 0xfe , X0, i8in64)
35FUNC_VAL_CHECK (1, signed char , 0xed , X0, i8in64)
36FUNC_VAL_CHECK (2, unsigned short, 0xdcba , X0, i16in64)
37FUNC_VAL_CHECK (3, signed short, 0xcba9 , X0, i16in64)
38FUNC_VAL_CHECK (4, unsigned int , 0xdeadbeef, X0, i32in64)
39FUNC_VAL_CHECK (5, signed int , 0xcafebabe, X0, i32in64)
40FUNC_VAL_CHECK (6, unsigned long long, 0xba98765432101234ULL, X0, flat)
41FUNC_VAL_CHECK (7, signed long long, 0xa987654321012345LL, X0, flat)
42FUNC_VAL_CHECK (8, __int128, qword.i, X0, flat)
43FUNC_VAL_CHECK (9, float, 65432.12345f, S0, flat)
44FUNC_VAL_CHECK (10, double, 9876543.212345, D0, flat)
45FUNC_VAL_CHECK (11, long double, 98765432123456789.987654321L, Q0, flat)
46FUNC_VAL_CHECK (12, vf2_t, vf2, D0, f32in64)
47FUNC_VAL_CHECK (13, vi4_t, vi4, Q0, i32in128)
48FUNC_VAL_CHECK (14, int *, int_ptr, X0, flat)
b6ec6215 49FUNC_VAL_CHECK (15, vlf1_t, vlf1, Q0, flat)
1b62ed4f 50FUNC_VAL_CHECK (16, __fp16, 0xabcd, H0, flat)
1b99d71b
CL
51
52FUNC_VAL_CHECK (17, _Decimal32, 65432.12345df, S0, flat)
53FUNC_VAL_CHECK (18, _Decimal64, 9876543.212345dd, D0, flat)
54FUNC_VAL_CHECK (19, _Decimal128, 98765432123456789.987654321dl, Q0, flat)
55FUNC_VAL_CHECK (20, vldf1_t, vldf1, Q0, flat)
77c4ae24 56#endif
This page took 7.924289 seconds and 5 git commands to generate.