SSBM Decomp
Toggle main menu visibility
Loading...
Searching...
No Matches
placeholder.h
Go to the documentation of this file.
1
#ifndef PLACEHOLDER_H
2
#define PLACEHOLDER_H
3
4
#include <
platform.h
>
5
6
#include <
m2c_macros.h
>
// IWYU pragma: export
7
#include <
dolphin/os.h
>
8
10
typedef
void (*
jmp_t
)(void);
11
13
typedef
jmp_t
jtbl_t
[];
14
15
#if defined(__clang__) || defined(__GNUC__)
16
#define NOT_IMPLEMENTED \
17
OSPanic(__FILE__, __LINE__, "%s is not implemented!", __func__)
18
#elif M2CTX
19
#define NOT_IMPLEMENTED
20
#elif defined(__MWERKS__) && defined(MUST_MATCH)
21
#define NOT_IMPLEMENTED asm { nop }
22
#else
23
#define NOT_IMPLEMENTED \
24
OSPanic(__FILE__, __LINE__, "Function is not implemented!")
25
#endif
26
27
#ifndef UNK_T
28
#ifdef M2CTX
29
#define UNK_T M2C_UNK
30
#else
31
#define UNK_T void*
32
#endif
33
#endif
34
35
#ifndef UNK_RET
36
#ifdef M2CTX
37
#define UNK_RET M2C_UNK
38
#else
39
#define UNK_RET void
40
#endif
41
#endif
42
43
#ifndef UNK_PARAMS
44
#ifdef M2CTX
45
#define UNK_PARAMS
46
#else
47
#define UNK_PARAMS void
48
#endif
49
#endif
50
51
#ifndef UNK_SIZE_ARRAY
52
#if defined(__MWERKS__) && !defined(M2CTX)
53
#define UNK_SIZE_ARRAY []
54
#else
55
#define UNK_SIZE_ARRAY [0]
56
#endif
57
#endif
58
59
#define U32_TO_F32 4503599627370496.0
60
#define S32_TO_F32 4503601774854144.0
61
62
#ifdef MWERKS_GEKKO
63
#define ASM asm
64
#else
65
#define ASM
66
#endif
67
68
#ifndef UNUSED
69
#if defined(__clang__) || defined(__GNUC__)
70
#define UNUSED __attribute__((unused))
71
#else
72
#define UNUSED
73
#endif
74
#endif
75
76
#define PAD_STACK(bytes) \
77
do { \
78
UNUSED unsigned char _[(bytes)]; \
79
} while (0)
80
82
#define FORCE_PAD_STACK(bytes) \
83
do { \
84
UNUSED unsigned char _[(bytes)] = { 0 }; \
85
} while (0)
86
87
#define FORCE_PAD_STACK_4 \
88
do { \
89
UNUSED u32 _0 = 0; \
90
} while (0)
91
92
#define FORCE_PAD_STACK_8 \
93
do { \
94
UNUSED u64 _0 = 0; \
95
} while (0)
96
97
#define FORCE_PAD_STACK_16 \
98
do { \
99
UNUSED u64 _0 = 0, _1 = 0; \
100
} while (0)
101
102
#define FORCE_PAD_STACK_32 \
103
do { \
104
UNUSED u64 _0 = 0, _1 = 0, _2 = 0, _3 = 0; \
105
} while (0)
106
107
#endif
m2c_macros.h
This header contains macros emitted by m2c in "valid syntax" mode, which can be enabled by passing --...
os.h
jmp_t
void(* jmp_t)(void)
A label in a jump table.
Definition
placeholder.h:10
jtbl_t
jmp_t jtbl_t[]
A jump table.
Definition
placeholder.h:13
platform.h
src
placeholder.h
Generated by
1.17.0