mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2024-12-26 09:17:08 +00:00
other coprocessor2 macros
This commit is contained in:
parent
99183e6494
commit
cb63468ce5
File diff suppressed because it is too large
Load Diff
@ -497,3 +497,858 @@
|
||||
#define gte_ngpl0() gte_nGPL(0)
|
||||
|
||||
#define gte_gpl0() gte_GPL(0)
|
||||
|
||||
|
||||
/**
|
||||
* Memory and register management
|
||||
*/
|
||||
|
||||
#define gte_ldv0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $0,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $1,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldv1(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $2,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $3,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldv2(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $4,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $5,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldv3(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $0,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $1,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $2,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $3,4($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $4,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $5,4($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldv3c(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $0,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $1,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $2,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $3,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $4,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $5,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldv3c_vertc(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $0,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $1,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $2,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $3,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $4,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $5,28($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldv01(r1,r2) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $0,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $1,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $2,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $3,4($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldv01c(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $0,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $1,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $2,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $3,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldrgb(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $6,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldrgb3(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $20,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $21,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $22,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $6,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldrgb3c(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $20,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $21,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $22,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $6,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldlv0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lhu $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lhu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("or $13,$13,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$0": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $1,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldlvl(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $9,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $10,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $11,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsv(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lhu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lhu $14,2($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lhu $15,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $15,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldbv(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $14,1($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldcv(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $14,1($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $15,2($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $15,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldclmv(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lhu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lhu $14,6($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lhu $15,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $15,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_lddp(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$8": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsxy0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$12": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsxy1(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsxy2(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsxy3(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$12": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsxy3c(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $13,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $14,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsz3(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$17": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$18": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$19": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsz4(r1,r2,r3,r4) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $15,%0": :"r"(r4):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$17": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$18": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $15,$19": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldopv1(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$0": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $15,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$2": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $15,$4": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldopv2(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $11,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $9,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $10,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldlzc(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$30": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetRGBcd(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lwc2 $6,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldbkdir(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$15": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetBackColor(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $12,$12,4": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $13,$13,4": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $14,$14,4": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$15": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldfcdir(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$21": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$22": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$23": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetFarColor(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $12,$12,4": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $13,$13,4": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $14,$14,4": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$21": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$22": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$23": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetGeomOffset(r1,r2) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $12,$12,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $13,$13,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$24": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$25": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetGeomScreen(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$26": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsvrtrow0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$0": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$1": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetRotMatrix(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$0": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$1": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $15,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$2": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$3": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $15,$4": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsvllrow0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$8": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetLightMatrix(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$8": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $15,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $15,$12": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldsvlcrow0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$17": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetColorMatrix(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$17": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $15,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$18": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$19": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $15,$20": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetTransMatrix(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$5": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $15,28($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$6": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $15,$7": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldtr(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$5": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$6": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$7": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_SetTransVector(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $15,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$5": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$6": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $15,$7": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ld_intpol_uv0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $14,1($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$21": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$22": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ld_intpol_uv1(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $14,1($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ld_intpol_bv0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $14,1($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$21": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$22": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ld_intpol_bv1(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lbu $14,1($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ld_intpol_sv0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lh $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lh $14,2($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lh $15,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$21": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$22": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $15,$23": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ld_intpol_sv1(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lh $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lh $14,2($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lh $15,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $15,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ldfc(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $15,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$21": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$22": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $15,$23": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define gte_stsxy(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3c(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy2(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy1(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy01(r1,r2) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy01c(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3_f3(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3_g3(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3_ft3(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3_gt3(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,32($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3_f4(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3_g4(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3_ft4(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsxy3_gt4(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $12,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $13,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $14,32($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stdp(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $8,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stflg(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$31": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("nop ": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stflg_4(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$31": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("addi $14,$0,4": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("and $13,$13,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsz(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $19,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsz3(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $17,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $18,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $19,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsz4(r1,r2,r3,r4) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $15,%0": :"r"(r4):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $16,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $17,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $18,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $19,($15)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsz3c(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $17,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $18,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $19,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsz4c(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $16,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $17,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $18,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $19,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stszotz(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$19": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("nop ": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $13,$13,2": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stotz(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $7,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stopz(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $24,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stlvl(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $9,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $10,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $11,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stlvnl(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $25,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $26,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $27,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stlvnl0(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $25,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stlvnl1(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $26,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stlvnl2(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $27,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stsv(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $15,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $14,2($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $15,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stclmv(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $15,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $14,6($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $15,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stbv(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sb $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sb $14,1($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stcv(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $14,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $15,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sb $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sb $14,1($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sb $15,2($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_strgb(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $22,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_strgb3(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $20,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $21,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $22,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_strgb3_g3(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $20,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $21,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $22,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_strgb3_gt3(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $20,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $21,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $22,28($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_strgb3_g4(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $20,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $21,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $22,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_strgb3_gt4(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $20,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $21,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $22,28($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ReadGeomOffset(r1,r2) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$24": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$25": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $15,$15,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ReadGeomScreen(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$26": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("nop ": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ReadRotMatrix(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$0": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$1": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$2": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$3": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$4": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$5": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$6": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$7": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,28($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_sttr(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$5": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$6": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$7": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ReadLightMatrix(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$8": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$11": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$12": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$15": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,28($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_ReadColorMatrix(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$17": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$18": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$19": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$20": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,12($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,16($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$21": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$22": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$23": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,20($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,24($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,28($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stlzc(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("swc2 $31,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_stfc(r1) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$21": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $14,$22": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $15,$23": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $13,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $14,4($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,8($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_mvlvtr() { \
|
||||
__asm__ volatile ("mfc2 $12,$25": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$26": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $14,$27": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$5": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $13,$6": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$7": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_nop() { \
|
||||
__asm__ volatile ("nop ": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_subdvl(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $12,$12,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $13,$13,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("subu $15,$12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $12,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,4($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("subu $12,$12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $12,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_subdvd(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $12,$12,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $13,$13,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("subu $15,$12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $12,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $15,2($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("subu $12,$12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $12,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_adddvl(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $12,$12,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $13,$13,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("addu $15,$12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $12,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $15,4($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("addu $12,$12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sw $12,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_adddvd(r1,r2,r3) { \
|
||||
__asm__ volatile ("move $12,%0": :"r"(r1):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $13,%0": :"r"(r2):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("move $14,%0": :"r"(r3):"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $12,($12)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("lw $13,($13)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $12,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mtc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $12,$12,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $13,$13,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("addu $15,$12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $12,$9": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("mfc2 $13,$10": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $15,2($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("addu $12,$12,$13": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sh $12,($14)": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_FlipRotMatrixX() { \
|
||||
__asm__ volatile ("cfc2 $12,$0": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("cfc2 $13,$1": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $14,$12,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("subu $14,$0,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $15,$12,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("subu $15,$0,$15": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $15,$15,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("srl $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("or $14,$14,$15": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$0": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $14,$13,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("subu $14,$0,$14": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sra $15,$13,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $15,$15,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("sll $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("srl $14,$14,16": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("or $14,$14,$15": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $14,$1": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
#define gte_FlipTRX() { \
|
||||
__asm__ volatile ("cfc2 $12,$5": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("nop ": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("subu $12,$0,$12": : :"$12","$13","$14","$15","memory"); \
|
||||
__asm__ volatile ("ctc2 $12,$5": : :"$12","$13","$14","$15","memory"); \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user