⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asm.s

📁 linux内核
💻 S
字号:
/* *  linux/kernel/asm.s * *  (C) 1991  Linus Torvalds *//* * asm.s contains the low-level code for most hardware faults. * page_exception is handled by the mm, so that isn't here. This * file also handles (hopefully) fpu-exceptions due to TS-bit, as * the fpu must be properly saved/resored. This hasn't been tested. */.globl _divide_error,_debug,_nmi,_int3,_overflow,_bounds,_invalid_op.globl _double_fault,_coprocessor_segment_overrun.globl _invalid_TSS,_segment_not_present,_stack_segment.globl _general_protection,_coprocessor_error,_irq13,_reserved.globl _alignment_check.globl _page_fault_divide_error:	pushl $0 		# no error code	pushl $_do_divide_errorerror_code:	push %fs	push %es	push %ds	pushl %eax	pushl %ebp	pushl %edi	pushl %esi	pushl %edx	pushl %ecx	pushl %ebx	cld	movl $-1, %eax	xchgl %eax, 0x2c(%esp)	# orig_eax (get the error code. )	xorl %ebx,%ebx		# zero ebx	mov %gs,%bx		# get the lower order bits of gs	xchgl %ebx, 0x28(%esp)	# get the address and save gs.	pushl %eax		# push the error code	lea 52(%esp),%edx	pushl %edx	movl $0x10,%edx	mov %dx,%ds	mov %dx,%es	mov %dx,%fs	call *%ebx	addl $8,%esp	popl %ebx	popl %ecx	popl %edx	popl %esi	popl %edi	popl %ebp	popl %eax	pop %ds	pop %es	pop %fs	pop %gs	addl $4,%esp	iret_debug:	pushl $0	pushl $_do_int3		# _do_debug	jmp error_code_nmi:	pushl $0	pushl $_do_nmi	jmp error_code_int3:	pushl $0	pushl $_do_int3	jmp error_code_overflow:	pushl $0	pushl $_do_overflow	jmp error_code_bounds:	pushl $0	pushl $_do_bounds	jmp error_code_invalid_op:	pushl $0	pushl $_do_invalid_op	jmp error_code_coprocessor_segment_overrun:	pushl $0	pushl $_do_coprocessor_segment_overrun	jmp error_code_reserved:	pushl $0	pushl $_do_reserved	jmp error_code_irq13:	pushl %eax	xorb %al,%al	outb %al,$0xF0	movb $0x20,%al	outb %al,$0x20	jmp 1f1:	jmp 1f1:	outb %al,$0xA0	popl %eax	jmp _coprocessor_error_double_fault:	pushl $_do_double_fault	jmp error_code_invalid_TSS:	pushl $_do_invalid_TSS	jmp error_code_segment_not_present:	pushl $_do_segment_not_present	jmp error_code_stack_segment:	pushl $_do_stack_segment	jmp error_code_general_protection:	pushl $_do_general_protection	jmp error_code_alignment_check:	pushl $_do_alignment_check	jmp error_code_page_fault:	pushl $_do_page_fault	jmp error_code

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -