1/*
2 * Copyright (C) 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17  .globl berberis_RawSyscallImpl
18  .balign 16
19
20berberis_RawSyscallImpl:
21  // The aapcs64 ABI passes the first RawSyscallImpl param (the syscall number) in x0.
22  // The arm64 syscall ABI passes the syscall number in x8.
23
24  // Move the syscall number up.
25  mov x8, x0
26
27  // Shift the arguments down.
28  mov x0, x1
29  mov x1, x2
30  mov x2, x3
31  mov x3, x4
32  mov x4, x5
33  mov x5, x6
34
35  svc #0
36
37  ret
38