GDB: trad-frame: Store length of value_bytes in trad_frame_saved_reg
[binutils-gdb.git] / gdb / testsuite / gdb.arch / ppc64-break-on-_exit.c
bloba4e7c0a86d242cc58d8e669d8822fe6216bc4d0f
1 /* This file is part of GDB, the GNU debugger.
3 Copyright 2021-2024 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program 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
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* This file was generated from glibc's 2.31 _exit.c, by doing a glibc build
19 on ppc64le-linux, copying the command line, adding -g0 -save-temps and
20 reducing the _exit.i file. */
22 void _exit (int status);
24 extern __thread int __libc_errno;
26 void
27 _exit (int status)
29 while (1)
32 long int sc_err __attribute__ ((unused));
33 long int sc_ret
34 = ({
35 register long int r0 __asm__ ("r0");
36 register long int r3 __asm__ ("r3");
37 register long int r4 __asm__ ("r4");
38 register long int r5 __asm__ ("r5");
39 register long int r6 __asm__ ("r6");
40 register long int r7 __asm__ ("r7");
41 register long int r8 __asm__ ("r8");
42 long int arg1 = (long int) (status);
44 r0 = 234;
46 extern void __illegally_sized_syscall_arg1 (void);
47 if (__builtin_classify_type (status) != 5 && sizeof (status) > 8)
48 __illegally_sized_syscall_arg1 ();
50 r3 = arg1;
51 __asm__ __volatile__ ("sc\n\t" "mfcr %0\n\t" "0:"
52 : "=&r" (r0), "=&r" (r3), "=&r" (r4),
53 "=&r" (r5), "=&r" (r6), "=&r" (r7),
54 "=&r" (r8) : "0" (r0), "1" (r3)
55 : "r9", "r10", "r11", "r12", "cr0", "ctr", "memory");
56 sc_err = r0;
58 r3;
59 });
61 if (((void) (sc_ret), __builtin_expect ((sc_err) & (1 << 28), 0)))
63 (__libc_errno = ((sc_ret)));
64 sc_ret = -1L;
67 sc_ret;
68 });
71 long int sc_err __attribute__ ((unused));
72 long int sc_ret
73 = ({
74 register long int r0 __asm__ ("r0");
75 register long int r3 __asm__ ("r3");
76 register long int r4 __asm__ ("r4");
77 register long int r5 __asm__ ("r5");
78 register long int r6 __asm__ ("r6");
79 register long int r7 __asm__ ("r7");
80 register long int r8 __asm__ ("r8");
81 long int arg1 = (long int) (status);
83 r0 = 1;
85 extern void __illegally_sized_syscall_arg1 (void);
86 if (__builtin_classify_type (status) != 5 && sizeof (status) > 8)
87 __illegally_sized_syscall_arg1 ();
89 r3 = arg1;
90 __asm__ __volatile__ ("sc\n\t" "mfcr %0\n\t" "0:"
91 : "=&r" (r0), "=&r" (r3), "=&r" (r4),
92 "=&r" (r5), "=&r" (r6), "=&r" (r7),
93 "=&r" (r8) : "0" (r0), "1" (r3)
94 : "r9", "r10", "r11", "r12", "cr0", "ctr", "memory");
95 sc_err = r0;
97 r3;
98 });
100 if (((void) (sc_ret), __builtin_expect ((sc_err) & (1 << 28), 0)))
102 (__libc_errno = ((sc_ret)));
103 sc_ret = -1L;
106 sc_ret;
110 asm (".long 0");