Subversion Repositories HelenOS-historic

Rev

Rev 534 | Rev 717 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 534 Rev 576
Line 157... Line 157...
157
#
157
#
158
# Declare interrupt handlers for n interrupt
158
# Declare interrupt handlers for n interrupt
159
# vectors starting at vector i.
159
# vectors starting at vector i.
160
#
160
#
161
# The handlers setup data segment registers
161
# The handlers setup data segment registers
162
# and call trap_dispatcher().
162
# and call exc_dispatch().
163
#
163
#
164
.macro handler i n
164
.macro handler i n
165
	pushq %rbp
165
	pushq %rbp
166
	movq %rsp,%rbp
166
	movq %rsp,%rbp
167
	
167
	
168
	push_all_gpr
168
	push_all_gpr
169
 
169
 
170
	movq $(\i),%rdi   # %rdi - first parameter
170
	movq $(\i),%rdi   # %rdi - first parameter
171
	movq %rbp, %rsi
171
	movq %rbp, %rsi
172
	addq $8, %rsi     # %rsi - second parameter - original stack
172
	addq $8, %rsi     # %rsi - second parameter - original stack
173
	call trap_dispatcher 	# trap_dispatcher(i, stack)
173
	call exc_dispatch 	# exc_dispatch(i, stack)
174
 
174
 
175
# Test if this is interrupt with error word or not
175
# Test if this is interrupt with error word or not
176
	mov $\i,%cl;
176
	mov $\i,%cl;
177
	movl $1,%eax;
177
	movl $1,%eax;
178
	test $0xe0,%cl;
178
	test $0xe0,%cl;