When you multiply two integers you get a double-width output, and if you keep just the lower half of that output then the bits are correct for both signed and unsigned integer multiplication.
Thus, some of our multiplication should be marked as working for both signed and unsigned, with appropriate names and such.
When you multiply two integers you get a double-width output, and if you keep just the lower half of that output then the bits are correct for both signed and unsigned integer multiplication.
Thus, some of our multiplication should be marked as working for both signed and unsigned, with appropriate names and such.
I did part of this in https://github.com/Lokathor/safe_arch/commit/561e68b556bcdbef903f91fdb4f1cfb944dbc5bd, but we need to review and probably fix more stuff elsewhere.