]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blame - arch/x86/um/stub_32.S
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-kernels.git] / arch / x86 / um / stub_32.S
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
37185b33 2#include <as-layout.h>
d67b569f 3
276c974a 4.section .__syscall_stub, "ax"
c5600490
JD
5
6 .globl batch_syscall_stub
7batch_syscall_stub:
07bf731e 8 /* load pointer to first operation */
4bdf8bc4 9 mov $(STUB_DATA+8), %esp
07bf731e
BS
10
11again:
12 /* load length of additional data */
13 mov 0x0(%esp), %eax
14
15 /* if(length == 0) : end of list */
16 /* write possible 0 to header */
4bdf8bc4 17 mov %eax, STUB_DATA+4
c5600490
JD
18 cmpl $0, %eax
19 jz done
07bf731e
BS
20
21 /* save current pointer */
4bdf8bc4 22 mov %esp, STUB_DATA+4
07bf731e
BS
23
24 /* skip additional data */
25 add %eax, %esp
26
27 /* load syscall-# */
28 pop %eax
29
30 /* load syscall params */
c5600490
JD
31 pop %ebx
32 pop %ecx
33 pop %edx
34 pop %esi
35 pop %edi
36 pop %ebp
07bf731e
BS
37
38 /* execute syscall */
c5600490 39 int $0x80
07bf731e
BS
40
41 /* check return value */
42 pop %ebx
43 cmp %ebx, %eax
44 je again
45
46done:
47 /* save return value */
4bdf8bc4 48 mov %eax, STUB_DATA
07bf731e
BS
49
50 /* stop */
51 int3