On 05/14/2013 09:43 PM, Kaushik Phatak wrote:
> Hi,
> The below patch adds expanders and insns for QI and HI mode for the RL78 
> target.
> The QI mode uses a generic 'mulu' instruction supported by all variants, while
> the HI mode creates insn for G13 and G14 target variants using hardware 
> multiply
> instructions.
> Tested on hardware and simulator with no additional regressions.
> Kindly review the same.
> 
> Thanks,
> Kaushik
> 
> 2013-05-15  Kaushik Phatak  <kaushik.pha...@kpitcummins.com>
>        
>       * config/rl78/rl78.md (mulqi3,mulhi3): New define_expands.
>       (mulqi3_rl78,mulhi3_rl78,mulhi3_g13): New define_insns.
> 
> Index: gcc/config/rl78/rl78.md
> ===================================================================
> --- gcc/config/rl78/rl78.md   (revision 198915)
> +++ gcc/config/rl78/rl78.md   (working copy)
> @@ -235,6 +235,24 @@
>    [(set_attr "valloc" "macax")]
>  )
>  
> +(define_expand "mulqi3"
> +  [(set (match_operand:QI          0 "register_operand" "=&v")
> +     (mult:QI  (match_operand:QI 1 "general_operand" "+vim")
> +               (match_operand:QI 2 "nonmemory_operand" "vi")))
> +   ]
> +  "" ; mulu supported by all targets
> +  ""
> +)

No constraints on define_expand, only predicates.

> +(define_insn "mulqi3_rl78"
> +(define_insn "mulhi3_rl78"
> +(define_insn "mulhi3_g13"

These names are not used.  They should be prefixed with "*" to indicate the
name is just for documentation.


r~

Reply via email to