MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / mulhsu

Function mulhsu

crates/virtual-machine/src/cpu/alu.rs:145–147  ·  view source on GitHub ↗
(a: u64, b: u64)

Source from the content-addressed store, hash-verified

143/// Upper 64 bits of signed*unsigned product.
144#[inline]
145pub fn mulhsu(a: u64, b: u64) -> u64 {
146 ((a as i64 as i128).wrapping_mul(b as u128 as i128) >> 64) as u64
147}
148
149/// Signed division. Returns `u64::MAX` on divide-by-zero; `i64::MIN` (as u64) on overflow.
150pub fn div(a: u64, b: u64) -> u64 {

Callers 1

exec_aluFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected