Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1016 → Rev 1015

/kernel/trunk/arch/ia32/src/asm.S
89,14 → 89,13
.else
movl $0, %eax
.endif
andl $ERROR_WORD_INTERRUPT_LIST, %eax
movl (%esp), %eax
andl $ERROR_WORD_INTERRUPT_LIST,%eax
 
/*
* If this interrupt/exception stores error word,
* If this interrupt/exception stores error word,
* we need to pop EAX.
* If this interrupt doesn't store error word, we emulate it
* for the sake of consistent istate structure. In that case
* for the sake of consistent pstate structure. In that case
* we merely leave the EAX on the stack.
*/
jz 0f
103,17 → 102,22
 
/*
* This exception stores error word.
* Remove EAX from the stack.
*/
addl $4, %esp
pop %eax
jmp 1f
 
0:
/*
* This interrupt doesn't store error word.
* Just restore EAX without doing POP.
*/
movl (%esp), %eax
 
1:
pusha
movl %esp, %ebp
push %ds
push %es
push %fs
push %gs
 
# we must fill the data segment registers
movw $16,%ax
120,13 → 124,12
movw %ax,%ds
movw %ax,%es
 
movl $(\i),%edi
pushl %ebp
pushl $(\i)
pushl %edi
call exc_dispatch
addl $8,%esp
 
pop %gs
pop %fs
pop %es
pop %ds
 
133,12 → 136,12
# Clear Nested Task flag.
pushfl
pop %eax
and $0xffffbfff,%eax
and $0xFFFFBFFF,%eax
push %eax
popfl
popa
addl $4,%esp # Skip error word, whether real or fake.
add $4,%esp # Skip error word, whether real or fake.
iret
 
.if (\n-\i)-1