mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-08-25 02:20:33 +00:00
Moving definitions to use dedicated scratch register.
This commit is contained in:
@@ -275,7 +275,7 @@ typedef Struct_(RegUse_build_normalize_v3s4) {
|
||||
Reg scratch; /* scratchpad base; loaded via load_word_imm below. */
|
||||
Reg src_ptr;
|
||||
Reg dst_ptr;
|
||||
Reg recip_est; /* |v|² sum + shift-input + sqrtbl[index] */
|
||||
Reg recip_est; /* |v|² sum + shift-input + sqrtbl[index] */
|
||||
Reg norm; Reg shift;
|
||||
Reg src_x;
|
||||
union { Reg mac1_scratch, dst_offset; } t3;
|
||||
@@ -372,7 +372,7 @@ atom_info(atom_bind(Binds_gte_cross_v3s4)) MipsAtom_Proc_(aa, {
|
||||
load_word(r.y.src_a, R_TapePtr, O_(Binds_gte_cross_v3s4,src_a)),
|
||||
load_word(r.z.src_b, R_TapePtr, O_(Binds_gte_cross_v3s4,src_b)),
|
||||
load_word(r.x.out, R_TapePtr, O_(Binds_gte_cross_v3s4,out)),
|
||||
LdSlot_ add_ui_self(R_TapePtr, S_(Binds_gte_cross_v3s4)),
|
||||
LdSlot_ add_ui_self( R_TapePtr, S_(Binds_gte_cross_v3s4)),
|
||||
|
||||
mac_load_v3s4(r.a, r.y.src_a, 0), LdSlot_
|
||||
mac_load_v3s4(r.b, r.z.src_b, 0), LdSlot_
|
||||
|
||||
@@ -97,8 +97,8 @@ enum {
|
||||
R_Atom5 = R_T5,
|
||||
R_Atom6 = R_T6,
|
||||
R_Atom7 = R_T7,
|
||||
R_Atom8 = R_T8,
|
||||
R_Atom9 = R_T9,
|
||||
R_Atom8 = R_T8,
|
||||
R_Atom9 = R_T9,
|
||||
R_Atom10 = R_V0, // Tend to be used with gte DMAs
|
||||
R_Atom11 = R_V1, // Tend to be used with gte DMAs
|
||||
R_Atom12 = R_A0,
|
||||
@@ -383,8 +383,8 @@ FI_ Reg regfile__alloc_helper(A2_U2 file, Reg r_id) {
|
||||
* any of them while R0, R1, R26-R31 remain reserved. */
|
||||
I_ Reg regfile_alloc(RegFile_R rf) {
|
||||
Reg allocated = 0;
|
||||
for index_iter(U4, idx, 0, <, Array_len(regfile_alloc_order)) {
|
||||
allocated = regfile__alloc_helper(rf->GPR, idx);
|
||||
for index_iter(U4, r_id, R_V0, <, R_T9) {
|
||||
allocated = regfile__alloc_helper(rf->GPR, r_id);
|
||||
Jmp_nZero_(allocated,resolved);
|
||||
}
|
||||
assert(allocated != 0);
|
||||
|
||||
Reference in New Issue
Block a user