Changeset 21636 for trunk/include
- Timestamp:
- Jun 16, 2011, 3:44:07 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/excpt.h
r21633 r21636 91 91 __seh_frame.Pointers.ContextRecord = NULL; \ 92 92 __seh_frame.state = 0; \ 93 __asm__("\n0:\n"); /* pFilterCallback */ \ 93 /* install exception handler, both Win32 and OS/2 chains (note: EDX is in \ 94 * clobber too since it may carry any value when we jump back to \ 95 * pFilterCallback from the handler */ \ 96 __asm__ ("leal %0, %%ecx; " \ 97 "movl %%fs, %%eax; " \ 98 "andl $0x0000FFFF, %%eax; " \ 99 "movl %%eax, 64(%%ecx); " \ 100 "movl %%fs:0, %%eax; " \ 101 "movl %%eax, 0(%%ecx); " \ 102 "movl %%eax, 60(%%ecx); " \ 103 "movl $0f, 8(%%ecx); " \ 104 \ 105 "movl %%ebx, 24(%%ecx); " \ 106 "movl %%esi, 28(%%ecx); " \ 107 "movl %%edi, 32(%%ecx); " \ 108 "movl %%ebp, 36(%%ecx); " \ 109 "movl %%esp, 40(%%ecx); " \ 110 \ 111 "pushl %%fs; " \ 112 "pushl $Dos32TIB; " \ 113 "popl %%fs; " \ 114 "movl %%fs:0, %%eax; " \ 115 "movl %%eax, 44(%%ecx); " \ 116 "movl %%ecx, %%fs:0; " \ 117 "popl %%fs; " \ 118 \ 119 "movl %%ecx, %%fs:0; " \ 120 \ 121 "\n0: /* pFilterCallback */ \n" \ 122 \ 123 : : "m" (__seh_frame) \ 124 : "%eax", "%ecx", "%edx"); \ 94 125 for (; __seh_frame.state <= 3; ++__seh_frame.state) \ 95 126 if (__seh_frame.state == 0) \ 96 127 { \ 97 /* install exception handler (both Win32 and OS/2 chains) */ \98 __asm__ ("leal %0, %%ecx; " \99 "movl %%fs, %%eax; " \100 "andl $0x0000FFFF, %%eax; " \101 "movl %%eax, 64(%%ecx); " \102 "movl %%fs:0, %%eax; " \103 "movl %%eax, 0(%%ecx); " \104 "movl %%eax, 60(%%ecx); " \105 "movl $0b, 8(%%ecx); " \106 "" \107 "movl %%ebx, 24(%%ecx); " \108 "movl %%esi, 28(%%ecx); " \109 "movl %%edi, 32(%%ecx); " \110 "movl %%ebp, 36(%%ecx); " \111 "movl %%esp, 40(%%ecx); " \112 "" \113 "pushl %%fs; " \114 "pushl $Dos32TIB; " \115 "popl %%fs; " \116 "movl %%fs:0, %%eax; " \117 "movl %%eax, 44(%%ecx); " \118 "movl %%ecx, %%fs:0; " \119 "popl %%fs; " \120 "" \121 "movl %%ecx, %%fs:0; " \122 : : "m" (__seh_frame) \123 : "%eax", "%ecx"); \124 128 { 125 129 … … 141 145 * registration record, so use the original __seh_frame value) */ \ 142 146 __asm__ ("leal %0, %%ecx; " \ 143 ""\147 \ 144 148 "movl 64(%%ecx), %%eax; " \ 145 149 "movl %%eax, %%fs; " \ 146 ""\150 \ 147 151 "movl 60(%%ecx), %%eax; " \ 148 152 "movl %%eax, %%fs:0; " \ 149 ""\153 \ 150 154 "pushl %%fs; " \ 151 155 "pushl $Dos32TIB; " \ … … 175 179 * registration record, so use the original __seh_frame value) */ \ 176 180 __asm__ ("leal %0, %%ecx; " \ 177 ""\181 \ 178 182 "movl 64(%%ecx), %%eax; " \ 179 183 "movl %%eax, %%fs; " \ 180 ""\184 \ 181 185 "movl 60(%%ecx), %%eax; " \ 182 186 "movl %%eax, %%fs:0; " \ 183 ""\187 \ 184 188 "pushl %%fs; " \ 185 189 "pushl $Dos32TIB; " \
Note:
See TracChangeset
for help on using the changeset viewer.