MIPS long long using inline asm
Ted Krovetz
krovetz@cs.ucdavis.edu
Wed Apr 8 09:40:00 GMT 1998
Hi,
I'm doing cryptographic research at UC Davis and have need for fast
32-bit x 32-bit -> 64-bit multiplications. On intel using gcc's inline
assembler I get this using
#define XMUL(x, y) \
({ UINT64 __res; UINT32 __x = (x), __y = (y); \
__asm__ ("mull %2" : "=A" (__res) : "a" (__x), "r" (__y)); \
__res; })
where the output specifier "=A" (__res) tells the compiler to bind the
long long variable __res to the two 32-bit registers EDX:EAX.
I want to do something similar on MIPS. How can I use gcc and inline
assembly to bind a pair of 32-bit registers to a long long variable?
Thanks,
Ted Krovetz
More information about the Gcc
mailing list