Changeset 8e0eb63 in mainline for arch/ia32/src/asm.S
- Timestamp:
- 2006-03-15T18:01:43Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9e1c942
- Parents:
- 2f7342d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/asm.S
r2f7342d r8e0eb63 79 79 # 80 80 .macro handler i n 81 push %eax82 81 83 82 /* 84 * Test if this is interrupt with error word or not. 85 * Be careful about width of the shift. 83 * This macro distinguishes between two versions of ia32 exceptions. 84 * One version has error word and the other does not have it. 85 * The latter version fakes the error word on the stack so that the 86 * handlers and istate_t can be the same for both types. 86 87 */ 88 87 89 .iflt \i-32 88 movl $(1<<\i), %eax 89 .else 90 movl $0, %eax 91 .endif 92 andl $ERROR_WORD_INTERRUPT_LIST, %eax 93 movl (%esp), %eax 90 .if (1 << \i) & ERROR_WORD_INTERRUPT_LIST 91 /* 92 * Version with error word. 93 * Just take space equal to subl $4, %esp. 94 */ 95 nop 96 nop 97 nop 98 .else 99 /* 100 * Version without error word, 101 */ 102 subl $4, %esp 103 .endif 104 .else 105 /* 106 * Version without error word, 107 */ 108 subl $4, %esp 109 .endif 94 110 95 /*96 * If this interrupt/exception stores error word,97 * we need to pop EAX.98 * If this interrupt doesn't store error word, we emulate it99 * for the sake of consistent istate structure. In that case100 * we merely leave the EAX on the stack.101 */102 jz 0f103 104 /*105 * This exception stores error word.106 * Remove EAX from the stack.107 */108 addl $4, %esp109 110 0:111 111 pusha 112 112 movl %esp, %ebp … … 139 139 140 140 popa 141 addl $4,%esp # Skip error word, whether real or fake.141 addl $4,%esp # Skip error word, no matter whether real or fake. 142 142 iret 143 143
Note:
See TracChangeset
for help on using the changeset viewer.