Match all libultra, and more closely match ultralib (#466)

* Massive libultra changes

* Fix the build!

* Remove crc comment that seemd to break the score script for some reason.

* Update README score.

* Apply some suggestions

* rename sins and coss funcs.
This commit is contained in:
Ryan Myers
2025-02-24 11:45:02 -05:00
committed by GitHub
parent fecb46f6a9
commit a005a4eb3d
438 changed files with 18425 additions and 10723 deletions
+84 -35
View File
@@ -1,7 +1,7 @@
/************************************************************************
Copyright (C) 1998,1999 NINTENDO Co,Ltd,
Copyright (C) 1998,1999 MONEGI CORPORATION,
All Rights Reserved
All Rights Reserved
This program is a trade secret of NINTENDO Co,Ltd and MONEGI Corp.
and it is not to be reproduced, published, disclosed to others, copied,
adapted, distributed, or displayed without the prior authorization of
@@ -22,48 +22,97 @@ modified versions thereof.
extern "C" {
#endif
#define _MIPS_ISA_MIPS1 1 /* R2/3K */
#define _MIPS_ISA_MIPS2 2 /* R4K/6K */
#define _MIPS_ISA_MIPS3 3 /* R4K */
#define _MIPS_ISA_MIPS4 4 /* TFP */
#define _MIPS_ISA_MIPS1 1 /* R2/3K */
#define _MIPS_ISA_MIPS2 2 /* R4K/6K */
#define _MIPS_ISA_MIPS3 3 /* R4K */
#define _MIPS_ISA_MIPS4 4 /* TFP */
#define _MIPS_SIM_ABI32 1 /* MIPS MSIG calling convention */
#define _MIPS_SIM_NABI32 2 /* MIPS new 32-bit abi */
/* NABI32 is 64bit calling convention but 32bit type sizes) */
#define _MIPS_SIM_ABI64 3 /* MIPS 64 calling convention */
#define _MIPS_SIM_ABI32 1 /* MIPS MSIG calling convention */
#define _MIPS_SIM_NABI32 2 /* MIPS new 32-bit abi */
/* NABI32 is 64bit calling convention but 32bit type sizes) */
#define _MIPS_SIM_ABI64 3 /* MIPS 64 calling convention */
#define LEAF(x) \
.globl x; \
.ent x,0; \
x:; \
.frame sp,0,ra
#define XLEAF(x) \
.global x;
/* libgultra doesn't match with the .type directive but iQue sdk asm.h uses it */
#ifdef BBPLAYER
#define ASM_TYPE_FUNC(x) .type x, @function
#else
#define ASM_TYPE_FUNC(x)
#endif
#define END(proc) \
.end proc
#define LEAF(x) \
.globl x ;\
.align 2 ;\
ASM_TYPE_FUNC(x) ;\
.ent x,0 ;\
x: ;\
.frame sp,0,ra
#define ABS(x, y) \
.globl x; \
x = y
#define EXPORT(x) \
.globl x; \
x:
/*
#define WEAK(x, y) \
.weak x; \
.set x,y;
*/
#if defined(BBPLAYER) || defined(__sgi)
#define XLEAF(x) \
.globl x ;\
.aent x,0 ;\
x:
#else
#define XLEAF(x) \
.globl x
#endif
#ifdef BBPLAYER
#define END(proc) \
.end proc ;\
.size proc, . - proc
#else
#define END(proc) \
.end proc
#endif
#define ABS(x, y) \
.globl x ;\
x = y
#define EXPORT(x) \
.globl x ;\
x:
#if defined(BBPLAYER) || defined(__sgi)
#define WEAK(x, y) \
.weakext x, y
#else
#define WEAK(x, y)
#endif
#define NOP \
.set noreorder ;\
nop ;\
.set reorder
#define CACHE(op, reg) \
.set noreorder ;\
cache op, reg ;\
.set reorder
#define MFC0(reg, op) \
.set noreorder ;\
mfc0 reg, op ;\
.set reorder
#define MTC0(reg, op) \
.set noreorder ;\
mtc0 reg, op ;\
.set reorder
#define CFC1(reg, op) \
.set noreorder ;\
cfc1 reg, op ;\
.set reorder
#define CTC1(reg, op) \
.set noreorder ;\
ctc1 reg, op ;\
.set reorder
#define STAY1(stmnt) .set noreorder; stmnt; .set reorder;
#define STAY2(stmnt, arg1) .set noreorder; stmnt, arg1; .set reorder;
#define STAY3(stmnt, arg1, arg2) .set noreorder; stmnt, arg1, arg2; .set reorder;
#define NOP .set noreorder; nop; .set reorder;
#define CACHE(op, reg) .set noreorder; cache op, reg; .set reorder;
#ifdef __cplusplus
}
View File