SSBM Decomp
Loading...
Searching...
No Matches
placeholder.h
Go to the documentation of this file.
1#ifndef PLACEHOLDER_H
2#define PLACEHOLDER_H
3
4#include <m2c_macros.h> // IWYU pragma: export
5
7typedef void (*jmp_t)(void);
8
10typedef jmp_t jtbl_t[];
11
12#ifndef MWERKS_GEKKO
13/* Reciprocal sqrt estimate; callers Newton-refine it as 1/sqrt. */
14#define __frsqrte(x) (1.0 / sqrt(x))
15#define sqrtf__Ff(x) sqrtf(x)
16#define sqrtf_accurate(x) sqrtf(x)
17#define __fabs(f) fabsf(f)
18#endif
19
20#ifndef UNK_T
21#ifdef M2CTX
22#define UNK_T M2C_UNK
23#else
24#define UNK_T void*
25#endif
26#endif
27
28#define U32_TO_F32 4503599627370496.0
29#define S32_TO_F32 4503601774854144.0
30
31#define PAD_STACK(bytes) \
32 do { \
33 UNUSED unsigned char _[(bytes)]; \
34 } while (0)
35
37#define FORCE_PAD_STACK(bytes) \
38 do { \
39 UNUSED unsigned char _[(bytes)] = { 0 }; \
40 } while (0)
41
42#define FORCE_PAD_STACK_4 \
43 do { \
44 UNUSED u32 _0 = 0; \
45 } while (0)
46
47#define FORCE_PAD_STACK_8 \
48 do { \
49 UNUSED u64 _0 = 0; \
50 } while (0)
51
52#define FORCE_PAD_STACK_16 \
53 do { \
54 UNUSED u64 _0 = 0, _1 = 0; \
55 } while (0)
56
57#define FORCE_PAD_STACK_32 \
58 do { \
59 UNUSED u64 _0 = 0, _1 = 0, _2 = 0, _3 = 0; \
60 } while (0)
61
62#endif
This header contains macros emitted by m2c in "valid syntax" mode, which can be enabled by passing --...
void(* jmp_t)(void)
A label in a jump table.
Definition placeholder.h:7
jmp_t jtbl_t[]
A jump table.
Definition placeholder.h:10