mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-22 06:19:54 -04:00
Check in makerom files (#1758)
* Check in makerom files * Fix disasm for asm files in src
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
#ifndef PR_ASM_H
|
||||
#define PR_ASM_H
|
||||
|
||||
#ifdef __sgi
|
||||
#define _MIPS_ISA_MIPS1 1
|
||||
#define _MIPS_ISA_MIPS2 2
|
||||
#define _MIPS_ISA_MIPS3 3
|
||||
#define _MIPS_ISA_MIPS4 4
|
||||
#endif
|
||||
|
||||
#ifndef _LANGUAGE_C
|
||||
|
||||
#define LEAF(x) \
|
||||
.balign 4 ;\
|
||||
.globl x ;\
|
||||
.type x, @function ;\
|
||||
x: ;\
|
||||
.ent x, 0 ;\
|
||||
.frame $sp, 0, $ra
|
||||
|
||||
#define XLEAF(x) \
|
||||
.balign 4 ;\
|
||||
.globl x ;\
|
||||
.type x, @function ;\
|
||||
x: ;\
|
||||
.aent x, 0
|
||||
|
||||
#define NESTED(x, fsize, ra) \
|
||||
.globl x ;\
|
||||
x: ;\
|
||||
.ent x, 0 ;\
|
||||
.frame $sp, fsize, ra
|
||||
|
||||
#define XNESTED(x) \
|
||||
.globl x ;\
|
||||
x: ;\
|
||||
.aent x, 0
|
||||
|
||||
#define END(x) \
|
||||
.size x, . - x ;\
|
||||
.end x
|
||||
|
||||
#define IMPORT(x, size) \
|
||||
.extern x, size
|
||||
|
||||
#define EXPORT(x) \
|
||||
.globl x ;\
|
||||
x:
|
||||
|
||||
#define DATA(x) \
|
||||
.balign 4 ;\
|
||||
.globl x ;\
|
||||
.type x, @object ;\
|
||||
x:
|
||||
|
||||
#define ENDDATA(x) \
|
||||
.size x, . - x
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Stack Alignment
|
||||
*/
|
||||
#if (_MIPS_SIM == _ABIO32)
|
||||
#define NARGSAVE 4 // space for 4 args must be allocated
|
||||
#define ALSZ (8-1)
|
||||
#define ALMASK ~(8-1)
|
||||
#elif (_MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64)
|
||||
#define NARGSAVE 0 // no caller responsibilities
|
||||
#define ALSZ (16-1)
|
||||
#define ALMASK ~(16-1)
|
||||
#endif
|
||||
|
||||
#define FRAMESZ(size) (((size) + ALSZ) & ALMASK)
|
||||
|
||||
/**
|
||||
* Register Size
|
||||
*/
|
||||
#if (_MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2)
|
||||
#define SZREG 4
|
||||
#elif (_MIPS_ISA == _MIPS_ISA_MIPS3 || _MIPS_ISA == _MIPS_ISA_MIPS4)
|
||||
#define SZREG 8
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef BOOT_H
|
||||
#define BOOT_H
|
||||
|
||||
#define BOOT_STACK_SIZE 0x400
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user