Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
include_asm.h
Go to the documentation of this file.
1#ifndef __INCLUDE_ASM_H__
2#define __INCLUDE_ASM_H__
3
4#define STRINGIFY_(x) #x
5#define STRINGIFY(x) STRINGIFY_(x)
6
7#if !defined(SPLAT) && !defined(__CTX__)
8#ifndef INCLUDE_ASM
9#define INCLUDE_ASM_INTERNAL(TYPE, BASE_FOLDER, FOLDER, NAME, ARGS...) \
10 __asm__( \
11 ".section .text\n" \
12 "\t.align\t2\n" \
13 "\t.globl\t"#NAME"\n" \
14 "\t.ent\t"#NAME"\n" \
15 #NAME ":\n" \
16 "\t.include \"ver/"STRINGIFY(VERSION)"/asm/"BASE_FOLDER"/"FOLDER"/"#NAME".s\"\n" \
17 "\t.set reorder\n" \
18 "\t.set at\n" \
19 "\t.end\t"#NAME \
20 );
21#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...) INCLUDE_ASM_INTERNAL(TYPE, "nonmatchings", FOLDER, NAME, ARGS)
22#define INCLUDE_ASM_SHIFT(TYPE, FOLDER, NAME, ARGS...) INCLUDE_ASM_INTERNAL(TYPE, "shiftable", FOLDER, NAME, ARGS)
23#endif
24__asm__(".include \"include/macro.inc\"\n");
25#else
26#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...)
27#endif
28
29
30#endif
__asm__(".include \"include/macro.inc\"\n")