by Stenzel · 9y ago · 0 comments
For saturating arithmetic and other stuff we used compiler intrinsics, which freed us from handling register allocation, stack management etc by hand. On that processor there weren't special instructions for saturating arithmetic but a flag was used instead, the compiler also kept track of that one too.
We did read the assembly result and tweaked C code until assembly looked like what was expected, though.
It's something id like to try (however in c++) but I'm not sure how to do it in a smart/not-too-ugly way