Lokathor / safe_arch

Exposes arch-specific intrinsics as safe function (via cfg).
https://docs.rs/safe_arch
Apache License 2.0
47 stars 8 forks source link

check all integer multiplies #102

Open Lokathor opened 3 years ago

Lokathor commented 3 years ago

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.