1/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#include <sysdep.h>
19
20ENTRY (syscall)
21 mr r0,r3
22 mr r3,r4
23 mr r4,r5
24 mr r5,r6
25 mr r6,r7
26 mr r7,r8
27 mr r8,r9
28#if defined(USE_PPC_SCV) && !IS_IN(rtld) && (defined(__PPC64__) || defined(__powerpc64__))
29 CHECK_SCV_SUPPORT r9 0f
30 stdu r1,-SCV_FRAME_SIZE(r1)
31 cfi_adjust_cfa_offset(SCV_FRAME_SIZE)
32 DO_CALL_SCV
33 addi r1,r1,SCV_FRAME_SIZE
34 cfi_adjust_cfa_offset(-SCV_FRAME_SIZE)
35 RET_SCV
36 b 1f
37#endif
380: DO_CALL_SC
39 RET_SC
401: TAIL_CALL_SYSCALL_ERROR
41PSEUDO_END (syscall)
42

source code of glibc/sysdeps/unix/sysv/linux/powerpc/syscall.S