
16 Mar
2017
16 Mar
'17
12:32 a.m.
On 15 March 2017 at 17:06, Andrey Semashev
This is what happens in the CPU.
Actually, no.
http://support.amd.com/TechDocs/25112.PDF (I didn't go through the 5 manuals to find a better quote, but they are there!) Chapter 3, Page 61. "Using 64-bit registers, the entire product can be produced with only one instruction: ; Multiply RAX by RBX. The 128-bit product is stored in RDX:RAX. 00000000 48 F7 EB imul rb" That you can't get at it (the full result) without some (inline) assembler is another issue. RAX is what's returned (as far as I remember) from a function, your truncating multiplication, the higher bits are waiting for you in RDX. I don't have a SPARC to my disposal, so cannot comment. degski