PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/i386/kernel/vsyscall-sysenter.S

https://bitbucket.org/evzijst/gittest
Assembly | 104 lines | 102 code | 2 blank | 0 comment | 2 complexity | 0464abc09e254c02534c4be84f3a3e58 MD5 | raw file
  1/*
  2 * Code for the vsyscall page.  This version uses the sysenter instruction.
  3 *
  4 * NOTE:
  5 * 1) __kernel_vsyscall _must_ be first in this page.
  6 * 2) there are alignment constraints on this stub, see vsyscall-sigreturn.S
  7 *    for details.
  8 */
  9
 10	.text
 11	.globl __kernel_vsyscall
 12	.type __kernel_vsyscall,@function
 13__kernel_vsyscall:
 14.LSTART_vsyscall:
 15	push %ecx
 16.Lpush_ecx:
 17	push %edx
 18.Lpush_edx:
 19	push %ebp
 20.Lenter_kernel:
 21	movl %esp,%ebp
 22	sysenter
 23
 24	/* 7: align return point with nop's to make disassembly easier */
 25	.space 7,0x90
 26
 27	/* 14: System call restart point is here! (SYSENTER_RETURN - 2) */
 28	jmp .Lenter_kernel
 29	/* 16: System call normal return point is here! */
 30	.globl SYSENTER_RETURN	/* Symbol used by entry.S.  */
 31SYSENTER_RETURN:
 32	pop %ebp
 33.Lpop_ebp:
 34	pop %edx
 35.Lpop_edx:
 36	pop %ecx
 37.Lpop_ecx:
 38	ret
 39.LEND_vsyscall:
 40	.size __kernel_vsyscall,.-.LSTART_vsyscall
 41	.previous
 42
 43	.section .eh_frame,"a",@progbits
 44.LSTARTFRAMEDLSI:
 45	.long .LENDCIEDLSI-.LSTARTCIEDLSI
 46.LSTARTCIEDLSI:
 47	.long 0			/* CIE ID */
 48	.byte 1			/* Version number */
 49	.string "zR"		/* NUL-terminated augmentation string */
 50	.uleb128 1		/* Code alignment factor */
 51	.sleb128 -4		/* Data alignment factor */
 52	.byte 8			/* Return address register column */
 53	.uleb128 1		/* Augmentation value length */
 54	.byte 0x1b		/* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
 55	.byte 0x0c		/* DW_CFA_def_cfa */
 56	.uleb128 4
 57	.uleb128 4
 58	.byte 0x88		/* DW_CFA_offset, column 0x8 */
 59	.uleb128 1
 60	.align 4
 61.LENDCIEDLSI:
 62	.long .LENDFDEDLSI-.LSTARTFDEDLSI /* Length FDE */
 63.LSTARTFDEDLSI:
 64	.long .LSTARTFDEDLSI-.LSTARTFRAMEDLSI /* CIE pointer */
 65	.long .LSTART_vsyscall-.	/* PC-relative start address */
 66	.long .LEND_vsyscall-.LSTART_vsyscall
 67	.uleb128 0
 68	/* What follows are the instructions for the table generation.
 69	   We have to record all changes of the stack pointer.  */
 70	.byte 0x04		/* DW_CFA_advance_loc4 */
 71	.long .Lpush_ecx-.LSTART_vsyscall
 72	.byte 0x0e		/* DW_CFA_def_cfa_offset */
 73	.byte 0x08		/* RA at offset 8 now */
 74	.byte 0x04		/* DW_CFA_advance_loc4 */
 75	.long .Lpush_edx-.Lpush_ecx
 76	.byte 0x0e		/* DW_CFA_def_cfa_offset */
 77	.byte 0x0c		/* RA at offset 12 now */
 78	.byte 0x04		/* DW_CFA_advance_loc4 */
 79	.long .Lenter_kernel-.Lpush_edx
 80	.byte 0x0e		/* DW_CFA_def_cfa_offset */
 81	.byte 0x10		/* RA at offset 16 now */
 82	.byte 0x85, 0x04	/* DW_CFA_offset %ebp -16 */
 83	/* Finally the epilogue.  */
 84	.byte 0x04		/* DW_CFA_advance_loc4 */
 85	.long .Lpop_ebp-.Lenter_kernel
 86	.byte 0x0e		/* DW_CFA_def_cfa_offset */
 87	.byte 0x0c		/* RA at offset 12 now */
 88	.byte 0xc5		/* DW_CFA_restore %ebp */
 89	.byte 0x04		/* DW_CFA_advance_loc4 */
 90	.long .Lpop_edx-.Lpop_ebp
 91	.byte 0x0e		/* DW_CFA_def_cfa_offset */
 92	.byte 0x08		/* RA at offset 8 now */
 93	.byte 0x04		/* DW_CFA_advance_loc4 */
 94	.long .Lpop_ecx-.Lpop_edx
 95	.byte 0x0e		/* DW_CFA_def_cfa_offset */
 96	.byte 0x04		/* RA at offset 4 now */
 97	.align 4
 98.LENDFDEDLSI:
 99	.previous
100
101/*
102 * Get the common code for the sigreturn entry points.
103 */
104#include "vsyscall-sigreturn.S"