File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ / *
2+ * PROJECT: ReactOS msvcrt.dll
3+ * LICENSE: MIT (https://spdx.org/licenses/MIT)
4+ * PURPOSE: x86 asm implementation of __wine__RtlUnwind
5+ * COPYRIGHT: Copyright Timo Kreuzer <timo.kreuzer@reactos.org>
6+ * /
7+
8+ #include <asm. inc >
9+
10+ .code
11+
12+ EXTERN _RtlUnwind@ 16 :PROC
13+
14+ // ASM wrapper for Wine code. This is needed , because Wine code expects
15+ // RtlUnwind to restore the non - volatile registers , before returning , but
16+ // ours / the native one does not do th at .
17+ //
18+ // void
19+ // WINAPI
20+ // __wine__RtlUnwind(
21+ // PVOID TargetFrame ,
22+ // PVOID TargetIp ,
23+ // PEXCEPTION_RECORD ExceptionRecord ,
24+ // PVOID ReturnValue) ;
25+ //
26+ PUBLIC ___wine_RtlUnwind@ 16
27+ ___wine_RtlUnwind@ 16 :
28+
29+ push ebp
30+ mov ebp , esp
31+
32+ / * Save non - volatile registers * /
33+ push ebx
34+ push esi
35+ push edi
36+
37+ / * Call the native function * /
38+ push dword ptr [ ebp + 20 ] // ReturnValue
39+ push dword ptr [ ebp + 16 ] // ExceptionRecord
40+ push dword ptr [ ebp + 12 ] // TargetIp
41+ push dword ptr [ ebp + 8 ] // TargetFrame
42+ call _RtlUnwind@ 16
43+
44+ / * Restore non - volatile registers * /
45+ pop edi
46+ pop esi
47+ pop ebx
48+
49+ mov esp , ebp
50+ pop ebp
51+ ret 16
52+
53+ END
You can’t perform that action at this time.
0 commit comments