NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
__init_cpp_exceptions.cpp
Go to the documentation of this file.
1#include <types.h>
4
5extern "C" {
6
7__declspec(section ".init") extern __eti_init_info _eti_init_info[];
8
9extern void __destroy_global_chain();
10extern int __register_fragment(void *, void *);
11extern void __unregister_fragment(int);
12
14static int fragmentID = -2;
15
19 if (fragmentID == -2) {
20 register char *temp; // r4
21 asm {mr temp, r2;};
22 void *r2 = temp;
23
24 __eti_init_info *info = _eti_init_info;
25 fragmentID = __register_fragment(info, r2);
26 }
27}
28
32 if (fragmentID != -2) {
33 __unregister_fragment(fragmentID);
34 fragmentID = -2;
35 }
36}
37
38} // extern "C"
39
40#pragma section ".ctors$10"
41__declspec(section ".ctors$10")
42 extern void * const __init_cpp_exceptions_reference = __init_cpp_exceptions;
43#pragma section ".dtors$10"
44__declspec(section ".dtors$10")
45 extern void * const __destroy_global_chain_reference = __destroy_global_chain;
46#pragma section ".dtors$15"
47__declspec(section ".dtors$15")
48 extern void * const __fini_cpp_exceptions_reference = __fini_cpp_exceptions;
void __init_cpp_exceptions(void)
Registers the exception table.
void __fini_cpp_exceptions(void)
Unregisters the exception table.
static int fragmentID
ID given to fragment by exception-handling.
void __destroy_global_chain()
Destroys all constructed global objects.
C++ exception table info.