-
Notifications
You must be signed in to change notification settings - Fork 3
/
include_asm.h
37 lines (35 loc) · 934 Bytes
/
include_asm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef INCLUDE_ASM_H
#define INCLUDE_ASM_H
#if !defined(SPLAT) && !defined(M2CTX) && !defined(PERMUTER)
#ifndef INCLUDE_ASM
#define INCLUDE_ASM(FOLDER, NAME) \
__asm__( \
".section .text\n" \
" .set noat\n" \
" .set noreorder\n" \
" .globl " #NAME ".NON_MATCHING\n" \
" .type " #NAME ".NON_MATCHING, @object\n" \
" " #NAME ".NON_MATCHING:\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
__asm__(".include \"include/labels.inc\"\n");
#else
#ifndef INCLUDE_ASM
#define INCLUDE_ASM(FOLDER, NAME)
#endif
#ifndef INCLUDE_RODATA
#define INCLUDE_RODATA(FOLDER, NAME)
#endif
#endif
#endif