code wiki / _hdl_build / nx_gcc_race.nx

nx_gcc_race.nx

buildroot/runtime/_hdl_build/nx_gcc_race.nx

12940 B301 linesdepth 2pulls 2 transitivereach 7 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_gcc_race.nx -- the team's OWN capability to race a production compiler. Until now I measured gcc by hand in a shell; that is not the team racing. This lets the TEAM do it: it forks gcc -O2 to compile a C source, forks objdump to disassemble, and PARSES the instruction count of the function body itself. With this, the team can race gcc on any kernel, autonomously, and judge its own standing (win / tie / loss) -- the prerequisite for hunting an EXCEED instead of me hand-picking targets. license_tier: ORIGINAL

dependencies 1 imports · 6 importers

nx_syscalls.nx nx_gcc_race.nx nx_autorace_test.nx nx_boolhunt.nx nx_builder.nx nx_cost_race_test.nx nx_selfix_test.nx nx_team_tick.nx

imports: nx_syscalls.nx

imported by: nx_autorace_test.nxnx_boolhunt.nxnx_builder.nxnx_cost_race_test.nxnx_selfix_test.nxnx_team_tick.nx

structs

none

consts

none

functions

12func gr_gcc(cfile: *u8, ofile: *u8) -> i64
40func gr_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
43func gr_newest_gcc() -> *u8
52func gr_gcc_v(gccpath: *u8, cfile: *u8, ofile: *u8) -> i64
80func gr_objdump(ofile: *u8, txtfile: *u8) -> i64
104func gr_match(buf: *u8, p: i64, lim: i64, lit: *u8) -> i64
109func gr_find(buf: *u8, blen: i64, needle: *u8) -> i64
118func gr_count(txtpath: *u8, fname: *u8) -> i64
167func gr_mnem_lat(buf: *u8, ms: i64, le: i64) -> i64
called by 1: gr_func_cost calls 1: gr_match
177func gr_func_cost(txtpath: *u8, fname: *u8) -> i64
218func gr_cost_obj(ofile: *u8, txtfile: *u8, fname: *u8) -> i64
224func gr_race_c(cfile: *u8, ofile: *u8, txtfile: *u8, fname: *u8) -> i64
called by 1: race_one calls 3: gr_gccgr_objdumpgr_count
231func gr_append_mnem(out: *u8, ol: i64, buf: *u8, ms: i64, me: i64) -> i64
called by 1: gr_func_mnemonics
251func gr_func_mnemonics(txtpath: *u8, fname: *u8, out: *u8) -> i64
297func gr_race_cv(gccpath: *u8, cfile: *u8, ofile: *u8, txtfile: *u8, fname: *u8) -> i64