code wiki / (root) / nx_f64_adversary.nx

nx_f64_adversary.nx

buildroot/runtime/nx_f64_adversary.nx

2138 B40 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic f64
docsdependenciesstructsconstsfunctions

about

nx_f64_adversary.nx -- T12 class: hardware f64 (IEEE-754 binary64) codegen. Before 2026-07-16 nx_cc PARSED f64 but SILENTLY MISCOMPILED f64 arithmetic to single precision (the parser forced every fp binop result to TY_F32, so the emitter used movss/divss -> low-32-bit reinterpret -> garbage). Fixed by fp_result_type (TY_F64 propagation) + x86ctx_emit_f64 (movsd/addsd/subsd/ mulsd/divsd/sqrtsd/cvtsi2sd/cvttsd2si) + the __f64_from_i64/__f64_to_i64/ __f64_sqrt intrinsics. Self-checking (exit 0 = all f64 ops bit-correct); every constant is a known IEEE-754 value truncated to a fixed integer scale, so a single-precision regression (or a wrong conversion) changes the digits. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 1 imports · 0 importers

nx_syscalls_x86_64.nx nx_f64_adversary.nx

imports: nx_syscalls_x86_64.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

13func main() -> i64