#x86 machine code: 7 bytes
x86 machine code: 7 bytes
66 0F 3A 44 C1 00 C3 pclmulqdq xmm0, xmm1, 0 \ ret
Only two instructions. pclmulqdq
does the heavy lifting, it literally implements that type of xor-multiplication. ret
to make it a callable function, hopefully satisfying the requirement of "outputting" the result (in the return value, xmm0
). Putting integer arguments in xmm
args is a bit unusual, but I hope you'll forgive me.