diff --git a/.vscode/launch.json b/.vscode/launch.json index 26615d2..ac29223 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -24,7 +24,7 @@ "osx": { "gdbpath": "gdb" }, - "executable": "${workspaceRoot}/build/hello_psyq.elf", + "executable": "${workspaceRoot}/build/hello_gte.elf", "setupCommands": [ { "text": "set mi-async off" }, { "text": "set remotetimeout 0" }, @@ -33,7 +33,7 @@ ], "autorun": [ "monitor reset shellhalt", - "load hello_psyq.elf", + "load hello_gte.elf", "source scripts/gdb/gdb_tape_atoms.gdb", "tbreak main", "continue" @@ -59,7 +59,7 @@ "osx": { "gdbpath": "gdb" }, - "executable": "${workspaceRoot}/build/hello_gpu.elf", + "executable": "${workspaceRoot}/build/hello_gte.elf", "setupCommands": [ { "text": "set mi-async off" }, { "text": "set remotetimeout 0" }, @@ -68,7 +68,7 @@ ], "autorun": [ "monitor reset shellhalt", - "load hello_gpu.elf", + "load hello_gte.elf", "tbreak main", "continue" ] diff --git a/code/duffle/atom_dsl.h b/code/duffle/atom_dsl.h index 866f9b4..ea4f1e8 100644 --- a/code/duffle/atom_dsl.h +++ b/code/duffle/atom_dsl.h @@ -63,11 +63,19 @@ /* ============================================================================ * atom_reads(...) / atom_writes(...) * - * Used during the static analysis pass of the metaprogram to do + * Used during the static analysis pass of the metaprogram to do * ============================================================================*/ #define atom_reads(...) (__VA_ARGS__) #define atom_writes(...) (__VA_ARGS__) +/* ---------------------------------------------------------------------------- + * atom_reg (per-enum opt-in marker for the DWARF register-alias registry) + * + * The bare `atom_reg` token adjacent to an enum entry in mips.h / lottes_tape.h flags that alias as debug-visible for scan_source's register_alias_registry. + * The C preprocessor strips it to a comment so no runtime symbol is created; the Lua scanner reads the bare token. + * ----------------------------------------------------------------------------*/ +#define atom_reg /* atom_reg: opt the preceding enum entry into the DWARF registry */ + /* ============================================================================ * atom_info : * MipsAtom_(cube_tri) atom_info( @@ -84,12 +92,38 @@ /* ---------------------------------------------------------------------------- * DEBUG SOURCE-STEP MARKERS * - * Place atom_dbg_skip_over() before a MipsAtom_, MipsAtomComp_, or MipsAtomComp_Proc_. + * Place atom_dbg_skip_over() before a MipsAtom_, MipsAtomComp_, or MipsAtomComp_Proc_. * The following declaration kind determines whether the marker selects a whole atom or a component inline view. * The source scanner associates the marker with that declaration; placement diagnostics are handled by the annotation pass. * ----------------------------------------------------------------------------*/ #define atom_dbg_skip_over() /* atom_dbg_skip_over: skip the following atom or component source view */ +/* ---------------------------------------------------------------------------- + * Typed-view annotations (Registry for DWARF RR_ chain resolution) + * atom_type() -- overloaded: + * (a) enum-site default: `R_Foo = R_Tn, atom_reg atom_type(T)` + * Sets the per-alias default typed view in the register_alias_registry. + * Consumed by the DWARF chain step (e) when no per-atom atom_ctx / atom_phase / atom_type callsite provides a stronger resolution. + * (b) callsite override: `atom_reads(R_Foo atom_type(T), ...)` Overrides the per-alias default for THIS atom only. + * Last-write-wins per R_Name; conflict -> error. + * atom_ctx() -- atom-info sub-call: + * Propagate another atom's atom.rbind.fields (its Binds_* typed fields) into THIS atom's typed-view resolution. + * The named atom must be an rbind atom (have `atom_bind(Binds_X)` in its `atom_info`). + * Used as the escape hatch when atom_phase is not the natural correlation. + * atom_phase(