mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-07-12 20:31:25 -07:00
broken.
This commit is contained in:
@@ -459,9 +459,7 @@ local function compute_component_word_count(c, components, wc)
|
||||
-- It's a `mac_X(...)` call. Recurse.
|
||||
n = n + rec(comp_name)
|
||||
elseif comp_name and wc and wc[comp_name] then
|
||||
-- Encoding macro or pseudo-instruction (e.g. mask_upper = 2,
|
||||
-- nop2 = 2). Trust the metadata — tape_atom.metadata.h is the
|
||||
-- single source of truth for word counts.
|
||||
-- Encoding macro or pseudo-instruction (e.g. mask_upper = 2, nop2 = 2).
|
||||
n = n + wc[comp_name]
|
||||
else
|
||||
-- Unrecognized token. Fall back to 1 word.
|
||||
@@ -628,12 +626,8 @@ local function emit_component_macros_h(ctx, src, components)
|
||||
"// Auto-generated by tape_atom_annotation_pass.lua — DO NOT EDIT",
|
||||
"// Source: " .. to_absolute_path(src.path),
|
||||
"// Component atoms (MipsAtomComp_(ac_*)) -> macro variants (mac_*)",
|
||||
"// + auto word-counts (so tape_atom.metadata.h stays manual-only",
|
||||
"// for encoding macros).",
|
||||
"",
|
||||
-- Self-contained: define WORD_COUNT if not already defined.
|
||||
-- The metadata file (tape_atom.metadata.h) defines it as
|
||||
-- enum { words_##name = (count) };
|
||||
-- We use the same definition here so the auto-generated
|
||||
-- entries below expand to compile-time constants whether
|
||||
-- the metadata file is included first or not.
|
||||
|
||||
Reference in New Issue
Block a user