Re:A complete map of the Rust type system
by lock1 on Monday September 08, 2025 @06:15PM
(#45174749)
Extra set of logic for handling NaN cases? I don't think it's impossible, just kind of less intuitive. Jump instruction using integer w/o NaN always valid, while NaN-able integer sometimes invalid (ignoring whether the memory address can be accessed).
[ Parent
| on HN ]
Re:A complete map of the Rust type system
by newpavlov on Monday September 08, 2025 @06:20PM
(#45174808)
For absolute jumps you don't need extra logic, since CPUs could declare the last page always unmapped, so such jumps would always result in a page fault (similarly to the null page on most systems).
For relative non-immediate jumps the added logic is extremely simple (hardware exception on NaN) and should not (AFAIK) hinder performance of jumps in any way.