public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* MIPS long long using inline asm
@ 1998-04-08  9:40 Ted Krovetz
  1998-04-08 21:20 ` Joern Rennecke
  1998-04-09 21:23 ` ralf
  0 siblings, 2 replies; 3+ messages in thread
From: Ted Krovetz @ 1998-04-08  9:40 UTC (permalink / raw)
  To: egcs

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-04-09 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-08  9:40 MIPS long long using inline asm Ted Krovetz
1998-04-08 21:20 ` Joern Rennecke
1998-04-09 21:23 ` ralf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).