Changeset 21828 for branches/gcc-kmk/src/kernel32/exceptutil.asm
- Timestamp:
- Nov 29, 2011, 4:11:21 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/kernel32/exceptutil.asm
r21824 r21828 33 33 34 34 CODE32 SEGMENT DWORD PUBLIC USE32 'CODE' 35 36 35 37 public _RaiseException@16 36 38 extrn _OS2RaiseException : near 37 39 38 40 _RaiseException@16 proc near 41 42 ifdef __GNUC__ 43 ; _OS2RaiseException is _cdecl 44 45 push ebp 46 mov ebp, esp 47 push eax 48 49 mov eax, 0 50 mov eax, ss 51 push eax 52 mov eax, gs 53 push eax 54 mov eax, fs 55 push eax 56 mov eax, es 57 push eax 58 mov eax, ds 59 push eax 60 mov eax, cs 61 push cs 62 push esi 63 push edi 64 push edx 65 push ecx 66 push ebx 67 push dword ptr [ebp-4] ; original eax 68 pushfd 69 push dword ptr [ebp] ; original ebp 70 push ebp 71 add dword ptr [esp], 4 ; original esp 72 push dword ptr [ebp + 4] ; original eip (return address) 73 74 push dword ptr [ebp + 20] ; arg 4 (DWORD *lpArguments) 75 push dword ptr [ebp + 16] ; arg 3 (DWORD cArguments) 76 push dword ptr [ebp + 12] ; arg 2 (DWORD dwExceptionFlags) 77 push dword ptr [ebp + 8] ; arg 1 (DWORD dwExceptionCode) 78 79 call _OS2RaiseException 80 81 add esp, 20 * 4 82 83 pop eax 84 pop ebp 85 else 86 ; _OS2RaiseException _Pascal 39 87 push dword ptr [esp+4] ;DWORD dwExceptionCode 40 88 push dword ptr [esp+12] ;DWORD dwExceptionFlags … … 66 114 push eax 67 115 call _OS2RaiseException 116 endif 68 117 69 118 ret 16 ;__stdcall 119 70 120 _RaiseException@16 endp 121 71 122 72 123 public _RtlUnwind@16 … … 74 125 75 126 _RtlUnwind@16 proc near 127 128 ifdef __GNUC__ 129 ; OS2RtlUnwind is _cdecl 130 131 push ebp 132 mov ebp, esp 133 push eax 134 135 mov eax, 0 136 mov eax, ss 137 push eax 138 mov eax, gs 139 push eax 140 mov eax, fs 141 push eax 142 mov eax, es 143 push eax 144 mov eax, ds 145 push eax 146 mov eax, cs 147 push cs 148 push esi 149 push edi 150 push edx 151 push ecx 152 push ebx 153 push dword ptr [ebp-4] ; original eax 154 pushfd 155 push dword ptr [ebp] ; original ebp 156 push ebp 157 add dword ptr [esp], 4 ; original esp 158 push dword ptr [ebp + 4] ; original eip (return address) 159 160 push dword ptr [ebp + 20] ; arg 4 (DWORD returnEax) 161 push dword ptr [ebp + 16] ; arg 3 (PWINEXCEPTION_RECORD pRecord) 162 push dword ptr [ebp + 12] ; arg 2 (LPVOID unusedEip) 163 push dword ptr [ebp + 8] ; arg 1 (PWINEXCEPTION_FRAME pEndFrame) 164 165 call _OS2RtlUnwind 166 167 add esp, 20 * 4 168 169 pop eax 170 pop ebp 171 else 172 ; OS2RtlUnwind is _Pascal 76 173 push dword ptr [esp+4] ;PWINEXCEPTION_FRAME pEndFrame 77 174 push dword ptr [esp+12] ;LPVOID unusedEip … … 103 200 push eax 104 201 call _OS2RtlUnwind 202 endif 105 203 106 204 ret 16 ;__stdcall 205 107 206 _RtlUnwind@16 endp 108 207
Note:
See TracChangeset
for help on using the changeset viewer.