P
perry.yuan
Hi Gurus,
I am looking for C code for multiplying 32bit by 32bit operands and
getting a 64bit product. i.e.
U32 m1, m2;
U64 p = m1 * m2;
Of course I can use
U64 p = (U64) m1 * m2;
But, disassembly listing shows that generated code calls a 64bit x
64bit multiplication routine.
The target I am working on has a 32bit x 32 bit => 64bit machine
instruction but doesn't have any 64bit x 64 bit instruction. Before I
wet my hand on assembly programming, I love to see any C code solution
to it.
TIA.
Perry Yuan
I am looking for C code for multiplying 32bit by 32bit operands and
getting a 64bit product. i.e.
U32 m1, m2;
U64 p = m1 * m2;
Of course I can use
U64 p = (U64) m1 * m2;
But, disassembly listing shows that generated code calls a 64bit x
64bit multiplication routine.
The target I am working on has a 32bit x 32 bit => 64bit machine
instruction but doesn't have any 64bit x 64 bit instruction. Before I
wet my hand on assembly programming, I love to see any C code solution
to it.
TIA.
Perry Yuan