1/* 2 * Copyright (C) 2020 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 22 .cfi_startproc 23 push %ebx 24 .cfi_adjust_cfa_offset 4 25 .cfi_rel_offset ebx, 0 26 push %esi 27 .cfi_adjust_cfa_offset 4 28 .cfi_rel_offset esi, 0 29 push %edi 30 .cfi_adjust_cfa_offset 4 31 .cfi_rel_offset edi, 0 32 push %ebp 33 .cfi_adjust_cfa_offset 4 34 .cfi_rel_offset ebp, 0 35 36 // The params are shifted 16 bytes after the saved regs 37 mov 20(%esp), %eax 38 mov 24(%esp), %ebx 39 mov 28(%esp), %ecx 40 mov 32(%esp), %edx 41 mov 36(%esp), %esi 42 mov 40(%esp), %edi 43 mov 44(%esp), %ebp 44 45 int $0x80 46 47 pop %ebp 48 .cfi_adjust_cfa_offset -4 49 .cfi_restore ebp 50 pop %edi 51 .cfi_adjust_cfa_offset -4 52 .cfi_restore edi 53 pop %esi 54 .cfi_adjust_cfa_offset -4 55 .cfi_restore esi 56 pop %ebx 57 .cfi_adjust_cfa_offset -4 58 .cfi_restore ebx 59 60 ret 61 .cfi_endproc 62