aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/ia32/vsyscall-sysenter.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/x86_64/ia32/vsyscall-sysenter.S
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/x86_64/ia32/vsyscall-sysenter.S')
-rw-r--r--arch/x86_64/ia32/vsyscall-sysenter.S94
1 files changed, 94 insertions, 0 deletions
diff --git a/arch/x86_64/ia32/vsyscall-sysenter.S b/arch/x86_64/ia32/vsyscall-sysenter.S
new file mode 100644
index 00000000000..8fb8e0ff3af
--- /dev/null
+++ b/arch/x86_64/ia32/vsyscall-sysenter.S
@@ -0,0 +1,94 @@
1/*
2 * Code for the vsyscall page. This version uses the sysenter instruction.
3 */
4
5#include <asm/ia32_unistd.h>
6#include <asm/offset.h>
7
8 .text
9 .section .text.vsyscall,"ax"
10 .globl __kernel_vsyscall
11 .type __kernel_vsyscall,@function
12__kernel_vsyscall:
13.LSTART_vsyscall:
14 push %ecx
15.Lpush_ecx:
16 push %edx
17.Lpush_edx:
18 push %ebp
19.Lenter_kernel:
20 movl %esp,%ebp
21 sysenter
22 .space 7,0x90
23 jmp .Lenter_kernel
24 /* 16: System call normal return point is here! */
25 pop %ebp
26.Lpop_ebp:
27 pop %edx
28.Lpop_edx:
29 pop %ecx
30.Lpop_ecx:
31 ret
32.LEND_vsyscall:
33 .size __kernel_vsyscall,.-.LSTART_vsyscall
34
35 .section .eh_frame,"a",@progbits
36.LSTARTFRAME:
37 .long .LENDCIE-.LSTARTCIE
38.LSTARTCIE:
39 .long 0 /* CIE ID */
40 .byte 1 /* Version number */
41 .string "zR" /* NUL-terminated augmentation string */
42 .uleb128 1 /* Code alignment factor */
43 .sleb128 -4 /* Data alignment factor */
44 .byte 8 /* Return address register column */
45 .uleb128 1 /* Augmentation value length */
46 .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
47 .byte 0x0c /* DW_CFA_def_cfa */
48 .uleb128 4
49 .uleb128 4
50 .byte 0x88 /* DW_CFA_offset, column 0x8 */
51 .uleb128 1
52 .align 4
53.LENDCIE:
54
55 .long .LENDFDE1-.LSTARTFDE1 /* Length FDE */
56.LSTARTFDE1:
57 .long .LSTARTFDE1-.LSTARTFRAME /* CIE pointer */
58 .long .LSTART_vsyscall-. /* PC-relative start address */
59 .long .LEND_vsyscall-.LSTART_vsyscall
60 .uleb128 0 /* Augmentation length */
61 /* What follows are the instructions for the table generation.
62 We have to record all changes of the stack pointer. */
63 .byte 0x04 /* DW_CFA_advance_loc4 */
64 .long .Lpush_ecx-.LSTART_vsyscall
65 .byte 0x0e /* DW_CFA_def_cfa_offset */
66 .byte 0x08 /* RA at offset 8 now */
67 .byte 0x04 /* DW_CFA_advance_loc4 */
68 .long .Lpush_edx-.Lpush_ecx
69 .byte 0x0e /* DW_CFA_def_cfa_offset */
70 .byte 0x0c /* RA at offset 12 now */
71 .byte 0x04 /* DW_CFA_advance_loc4 */
72 .long .Lenter_kernel-.Lpush_edx
73 .byte 0x0e /* DW_CFA_def_cfa_offset */
74 .byte 0x10 /* RA at offset 16 now */
75 .byte 0x85, 0x04 /* DW_CFA_offset %ebp -16 */
76 /* Finally the epilogue. */
77 .byte 0x04 /* DW_CFA_advance_loc4 */
78 .long .Lpop_ebp-.Lenter_kernel
79 .byte 0x0e /* DW_CFA_def_cfa_offset */
80 .byte 0x12 /* RA at offset 12 now */
81 .byte 0xc5 /* DW_CFA_restore %ebp */
82 .byte 0x04 /* DW_CFA_advance_loc4 */
83 .long .Lpop_edx-.Lpop_ebp
84 .byte 0x0e /* DW_CFA_def_cfa_offset */
85 .byte 0x08 /* RA at offset 8 now */
86 .byte 0x04 /* DW_CFA_advance_loc4 */
87 .long .Lpop_ecx-.Lpop_edx
88 .byte 0x0e /* DW_CFA_def_cfa_offset */
89 .byte 0x04 /* RA at offset 4 now */
90 .align 4
91.LENDFDE1:
92
93#define SYSCALL_ENTER_KERNEL int $0x80
94#include "vsyscall-sigreturn.S"