Portable implementation of computing high 64 bits in widening 128 bit multiplication
How could I implement signed and unsigned multiplication of two 64 bit numbers, widened into 128 bits, and discarding the low 64 bits, returning the high 64 bits? The multiplication must properly wrap according to twos complement, without exhibiting undefined behavior.