mirror of
https://github.com/ethteck/splat.git
synced 2026-11-11 10:01:27 -10:00
* Add define check to allow using `macro.inc` instead of `labels.inc` in `include_asm.h` * Allow changing the path of assembly macros files * version bump * fmt * fix test * fix * uy
44 lines
968 B
C
44 lines
968 B
C
#ifndef INCLUDE_ASM_H
|
|
#define INCLUDE_ASM_H
|
|
|
|
#if !defined(M2CTX) && !defined(PERMUTER)
|
|
|
|
#ifndef INCLUDE_ASM
|
|
#define INCLUDE_ASM(FOLDER, NAME) \
|
|
__asm__( \
|
|
".section .text\n" \
|
|
" .set noat\n" \
|
|
" .set noreorder\n" \
|
|
" .include \"" FOLDER "/" #NAME ".s\"\n" \
|
|
" .set reorder\n" \
|
|
" .set at\n" \
|
|
)
|
|
#endif
|
|
#ifndef INCLUDE_RODATA
|
|
#define INCLUDE_RODATA(FOLDER, NAME) \
|
|
__asm__( \
|
|
".section .rodata\n" \
|
|
" .include \"" FOLDER "/" #NAME ".s\"\n" \
|
|
".section .text" \
|
|
)
|
|
#endif
|
|
|
|
#if INCLUDE_ASM_USE_MACRO_INC
|
|
__asm__(".include \"test/basic_app/split/include/macro.inc\"\n");
|
|
#else
|
|
__asm__(".include \"test/basic_app/split/include/labels.inc\"\n");
|
|
#endif
|
|
|
|
#else
|
|
|
|
#ifndef INCLUDE_ASM
|
|
#define INCLUDE_ASM(FOLDER, NAME)
|
|
#endif
|
|
#ifndef INCLUDE_RODATA
|
|
#define INCLUDE_RODATA(FOLDER, NAME)
|
|
#endif
|
|
|
|
#endif /* !defined(M2CTX) && !defined(PERMUTER) */
|
|
|
|
#endif /* INCLUDE_ASM_H */
|