I've been playing around with assembly a little (specifically: AT&T, x86-64).
My data section looks like so:
.section .data
num: .short 0b1111111111111111 #16 ones, so the maximum unsigned short value
junk: .quad 0x5555555555555555
Within %rax, I have a zero-extended 16 bit value for which it is guaranteed that its product with the value of num is up to 32 bits. I want to do something along those lines:
imulw (num),