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*-*-* } } */ 7/* { dg-additional-sources "abitest.S" } */ 8 9#ifndef IN_FRAMEWORK 10#define TESTFILE "func-ret-1.c" 11#include "type-def.h" 12 13vf2_t vf2 = (vf2_t){ 17.f, 18.f }; 14vi4_t vi4 = (vi4_t){ 0xdeadbabe, 0xbabecafe, 0xcafebeef, 0xbeefdead }; 15union int128_t qword; 16 17int *int_ptr = (int *)0xabcdef0123456789ULL; 18 19#define HAS_DATA_INIT_FUNC 20void init_data () 21{ 22 /* Init signed quad-word integer. */ 23 qword.l64 = 0xfdb9753102468aceLL; 24 qword.h64 = 0xeca8642013579bdfLL; 25} 26 27#include "abitest-2.h" 28#else 29FUNC_VAL_CHECK (0, unsigned char , 0xfe , X0, i8in64) 30FUNC_VAL_CHECK (1, signed char , 0xed , X0, i8in64) 31FUNC_VAL_CHECK (2, unsigned short, 0xdcba , X0, i16in64) 32FUNC_VAL_CHECK (3, signed short, 0xcba9 , X0, i16in64) 33FUNC_VAL_CHECK (4, unsigned int , 0xdeadbeef, X0, i32in64) 34FUNC_VAL_CHECK (5, signed int , 0xcafebabe, X0, i32in64) 35FUNC_VAL_CHECK (6, unsigned long long, 0xba98765432101234ULL, X0, flat) 36FUNC_VAL_CHECK (7, signed long long, 0xa987654321012345LL, X0, flat) 37FUNC_VAL_CHECK (8, __int128, qword.i, X0, flat) 38FUNC_VAL_CHECK (9, float, 65432.12345f, S0, flat) 39FUNC_VAL_CHECK (10, double, 9876543.212345, D0, flat) 40FUNC_VAL_CHECK (11, long double, 98765432123456789.987654321L, Q0, flat) 41FUNC_VAL_CHECK (12, vf2_t, vf2, D0, f32in64) 42FUNC_VAL_CHECK (13, vi4_t, vi4, Q0, i32in128) 43FUNC_VAL_CHECK (14, int *, int_ptr, X0, flat) 44#endif 45