- Update Xen patches to 3.3-rc5 and c/s 1157.
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / vdso / vdso32 / syscall.S
1 /*
2  * Code for the vDSO.  This version uses the syscall instruction.
3  *
4  * First get the common code for the sigreturn entry points.
5  * This must come first.
6  */
7 #define SYSCALL_ENTER_KERNEL    syscall
8 #include "sigreturn.S"
9
10 #include <asm/segment.h>
11
12         .text
13         .globl __kernel_vsyscall
14         .type __kernel_vsyscall,@function
15         ALIGN
16 __kernel_vsyscall:
17 .LSTART_vsyscall:
18         push    %ebp
19 .Lpush_ebp:
20         movl    %ecx, %ebp
21         syscall
22 #ifndef CONFIG_XEN
23         movl    $__USER32_DS, %ecx
24         movl    %ecx, %ss
25 #endif
26         movl    %ebp, %ecx
27         popl    %ebp
28 .Lpop_ebp:
29         ret
30 .LEND_vsyscall:
31         .size __kernel_vsyscall,.-.LSTART_vsyscall
32
33         .section .eh_frame,"a",@progbits
34 .LSTARTFRAME:
35         .long .LENDCIE-.LSTARTCIE
36 .LSTARTCIE:
37         .long 0                 /* CIE ID */
38         .byte 1                 /* Version number */
39         .string "zR"            /* NUL-terminated augmentation string */
40         .uleb128 1              /* Code alignment factor */
41         .sleb128 -4             /* Data alignment factor */
42         .byte 8                 /* Return address register column */
43         .uleb128 1              /* Augmentation value length */
44         .byte 0x1b              /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
45         .byte 0x0c              /* DW_CFA_def_cfa */
46         .uleb128 4
47         .uleb128 4
48         .byte 0x88              /* DW_CFA_offset, column 0x8 */
49         .uleb128 1
50         .align 4
51 .LENDCIE:
52
53         .long .LENDFDE1-.LSTARTFDE1     /* Length FDE */
54 .LSTARTFDE1:
55         .long .LSTARTFDE1-.LSTARTFRAME  /* CIE pointer */
56         .long .LSTART_vsyscall-.        /* PC-relative start address */
57         .long .LEND_vsyscall-.LSTART_vsyscall
58         .uleb128 0                      /* Augmentation length */
59         /* What follows are the instructions for the table generation.
60            We have to record all changes of the stack pointer.  */
61         .byte 0x40 + .Lpush_ebp-.LSTART_vsyscall /* DW_CFA_advance_loc */
62         .byte 0x0e              /* DW_CFA_def_cfa_offset */
63         .uleb128 8
64         .byte 0x85, 0x02        /* DW_CFA_offset %ebp -8 */
65         .byte 0x40 + .Lpop_ebp-.Lpush_ebp /* DW_CFA_advance_loc */
66         .byte 0xc5              /* DW_CFA_restore %ebp */
67         .byte 0x0e              /* DW_CFA_def_cfa_offset */
68         .uleb128 4
69         .align 4
70 .LENDFDE1:
71         .previous
72
73         /*
74          * Pad out the segment to match the size of the sysenter.S version.
75          */
76 VDSO32_vsyscall_eh_frame_size = 0x40
77         .section .data,"aw",@progbits
78         .space VDSO32_vsyscall_eh_frame_size-(.LENDFDE1-.LSTARTFRAME), 0
79         .previous