mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-08-04 22:58:47 +00:00
add ac_yield_load and ac_yield_tail for delay slot optimization opportunities.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#pragma once
|
||||
#endif
|
||||
// Auto-generated by ps1_meta.lua — DO NOT EDIT
|
||||
// Source: C:\projects\Pikuma\ps1\code\duffle\lottes_tape.h
|
||||
// Source: C:\projects\pikuma\ps1\code\duffle\lottes_tape.h
|
||||
// Component atoms (MipsAtomComp_(ac_*)) -> macro variants (mac_*)
|
||||
|
||||
#ifndef WORD_COUNT
|
||||
@@ -15,6 +15,10 @@
|
||||
* These do NOT yield. They are expanded inline inside Tape Atoms.
|
||||
* ---------------------------------------------------------------------------*/
|
||||
// The 'Yield' sequence for Tape Atoms (mac_yield).
|
||||
// - mac_yield() is the safe default for atom-endings: 4 words, BD-slot of jr is mandatory nop.
|
||||
// - mac_yield_load() + mac_yield_tail():
|
||||
// - unconditional branch: mac_yield_load fills the branch's BD-slot (replaces a nop);
|
||||
// - mac_yield_tail runs at the branch target (does NOT re-load R_AtomJmp).
|
||||
#define mac_yield(...) \
|
||||
load_word(R_AtomJmp, R_TapePtr, 0) \
|
||||
, add_ui_self( R_TapePtr, S_(MipsCode)) \
|
||||
@@ -22,6 +26,18 @@
|
||||
, nop
|
||||
WORD_COUNT(mac_yield, 4)
|
||||
|
||||
/* atom_dbg_skip */
|
||||
#define mac_yield_load(...) \
|
||||
load_word(R_AtomJmp, R_TapePtr, 0)
|
||||
WORD_COUNT(mac_yield_load, 1)
|
||||
|
||||
/* atom_dbg_skip */
|
||||
#define mac_yield_tail(...) \
|
||||
add_ui_self(R_TapePtr, S_(MipsCode)) \
|
||||
, jump_reg( R_AtomJmp) \
|
||||
, nop
|
||||
WORD_COUNT(mac_yield_tail, 3)
|
||||
|
||||
/* atom_dbg_skip */
|
||||
/* Words: 3; Loads 3 S2 indices from the face array */
|
||||
#define mac_load_tri_indices(...) \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated by ps1_meta.lua (passes/offsets.lua) — DO NOT EDIT
|
||||
// Source: C:\projects\Pikuma\ps1\code\duffle\lottes_tape.h
|
||||
// Source: C:\projects\pikuma\ps1\code\duffle\lottes_tape.h
|
||||
#pragma once
|
||||
|
||||
#pragma region lottes_tape
|
||||
|
||||
Reference in New Issue
Block a user