Sorry for missing the point.  It seems to me that 't2' here will conflict with 
condition of the pattern *movhi_insn_arch4:
   "TARGET_ARM
    && arm_arch4
    && (register_operand (operands[0], HImode)
        || register_operand (operands[1], HImode))"

#define TARGET_ARM                      (! TARGET_THUMB)
/* 32-bit Thumb-2 code.  */
#define TARGET_THUMB2                   (TARGET_THUMB && arm_arch_thumb2)


Bah, Indeed ! - I misremembered the t2 there, my mistake.

Yes you are right there, but what I'd like you to do is to use that mechanism rather than putting all this logic in the predicate.

So, I'd prefer you to add a v6t2 to the values for the "arch" attribute, don't forget to update the comments above.

and in arch_enabled you need to enforce this with

 (and (eq_attr "arch" "v6t2")
      (match_test "TARGET_32BIT && arm_arch6 && arm_arch_thumb2"))
         (const_string "yes")

And in the pattern use v6t2 ...

arm_arch_thumb2 implies that this is at the architecture level of v6t2. Therefore TARGET_ARM && arm_arch_thumb2 implies ARM state.



regards
Ramana





Right? Thanks.

Reply via email to