code wiki / _hdl_build / _enc_replace_gate.nx
_enc_replace_gate.nx
buildroot/runtime/_hdl_build/_enc_replace_gate.nx
about
_enc_replace_gate.nx -- DIFFERENTIAL-REPLACEMENT of a COMPILER-INTERNAL (eve "inside
like a compiler"): is the SEARCH-derived RV64 U-type encoder (nx_evo_enc's champion)
behaviorally IDENTICAL to the Claude-authored assembler encoder? The operator's test on
the toolchain's GUTS: "turn off Claude's encoder, emit ours, function the same." GREEN
across the full in-range domain (every 7-bit opcode x every 5-bit register x an imm20
sample) = the team derived a verified drop-in for a piece of the assembler's inside.
evo_enc_u is the SEARCH-emitted structure (_evo_enc_champ.nx), not hand-written.
enc_u_ref is the REAL Claude encoder inlined VERBATIM from nxasm/asm_enc.nx:39-41
(cross-dir import doesn't resolve into _hdl_build; this is the production formula, citable).
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nx_evo_enc_champ.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 14 | func enc_u_ref(opcode: i64, rd: i64, imm20: i64) -> i64 called by 1: main |
| 18 | func erg_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 19 | func erg_n(v: i64) -> i64 |
| 26 | func erg_imm(i: i64) -> i64 called by 1: main |
| 33 | func main() -> i64 |