This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-3.4.0 fails for ColdFire(does not satisfy constraints)


>> For ColdFire(at least on the newer cores), the immediate add is
>> faster(but larger) than the moveq/add.
>
>OK, then we don't want to use this for Coldfire.  But I suspect that
>we do want to use it for 680x0.

For m68k, the pattern is

(define_insn "*addsi3_internal"
  [(set (match_operand:SI 0 "nonimmediate_operand" "=m,?a,?a,d,a")
        (plus:SI (match_operand:SI 1 "general_operand" "%0,a,rJK,0,0")
                 (match_operand:SI 2 "general_src_operand" "dIKLT,rJK,a,mSrIKLT,mSrIKLs")))]


  "! TARGET_COLDFIRE"
  "* return output_addsi3 (operands);")

Which should work correctly since it would force a register to be used
to hold the constant, and I'm assuming that by seperating the last two
alternatives that the compiler will favor a data register over an
address register.

I'll modify the peephole2 to have TARGET_COLDFIRE in it to prevent it
from triggering for m68k.

-- 
Peter Barada
peter@the-baradas.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]