Top 64 bits of the 128-bit product of two u64 values, computed via four 32x32->64 widening multiplies. Portable to every Cortex-M target -- uses only integer ops, never the libgcc soft-FP cascade.
| 240 | // 32x32->64 widening multiplies. Portable to every Cortex-M target -- uses |
| 241 | // only integer ops, never the libgcc soft-FP cascade. |
| 242 | inline fl::u64 mul_hi_u64(fl::u64 a, fl::u64 b) FL_NOEXCEPT { |
| 243 | const fl::u64 ah = a >> 32; |
| 244 | const fl::u64 al = a & 0xFFFFFFFFull; |
| 245 | const fl::u64 bh = b >> 32; |
| 246 | const fl::u64 bl = b & 0xFFFFFFFFull; |
| 247 | const fl::u64 ll = al * bl; |
| 248 | const fl::u64 hl = ah * bl; |
| 249 | const fl::u64 lh = al * bh; |
| 250 | const fl::u64 hh = ah * bh; |
| 251 | const fl::u64 mid = (ll >> 32) + (hl & 0xFFFFFFFFull) + (lh & 0xFFFFFFFFull); |
| 252 | return hh + (hl >> 32) + (lh >> 32) + (mid >> 32); |
| 253 | } |
| 254 | |
| 255 | constexpr fl::u32 kSignBitMask = 0x80000000u; |
| 256 | constexpr fl::u32 kInfBitsPos = 0x7F800000u; |
no outgoing calls
no test coverage detected