Rev 1008 | Rev 1021 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1008 | Rev 1016 | ||
---|---|---|---|
Line 87... | Line 87... | ||
87 | .iflt \i-32 |
87 | .iflt \i-32 |
88 | movl $(1<<\i), %eax |
88 | movl $(1<<\i), %eax |
89 | .else |
89 | .else |
90 | movl $0, %eax |
90 | movl $0, %eax |
91 | .endif |
91 | .endif |
92 | andl $ERROR_WORD_INTERRUPT_LIST,%eax |
92 | andl $ERROR_WORD_INTERRUPT_LIST, %eax |
- | 93 | movl (%esp), %eax |
|
93 | 94 | ||
94 | /* |
95 | /* |
95 | * If this interrupt/exception stores error word, |
96 | * If this interrupt/exception stores error word, |
96 | * we need to pop EAX. |
97 | * we need to pop EAX. |
97 | * If this interrupt doesn't store error word, we emulate it |
98 | * If this interrupt doesn't store error word, we emulate it |
98 | * for the sake of consistent pstate structure. In that case |
99 | * for the sake of consistent istate structure. In that case |
99 | * we merely leave the EAX on the stack. |
100 | * we merely leave the EAX on the stack. |
100 | */ |
101 | */ |
101 | jz 0f |
102 | jz 0f |
102 | 103 | ||
103 | /* |
104 | /* |
104 | * This exception stores error word. |
105 | * This exception stores error word. |
- | 106 | * Remove EAX from the stack. |
|
105 | */ |
107 | */ |
106 | pop %eax |
108 | addl $4, %esp |
107 | jmp 1f |
- | |
108 | 109 | ||
109 | 0: |
110 | 0: |
110 | /* |
- | |
111 | * This interrupt doesn't store error word. |
- | |
112 | * Just restore EAX without doing POP. |
- | |
113 | */ |
- | |
114 | movl (%esp), %eax |
- | |
115 | - | ||
116 | 1: |
- | |
117 | pusha |
111 | pusha |
118 | movl %esp, %ebp |
112 | movl %esp, %ebp |
119 | push %ds |
113 | push %ds |
120 | push %es |
114 | push %es |
- | 115 | push %fs |
|
- | 116 | push %gs |
|
121 | 117 | ||
122 | # we must fill the data segment registers |
118 | # we must fill the data segment registers |
123 | movw $16,%ax |
119 | movw $16,%ax |
124 | movw %ax,%ds |
120 | movw %ax,%ds |
125 | movw %ax,%es |
121 | movw %ax,%es |
126 | 122 | ||
127 | movl $(\i),%edi |
- | |
128 | pushl %ebp |
123 | pushl %ebp |
129 | pushl %edi |
124 | pushl $(\i) |
130 | call exc_dispatch |
125 | call exc_dispatch |
131 | addl $8,%esp |
126 | addl $8,%esp |
132 | 127 | ||
- | 128 | pop %gs |
|
- | 129 | pop %fs |
|
133 | pop %es |
130 | pop %es |
134 | pop %ds |
131 | pop %ds |
135 | 132 | ||
136 | # Clear Nested Task flag. |
133 | # Clear Nested Task flag. |
137 | pushfl |
134 | pushfl |
138 | pop %eax |
135 | pop %eax |
139 | and $0xFFFFBFFF,%eax |
136 | and $0xffffbfff,%eax |
140 | push %eax |
137 | push %eax |
141 | popfl |
138 | popfl |
142 | 139 | ||
143 | popa |
140 | popa |
144 | add $4,%esp # Skip error word, whether real or fake. |
141 | addl $4,%esp # Skip error word, whether real or fake. |
145 | iret |
142 | iret |
146 | 143 | ||
147 | .if (\n-\i)-1 |
144 | .if (\n-\i)-1 |
148 | handler "(\i+1)",\n |
145 | handler "(\i+1)",\n |
149 | .endif |
146 | .endif |