-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
199 changed files
with
1,208 additions
and
843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// NOTE: | ||
// For this to work, the file that is including this file HAS to be passed through the C preprocessor before assembling! | ||
|
||
// 32bit Windows and MacOS versions prefix labels using an underscore. | ||
// For interoperability we need to replicate that behavior here. | ||
#if ( (CPU_ARCH_X86 && defined(_WIN32) && !defined(_WIN64)) || defined(__APPLE__) ) | ||
#define C_DECL(label) _##label | ||
#else | ||
#define C_DECL(label) label | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.macro mSectionRodata | ||
#if (!CPU_ARCH_X86 && defined(__APPLE__)) // On macos, native compilation uses this name for the rodata section | ||
.section __DATA,__data | ||
#else | ||
.section .rodata | ||
#endif | ||
.endm | ||
|
||
// Used so that we can have cross platform (32bit or 64bit) pointers | ||
.macro mPtr value | ||
#if defined(__aarch64__) || defined(__x86_64__) | ||
.quad \value | ||
#else | ||
.int \value | ||
#endif | ||
.endm | ||
|
||
// Used for cross platform aligning of labels | ||
.macro mAlignWord | ||
#if defined(__APPLE__) && (defined(__aarch64__) || defined(__x86_64__)) | ||
.align 3 // Align to 8 bytes on macOS (2^3 = 8) | ||
#elif defined(__aarch64__) || defined(__x86_64__) | ||
.align 8 // Align to 8 bytes on other platforms | ||
#elif defined(PLATFORM_GBA) | ||
.align 2 // Align to 4 bytes on GBA | ||
#else | ||
.align 4 // Default alignment to 4 bytes | ||
#endif | ||
.endm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.