1
2 #include <as-layout.h>
3
4 .section .__syscall_stub, "ax"
5 .globl batch_syscall_stub
6 batch_syscall_stub:
7 mov $(STUB_DATA), %rbx
8
9 mov %rbx, %rsp
10 add $0x10, %rsp
11 again:
12
13 mov 0x0(%rsp), %rax
14
15
16
17 mov %rax, 8(%rbx)
18 cmp $0, %rax
19 jz done
20
21
22 mov %rsp, 8(%rbx)
23
24
25 add %rax, %rsp
26
27
28 pop %rax
29
30
31 pop %rdi
32 pop %rsi
33 pop %rdx
34 pop %r10
35 pop %r8
36 pop %r9
37
38
39 syscall
40
41
42 pop %rcx
43 cmp %rcx, %rax
44 je again
45
46 done:
47
48 mov %rax, (%rbx)
49
50
51 int3