Open danakj opened 11 months ago
From https://research.checkpoint.com/2023/rust-binary-analysis-feature-by-feature/ we see rust generates seto for integer math, meaning it uses the overflow register rather than checking values being added.
From https://stackoverflow.com/questions/48020613/gcc-inline-asm-x86-cpu-flags-as-input-dependency we see there is __builtin_add_overflow which should generate seto usage.
There’s also some inline asm there but that breaks other optimizations in c++.
From https://research.checkpoint.com/2023/rust-binary-analysis-feature-by-feature/ we see rust generates seto for integer math, meaning it uses the overflow register rather than checking values being added.
From https://stackoverflow.com/questions/48020613/gcc-inline-asm-x86-cpu-flags-as-input-dependency we see there is __builtin_add_overflow which should generate seto usage.
There’s also some inline asm there but that breaks other optimizations in c++.