1da0c48c4Sopenharmony_ci#! /bin/sh
2da0c48c4Sopenharmony_ci# Copyright (C) 2013 Red Hat, Inc.
3da0c48c4Sopenharmony_ci# This file is part of elfutils.
4da0c48c4Sopenharmony_ci#
5da0c48c4Sopenharmony_ci# This file is free software; you can redistribute it and/or modify
6da0c48c4Sopenharmony_ci# it under the terms of the GNU General Public License as published by
7da0c48c4Sopenharmony_ci# the Free Software Foundation; either version 3 of the License, or
8da0c48c4Sopenharmony_ci# (at your option) any later version.
9da0c48c4Sopenharmony_ci#
10da0c48c4Sopenharmony_ci# elfutils is distributed in the hope that it will be useful, but
11da0c48c4Sopenharmony_ci# WITHOUT ANY WARRANTY; without even the implied warranty of
12da0c48c4Sopenharmony_ci# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13da0c48c4Sopenharmony_ci# GNU General Public License for more details.
14da0c48c4Sopenharmony_ci#
15da0c48c4Sopenharmony_ci# You should have received a copy of the GNU General Public License
16da0c48c4Sopenharmony_ci# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17da0c48c4Sopenharmony_ci
18da0c48c4Sopenharmony_ci. $srcdir/test-subr.sh
19da0c48c4Sopenharmony_ci
20da0c48c4Sopenharmony_ci# The following files were obtaining by compiling funcretval_test.c
21da0c48c4Sopenharmony_ci# from this directory as follows:
22da0c48c4Sopenharmony_ci#
23da0c48c4Sopenharmony_ci#   gcc -g funcretval_test.c -o funcretval_test_<YOURARCH>
24da0c48c4Sopenharmony_ci#
25da0c48c4Sopenharmony_ci# Pass -DFLOAT128 if the given arch supports __float128.
26da0c48c4Sopenharmony_ci
27da0c48c4Sopenharmony_citestfiles funcretval_test_aarch64
28da0c48c4Sopenharmony_ci
29da0c48c4Sopenharmony_ci# funcretval_test_aarch64 was built with additional flag:
30da0c48c4Sopenharmony_ci#   -DAARCH64_BUG_1032854
31da0c48c4Sopenharmony_ci# hence no fun_vec_double_8.
32da0c48c4Sopenharmony_citestrun_compare ${abs_top_builddir}/tests/funcretval \
33da0c48c4Sopenharmony_ci	-e funcretval_test_aarch64 <<\EOF
34da0c48c4Sopenharmony_ci() fun_char: return value location: {0x50, 0}
35da0c48c4Sopenharmony_ci() fun_short: return value location: {0x50, 0}
36da0c48c4Sopenharmony_ci() fun_int: return value location: {0x50, 0}
37da0c48c4Sopenharmony_ci() fun_ptr: return value location: {0x50, 0}
38da0c48c4Sopenharmony_ci() fun_iptr: return value location: {0x50, 0}
39da0c48c4Sopenharmony_ci() fun_long: return value location: {0x50, 0}
40da0c48c4Sopenharmony_ci() fun_int128: return value location: {0x50, 0} {0x93, 0x8} {0x51, 0} {0x93, 0x8}
41da0c48c4Sopenharmony_ci() fun_large_struct1: return value location: {0x70, 0}
42da0c48c4Sopenharmony_ci() fun_large_struct2: return value location: {0x70, 0}
43da0c48c4Sopenharmony_ci() fun_float: return value location: {0x90, 0x40}
44da0c48c4Sopenharmony_ci() fun_float_complex: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4}
45da0c48c4Sopenharmony_ci() fun_double: return value location: {0x90, 0x40}
46da0c48c4Sopenharmony_ci() fun_double_complex: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
47da0c48c4Sopenharmony_ci() fun_long_double: return value location: {0x90, 0x40}
48da0c48c4Sopenharmony_ci() fun_long_double_complex: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
49da0c48c4Sopenharmony_ci() fun_vec_char_8: return value location: {0x90, 0x40}
50da0c48c4Sopenharmony_ci() fun_vec_short_8: return value location: {0x90, 0x40}
51da0c48c4Sopenharmony_ci() fun_vec_int_8: return value location: {0x90, 0x40}
52da0c48c4Sopenharmony_ci() fun_vec_long_8: return value location: {0x90, 0x40}
53da0c48c4Sopenharmony_ci() fun_vec_float_8: return value location: {0x90, 0x40}
54da0c48c4Sopenharmony_ci() fun_vec_char_16: return value location: {0x90, 0x40}
55da0c48c4Sopenharmony_ci() fun_vec_short_16: return value location: {0x90, 0x40}
56da0c48c4Sopenharmony_ci() fun_vec_int_16: return value location: {0x90, 0x40}
57da0c48c4Sopenharmony_ci() fun_vec_long_16: return value location: {0x90, 0x40}
58da0c48c4Sopenharmony_ci() fun_vec_int128_16: return value location: {0x90, 0x40}
59da0c48c4Sopenharmony_ci() fun_vec_float_16: return value location: {0x90, 0x40}
60da0c48c4Sopenharmony_ci() fun_vec_double_16: return value location: {0x90, 0x40}
61da0c48c4Sopenharmony_ci() fun_hfa1_float: return value location: {0x90, 0x40}
62da0c48c4Sopenharmony_ci() fun_hfa1_double: return value location: {0x90, 0x40}
63da0c48c4Sopenharmony_ci() fun_hfa1_long_double: return value location: {0x90, 0x40}
64da0c48c4Sopenharmony_ci() fun_hfa1_float_a: return value location: {0x90, 0x40}
65da0c48c4Sopenharmony_ci() fun_hfa1_double_a: return value location: {0x90, 0x40}
66da0c48c4Sopenharmony_ci() fun_hfa1_long_double_a: return value location: {0x90, 0x40}
67da0c48c4Sopenharmony_ci() fun_hfa2_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4}
68da0c48c4Sopenharmony_ci() fun_hfa2_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
69da0c48c4Sopenharmony_ci() fun_hfa2_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
70da0c48c4Sopenharmony_ci() fun_hfa2_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4}
71da0c48c4Sopenharmony_ci() fun_hfa2_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
72da0c48c4Sopenharmony_ci() fun_hfa2_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
73da0c48c4Sopenharmony_ci() fun_hfa3_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4}
74da0c48c4Sopenharmony_ci() fun_hfa3_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
75da0c48c4Sopenharmony_ci() fun_hfa3_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
76da0c48c4Sopenharmony_ci() fun_hfa3_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4}
77da0c48c4Sopenharmony_ci() fun_hfa3_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
78da0c48c4Sopenharmony_ci() fun_hfa3_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
79da0c48c4Sopenharmony_ci() fun_hfa4_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} {0x90, 0x43} {0x93, 0x4}
80da0c48c4Sopenharmony_ci() fun_hfa4_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
81da0c48c4Sopenharmony_ci() fun_hfa4_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
82da0c48c4Sopenharmony_ci() fun_hfa4_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} {0x90, 0x43} {0x93, 0x4}
83da0c48c4Sopenharmony_ci() fun_hfa4_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
84da0c48c4Sopenharmony_ci() fun_hfa4_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
85da0c48c4Sopenharmony_ci() fun_nfa5_float: return value location: {0x70, 0}
86da0c48c4Sopenharmony_ci() fun_nfa5_double: return value location: {0x70, 0}
87da0c48c4Sopenharmony_ci() fun_nfa5_long_double: return value location: {0x70, 0}
88da0c48c4Sopenharmony_ci() fun_nfa5_float_a: return value location: {0x70, 0}
89da0c48c4Sopenharmony_ci() fun_nfa5_double_a: return value location: {0x70, 0}
90da0c48c4Sopenharmony_ci() fun_nfa5_long_double_a: return value location: {0x70, 0}
91da0c48c4Sopenharmony_ci() fun_hva1_vec_char_8: return value location: {0x90, 0x40}
92da0c48c4Sopenharmony_ci() fun_hva1_vec_short_8: return value location: {0x90, 0x40}
93da0c48c4Sopenharmony_ci() fun_hva1_vec_int_8: return value location: {0x90, 0x40}
94da0c48c4Sopenharmony_ci() fun_hva1_vec_long_8: return value location: {0x90, 0x40}
95da0c48c4Sopenharmony_ci() fun_hva1_vec_float_8: return value location: {0x90, 0x40}
96da0c48c4Sopenharmony_ci() fun_hva1_vec_double_8: return value location: {0x90, 0x40}
97da0c48c4Sopenharmony_ci() fun_hva1_vec_char_16_t: return value location: {0x90, 0x40}
98da0c48c4Sopenharmony_ci() fun_hva1_vec_short_16_t: return value location: {0x90, 0x40}
99da0c48c4Sopenharmony_ci() fun_hva1_vec_int_16_t: return value location: {0x90, 0x40}
100da0c48c4Sopenharmony_ci() fun_hva1_vec_long_16_t: return value location: {0x90, 0x40}
101da0c48c4Sopenharmony_ci() fun_hva1_vec_int128_16_t: return value location: {0x90, 0x40}
102da0c48c4Sopenharmony_ci() fun_hva1_vec_float_16_t: return value location: {0x90, 0x40}
103da0c48c4Sopenharmony_ci() fun_hva1_vec_double_16_t: return value location: {0x90, 0x40}
104da0c48c4Sopenharmony_ci() fun_hva2_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
105da0c48c4Sopenharmony_ci() fun_hva2_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
106da0c48c4Sopenharmony_ci() fun_hva2_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
107da0c48c4Sopenharmony_ci() fun_hva2_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
108da0c48c4Sopenharmony_ci() fun_hva2_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
109da0c48c4Sopenharmony_ci() fun_hva2_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
110da0c48c4Sopenharmony_ci() fun_hva2_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
111da0c48c4Sopenharmony_ci() fun_hva2_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
112da0c48c4Sopenharmony_ci() fun_hva2_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
113da0c48c4Sopenharmony_ci() fun_hva2_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
114da0c48c4Sopenharmony_ci() fun_hva2_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
115da0c48c4Sopenharmony_ci() fun_hva2_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
116da0c48c4Sopenharmony_ci() fun_hva2_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
117da0c48c4Sopenharmony_ci() fun_hva3_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
118da0c48c4Sopenharmony_ci() fun_hva3_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
119da0c48c4Sopenharmony_ci() fun_hva3_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
120da0c48c4Sopenharmony_ci() fun_hva3_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
121da0c48c4Sopenharmony_ci() fun_hva3_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
122da0c48c4Sopenharmony_ci() fun_hva3_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
123da0c48c4Sopenharmony_ci() fun_hva3_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
124da0c48c4Sopenharmony_ci() fun_hva3_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
125da0c48c4Sopenharmony_ci() fun_hva3_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
126da0c48c4Sopenharmony_ci() fun_hva3_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
127da0c48c4Sopenharmony_ci() fun_hva3_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
128da0c48c4Sopenharmony_ci() fun_hva3_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
129da0c48c4Sopenharmony_ci() fun_hva3_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
130da0c48c4Sopenharmony_ci() fun_hva4_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
131da0c48c4Sopenharmony_ci() fun_hva4_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
132da0c48c4Sopenharmony_ci() fun_hva4_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
133da0c48c4Sopenharmony_ci() fun_hva4_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
134da0c48c4Sopenharmony_ci() fun_hva4_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
135da0c48c4Sopenharmony_ci() fun_hva4_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
136da0c48c4Sopenharmony_ci() fun_hva4_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
137da0c48c4Sopenharmony_ci() fun_hva4_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
138da0c48c4Sopenharmony_ci() fun_hva4_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
139da0c48c4Sopenharmony_ci() fun_hva4_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
140da0c48c4Sopenharmony_ci() fun_hva4_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
141da0c48c4Sopenharmony_ci() fun_hva4_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
142da0c48c4Sopenharmony_ci() fun_hva4_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
143da0c48c4Sopenharmony_ci() fun_mixed_hfa3_cff: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4}
144da0c48c4Sopenharmony_ci() fun_mixed_hfa3_cdd: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
145da0c48c4Sopenharmony_ci() fun_mixed_hfa3_cldld: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
146da0c48c4Sopenharmony_ci() fun_mixed_hfa3_fcf: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4}
147da0c48c4Sopenharmony_ci() fun_mixed_hfa3_dcd: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
148da0c48c4Sopenharmony_ci() fun_mixed_hfa3_ldcld: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
149da0c48c4Sopenharmony_ci() fun_mixed_hfa2_fltsht_t: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
150da0c48c4Sopenharmony_ci() main: return value location: {0x50, 0}
151da0c48c4Sopenharmony_ciEOF
152da0c48c4Sopenharmony_ci
153da0c48c4Sopenharmony_ciexit 0
154