1 | /* Check LD_AUDIT for aarch64 ABI specifics. |
2 | Copyright (C) 2022-2024 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. |
4 | |
5 | The GNU C Library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either |
8 | version 2.1 of the License, or (at your option) any later version. |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU Lesser General Public |
16 | License along with the GNU C Library; if not, see |
17 | <https://www.gnu.org/licenses/>. */ |
18 | |
19 | #include <array_length.h> |
20 | #include <stdlib.h> |
21 | #include <support/check.h> |
22 | #include "tst-audit27mod.h" |
23 | |
24 | float |
25 | tst_audit27_func_float (float a0, float a1, float a2, float a3, float a4, |
26 | float a5, float a6, float a7) |
27 | { |
28 | if (a0 != FUNC_FLOAT_ARG0) |
29 | FAIL_EXIT1 ("a0: %a != %a" , a0, FUNC_FLOAT_ARG0); |
30 | if (a1 != FUNC_FLOAT_ARG1) |
31 | FAIL_EXIT1 ("a1: %a != %a" , a1, FUNC_FLOAT_ARG1); |
32 | if (a2 != FUNC_FLOAT_ARG2) |
33 | FAIL_EXIT1 ("a2: %a != %a" , a2, FUNC_FLOAT_ARG2); |
34 | if (a3 != FUNC_FLOAT_ARG3) |
35 | FAIL_EXIT1 ("a3: %a != %a" , a3, FUNC_FLOAT_ARG3); |
36 | if (a4 != FUNC_FLOAT_ARG4) |
37 | FAIL_EXIT1 ("a4: %a != %a" , a4, FUNC_FLOAT_ARG4); |
38 | if (a5 != FUNC_FLOAT_ARG5) |
39 | FAIL_EXIT1 ("a5: %a != %a" , a5, FUNC_FLOAT_ARG5); |
40 | if (a6 != FUNC_FLOAT_ARG6) |
41 | FAIL_EXIT1 ("a6: %a != %a" , a6, FUNC_FLOAT_ARG6); |
42 | if (a7 != FUNC_FLOAT_ARG7) |
43 | FAIL_EXIT1 ("a7: %a != %a" , a7, FUNC_FLOAT_ARG7); |
44 | |
45 | return FUNC_FLOAT_RET; |
46 | } |
47 | |
48 | double |
49 | tst_audit27_func_double (double a0, double a1, double a2, double a3, double a4, |
50 | double a5, double a6, double a7) |
51 | { |
52 | if (a0 != FUNC_DOUBLE_ARG0) |
53 | FAIL_EXIT1 ("a0: %la != %la" , a0, FUNC_DOUBLE_ARG0); |
54 | if (a1 != FUNC_DOUBLE_ARG1) |
55 | FAIL_EXIT1 ("a1: %la != %la" , a1, FUNC_DOUBLE_ARG1); |
56 | if (a2 != FUNC_DOUBLE_ARG2) |
57 | FAIL_EXIT1 ("a2: %la != %la" , a2, FUNC_DOUBLE_ARG2); |
58 | if (a3 != FUNC_DOUBLE_ARG3) |
59 | FAIL_EXIT1 ("a3: %la != %la" , a3, FUNC_DOUBLE_ARG3); |
60 | if (a4 != FUNC_DOUBLE_ARG4) |
61 | FAIL_EXIT1 ("a4: %la != %la" , a4, FUNC_DOUBLE_ARG4); |
62 | if (a5 != FUNC_DOUBLE_ARG5) |
63 | FAIL_EXIT1 ("a5: %la != %la" , a5, FUNC_DOUBLE_ARG5); |
64 | if (a6 != FUNC_DOUBLE_ARG6) |
65 | FAIL_EXIT1 ("a6: %la != %la" , a6, FUNC_DOUBLE_ARG6); |
66 | if (a7 != FUNC_DOUBLE_ARG7) |
67 | FAIL_EXIT1 ("a7: %la != %la" , a7, FUNC_DOUBLE_ARG7); |
68 | |
69 | return FUNC_DOUBLE_RET; |
70 | } |
71 | |
72 | long double |
73 | tst_audit27_func_ldouble (long double a0, long double a1, long double a2, |
74 | long double a3, long double a4, long double a5, |
75 | long double a6, long double a7) |
76 | { |
77 | if (a0 != FUNC_LDOUBLE_ARG0) |
78 | FAIL_EXIT1 ("a0: %La != %La" , a0, FUNC_LDOUBLE_ARG0); |
79 | if (a1 != FUNC_LDOUBLE_ARG1) |
80 | FAIL_EXIT1 ("a1: %La != %La" , a1, FUNC_LDOUBLE_ARG1); |
81 | if (a2 != FUNC_LDOUBLE_ARG2) |
82 | FAIL_EXIT1 ("a2: %La != %La" , a2, FUNC_LDOUBLE_ARG2); |
83 | if (a3 != FUNC_LDOUBLE_ARG3) |
84 | FAIL_EXIT1 ("a3: %La != %La" , a3, FUNC_LDOUBLE_ARG3); |
85 | if (a4 != FUNC_LDOUBLE_ARG4) |
86 | FAIL_EXIT1 ("a4: %La != %La" , a4, FUNC_LDOUBLE_ARG4); |
87 | if (a5 != FUNC_LDOUBLE_ARG5) |
88 | FAIL_EXIT1 ("a5: %La != %La" , a5, FUNC_LDOUBLE_ARG5); |
89 | if (a6 != FUNC_LDOUBLE_ARG6) |
90 | FAIL_EXIT1 ("a6: %La != %La" , a6, FUNC_LDOUBLE_ARG6); |
91 | if (a7 != FUNC_LDOUBLE_ARG7) |
92 | FAIL_EXIT1 ("a7: %La != %La" , a7, FUNC_LDOUBLE_ARG7); |
93 | |
94 | return FUNC_LDOUBLE_RET; |
95 | } |
96 | |