How to write this insn define?

Ian Lance Taylor iant@google.com
Sat Jul 12 02:14:00 GMT 2008


"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



More information about the Gcc-help mailing list