From: Joern Rennecke <amylaar@cygnus.co.uk>
To: krovetz@cs.ucdavis.edu (Ted Krovetz)
Cc: egcs@cygnus.com
Subject: Re: MIPS long long using inline asm
Date: Wed, 08 Apr 1998 21:20:00 -0000 [thread overview]
Message-ID: <199804082251.XAA26826@phal.cygnus.co.uk> (raw)
In-Reply-To: <9804081640.AA16957@toadflax.cs.ucdavis.edu>
> 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?
Look at longlong.h in the gcc sources.
Actually, if putting the 64 bit result in two 32 bit variables is good
enough, you might just use umul_ppmm directly.
next prev parent reply other threads:[~1998-04-08 21:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-08 9:40 Ted Krovetz
1998-04-08 21:20 ` Joern Rennecke [this message]
1998-04-09 21:23 ` ralf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199804082251.XAA26826@phal.cygnus.co.uk \
--to=amylaar@cygnus.co.uk \
--cc=egcs@cygnus.com \
--cc=krovetz@cs.ucdavis.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).