On 28/04/16 18:10, Claudiu Zissulescu wrote:
Please find the updated patch.

Claudiu

gcc/
2016-04-28  Claudiu Zissulescu  <claz...@synopsys.com>

        * config/arc/arc.h (UNSIGNED_INT12, UNSIGNED_INT16): Define.
        * config/arc/arc.md (umulhisi3): Use arc_short_operand predicate.
        (umulhisi3_imm): Update predicates and constraint letters.
        (umulhisi3_reg): Declare instruction as commutative.
        * config/arc/constraints.md (U12, U16): New constraints.
I'm not sure how to feel about this.  U16 looks intuitive, but we have
traditionally used U for memory constraints.  And we use it for ARC
for that purpose, too, even though with a compatible constraint
length of 3.
I suppose it's fine if you're sure we never want to have an addressing
mode that's best described with "12" or "16", or some other number
we might want for an unsigned integer.

Otherwise, I'd suggest using a traditional integer letter.  'J' is free.
(define_expand "umulhisi3"
    [(set (match_operand:SI 0 "register_operand"                           "")
        (mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand"  ""))
-                (zero_extend:SI (match_operand:HI 2 "nonmemory_operand" ""))))]
+                (zero_extend:SI (match_operand:HI 2 "arc_short_operand" ""))))]
    "TARGET_MPYW"
    "{
      if (CONSTANT_P (operands[2]))
      {
-      emit_insn (gen_umulhisi3_imm (operands[0], operands[1], operands[2]));
-      DONE;
+     emit_insn (gen_umulhisi3_imm (operands[0], operands[1], operands[2]));
+     DONE;
Why do you remove half of the indentation?

Reply via email to