This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-3.4.0 fails for ColdFire(does not satisfy constraints)
>> Which is about as good as it can get on ColdFire since there is no
>> valid addqi3 pattern.
>
>Ah, now I see why reload was looking for ADDR_REG. Because
>addsi3_5200 has a ?a,a,rJK alternative, and -32 matches the J
>constraint. So I do think the problem is in that insn. It will tend
>to encourage the use of an address register in some cases for which a
>general register is appropriate.
Why is 'JK' on constraints of both operands for '?a,rJK,rJK'? SHould
that be 'r,0,rJK'? Should I rearrange the constraints to put
'r,0,mrIi' ahead of the last two reload constraints as in:
(define_insn "*addsi3_5200"
[(set (match_operand:SI 0 "nonimmediate_operand" "=m,r,?a,?a")
(plus:SI (match_operand:SI 1 "general_operand" "%0,0,a,rJK")
(match_operand:SI 2 "general_src_operand" "d,mrIi,rJK")))]
"TARGET_COLDFIRE"
"* return output_addsi3 (operands);")
Would this problem also exist for subsi3:
(define_insn "subsi3"
[(set (match_operand:SI 0 "nonimmediate_operand" "=m,d,a")
(minus:SI (match_operand:SI 1 "general_operand" "0,0,0")
(match_operand:SI 2 "general_src_operand" "dT,mSrT,mSrs")))]
""
"sub%.l %2,%0")
where the last constraint should add 'i'?
--
Peter Barada
peter@the-baradas.com