2021-03-09 18:10:12 +01:00
|
|
|
#ifndef __INCLUDE_ASM_H__
|
|
|
|
#define __INCLUDE_ASM_H__
|
|
|
|
|
|
|
|
#define STRINGIFY_(x) #x
|
|
|
|
#define STRINGIFY(x) STRINGIFY_(x)
|
|
|
|
|
2021-03-10 09:05:27 +01:00
|
|
|
#if !defined(SPLAT) && !defined(__CTX__) && !defined(PERMUTER)
|
2021-03-09 18:10:12 +01:00
|
|
|
#ifndef INCLUDE_ASM
|
|
|
|
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...) \
|
|
|
|
TYPE NAME(ARGS); \
|
2021-04-18 19:25:32 +02:00
|
|
|
TYPE __attribute__((naked)) NAME(ARGS) { __asm__( ".section .text\n.include \"ver/"STRINGIFY(VERSION)"/asm/nonmatchings/"FOLDER"/"#NAME".s\"\n.set reorder\n.set at"); }
|
2021-03-09 18:10:12 +01:00
|
|
|
#endif
|
2021-03-24 09:39:43 +01:00
|
|
|
__asm__(".include \"include/macro.inc\"\n");
|
2021-03-11 09:08:22 +01:00
|
|
|
#ifdef MOVE_ADDU
|
2021-03-24 09:39:43 +01:00
|
|
|
__asm__(".include \"include/move_addu.inc\"\n");
|
2021-03-11 09:08:22 +01:00
|
|
|
#endif
|
2021-03-09 18:10:12 +01:00
|
|
|
#else
|
|
|
|
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|