remove redudant register shuffle in build_normalize_v3s4

This commit is contained in:
ed
2026-08-20 20:52:18 -04:00
parent 2d754650c9
commit 85b2205603
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ enum {
atom_offset_example_atom_proc_skip = _atom_offset_example_atom_proc_skip, atom_offset_example_atom_proc_skip = _atom_offset_example_atom_proc_skip,
}; };
// --- atom: build_normalize_v3s4 (63 words) --- // --- atom: build_normalize_v3s4 (62 words) ---
#define _atom_offset_aligned_done_srav_path 3 #define _atom_offset_aligned_done_srav_path 3
#define _atom_offset_srav_path_aligned_done 4 #define _atom_offset_srav_path_aligned_done 4
+2 -3
View File
@@ -277,8 +277,8 @@ typedef Struct_(RegUse_build_normalize_v3s4) {
union { Reg r1, dst_ptr; }; union { Reg r1, dst_ptr; };
union { Reg r2, dst_offset, mac1, v_sqr_aligned; }; union { Reg r2, dst_offset, mac1, v_sqr_aligned; };
union { Reg r3, src_offset, btarget, shift_count, sqrtbl_index; }; union { Reg r3, src_offset, btarget, shift_count, sqrtbl_index; };
union { Reg r4, mac3, v_sqr_sum, scale_exp, inv_len; }; union { Reg r4, mac3, v_sqr_sum, scale_exp, srav_shift; };
union { Reg r5, lzcr, srav_shift; }; union { Reg r5, lzcr, inv_len; };
}; };
/* ─── Full normalize (all 4 stages inline) ─── /* ─── Full normalize (all 4 stages inline) ───
* Generic 4-stage GTE normalize (SQR → sum+LZCR → align+sqrtbl → GPF+srav). */ * Generic 4-stage GTE normalize (SQR → sum+LZCR → align+sqrtbl → GPF+srav). */
@@ -313,7 +313,6 @@ MipsAtom_Proc_(aa, {
sub_s(r.shift_count, r.shift_count, r.lzcr), sub_s(r.shift_count, r.shift_count, r.lzcr),
shift_aright_var(r.v_sqr_aligned, r.v_sqr_aligned, r.shift_count), shift_aright_var(r.v_sqr_aligned, r.v_sqr_aligned, r.shift_count),
atom_label(aligned_done) atom_label(aligned_done)
or_u(r.srav_shift, r.scale_exp, 0),
add_si( r.v_sqr_aligned, r.v_sqr_aligned, -64), add_si( r.v_sqr_aligned, r.v_sqr_aligned, -64),
shift_lleft(r.v_sqr_aligned, r.v_sqr_aligned, 1), shift_lleft(r.v_sqr_aligned, r.v_sqr_aligned, 1),
mac_load_word_imm(r.sqrtbl_index, & gte_normalize_sqr_tbl), add_u_self(r.sqrtbl_index, r.v_sqr_aligned), mac_load_word_imm(r.sqrtbl_index, & gte_normalize_sqr_tbl), add_u_self(r.sqrtbl_index, r.v_sqr_aligned),