diff options
| author | Aetias <144526980+AetiasHax@users.noreply.github.com> | 2024-10-19 13:20:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-19 13:20:17 +0200 |
| commit | ffdfd609fb9bc8f968ddc6f187da1d50731cbf69 (patch) | |
| tree | d13b6142759bc78d50a491d87de56e7e9213c9a4 /include/global.h | |
| parent | 32c4725191813003e34a263a6d1530f806d1ac7c (diff) | |
| parent | 10c2e3413b3244c5f2adffac1140f37920f13988 (diff) | |
Merge pull request #51 from AetiasHax/dsd
`dsd` integration
Diffstat (limited to 'include/global.h')
| -rw-r--r-- | include/global.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/include/global.h b/include/global.h index 10a927aa..83b4c87f 100644 --- a/include/global.h +++ b/include/global.h @@ -3,20 +3,9 @@ #define NULL 0 -#define GET_FLAG(arr, pos) (((1 << ((pos) & 0x1f)) & (arr)[((u32)(pos)) >> 5]) != 0) -#define SET_FLAG(arr, pos) ((arr)[((u32)(pos)) >> 5] |= 1 << ((pos) & 0x1f)) -#define RESET_FLAG(arr, pos) ((arr)[((u32)(pos)) >> 5] &= ~(1 << ((pos) & 0x1f))) - -// NONMATCH(name) marks the function `name` as nonmatching -// The reason for the macro is to easily detect it in progress.py -#ifdef NONMATCHING -#define NONMATCH(name) name -#else -#define NONMATCH(name) asm name -#endif - -// KILL(name) causes a function to be excluded from the output ROM, see elfkill.cpp -#define KILL(name) +#define GET_FLAG(arr, pos) (((1 << ((pos) & 0x1f)) & (arr)[((u32) (pos)) >> 5]) != 0) +#define SET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] |= 1 << ((pos) & 0x1f)) +#define RESET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] &= ~(1 << ((pos) & 0x1f))) // Prevent the IDE from reporting errors that the compiler/linker won't report #ifdef __INTELLISENSE__ @@ -29,9 +18,11 @@ #define override // Define .sbss variables by using #pragma section sbss begin|end -#pragma define_section sbss ".data" ".sbss" +#pragma define_section sbss ".data" \ + ".sbss" // Force variables to be in .data by using #pragma section force_data begin|end -#pragma define_section force_data ".data" ".data" +#pragma define_section force_data ".data" \ + ".data" #endif |
