Files
Anghelo Carvajal 3799899607 Misc assembly macros files changes (#497)
* 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
2025-12-25 09:13:37 -03:00

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 */