papermario/include/include_asm.h
Ethan Roseman ff2c968335
Getting rid of warnings and removing function decl from INCLUDE_ASM (#396)
* Fix some fx stuff

* INCLUDE_ASM doesn't emit a function decl anymore
2021-08-26 05:32:48 +09:00

32 lines
773 B
C

#ifndef __INCLUDE_ASM_H__
#define __INCLUDE_ASM_H__
#define STRINGIFY_(x) #x
#define STRINGIFY(x) STRINGIFY_(x)
#if !defined(SPLAT) && !defined(__CTX__) && !defined(PERMUTER)
#ifndef INCLUDE_ASM
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...) \
__asm__( \
".section .text\n" \
"\t.align\t2\n" \
"\t.globl\t"#NAME"\n" \
"\t.ent\t"#NAME"\n" \
#NAME ":\n" \
"\t.include \"ver/"STRINGIFY(VERSION)"/asm/nonmatchings/"FOLDER"/"#NAME".s\"\n" \
"\t.set reorder\n" \
"\t.set at\n" \
"\t.end\t"#NAME \
);
#endif
__asm__(".include \"include/macro.inc\"\n");
#ifdef MOVE_ADDU
__asm__(".include \"include/move_addu.inc\"\n");
#endif
#else
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...)
#endif
#endif