public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to write this insn define?
@ 2008-07-10  2:20 Ruan Beihong
  2008-07-12  2:14 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Ruan Beihong @ 2008-07-10  2:20 UTC (permalink / raw)
  To: gcc-help

There is a instruction:
mult rega,regb,regc
Lower 32-bit of sign-extended regb is multiplied by lower 32-bit of
sign-extended regc, and the lower 32-bit of product then sign-extends
to 64-bit and stores in rega.
How to write a (define_insn ) to describe this instruction?
Thanks.

James Ruan

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

* Re: How to write this insn define?
  2008-07-10  2:20 How to write this insn define? Ruan Beihong
@ 2008-07-12  2:14 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2008-07-12  2:14 UTC (permalink / raw)
  To: Ruan Beihong; +Cc: gcc-help

"Ruan Beihong" <ruanbeihong@gmail.com> writes:

> There is a instruction:
> mult rega,regb,regc
> Lower 32-bit of sign-extended regb is multiplied by lower 32-bit of
> sign-extended regc, and the lower 32-bit of product then sign-extends
> to 64-bit and stores in rega.
> How to write a (define_insn ) to describe this instruction?

Something like this seems about right:

(set (match_operand:DI 0 "register_operand" "constraints")
     (sign_extend:DI (mult:SI (match_operand:SI 1 "register_operand" "constraints")
                              (match_operand:SI 2 "register_operand" "constraints"))))


Ian

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

end of thread, other threads:[~2008-07-11 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-10  2:20 How to write this insn define? Ruan Beihong
2008-07-12  2:14 ` Ian Lance Taylor

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).