[PATCH] Add umulditi3 instruction for s390.

Andreas Krebbel Andreas.Krebbel@de.ibm.com
Tue Jun 3 11:30:00 GMT 2008


Hello,

> 2008-05-29  Victor Vlasenko  <vlasenko@bifit.com>
> 
>         * config/s390/s390.md (umulditi3): New insn definition.

Do you have a testcase needing this pattern - and actually using it
when your patch is applied?

Please run a full bootstrap on s390 and s390x with and without the
patch and compare the testsuite results.

Couldn't that be merged with the umulsidi3 pattern using mode macros.
E.g. by enhancing the HALF_MODE macro for int modes.

> +(define_insn "umulditi3"
> +  [(set (match_operand:TI 0 "register_operand" "=d,d")
> +        (mult:TI (zero_extend:TI
> +	           (match_operand:DI 1 "register_operand" "%0,0"))
> +                 (zero_extend:TI
> +	           (match_operand:DI 2 "nonimmediate_operand" "d,m"))))]

Please replace m with RT. That's no bug but I've tried to remove "m"
uses in the back end with the z10 patches since "m" is coupled to the
go_if_legitimate_address hook which causes some trouble when
introducing new address formats.

> +  "TARGET_64BIT"
> +  "@
> +   mlgr\t%0,%2
> +   mlg\t%0,%2"
> +  [(set_attr "op_type"  "RRE,RXY")
> +   (set_attr "type"     "imuldi")])

Just out of curiosity may I ask what you are using S/390 GCC for?  You
of course might want to answer this offlist or don't want to answer at
all which is both fine with me.

Bye,

-Andreas-



More information about the Gcc-patches mailing list