This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-3.3 problem with reloading byte into address register onColdFire
>> I've stumbled across a problem with reload trying to load a byte into
>> an address register, something legal on m68k, but illegal on ColdFire:
>
>There is nothing in LIMIT_RELOAD_CLASS or PREFERRED_RELOAD_CLASS to
>handle this. Note that both of them handle the case where CLASS !=
>ADDR_REGS. I.e., if we don't have ADDR_REGS, then we force it into
>DATA_REGS because we know both DATA_REGS is OK. And if it is ADDR_REGS
>then we leave it alone because we know ADDR_REGS is OK. It looks like
>the 5200 specific movqi pattern is bogus.
here's the movqi pattern for ColdFire:
(define_insn ""
[(set (match_operand:QI 0 "nonimmediate_operand" "=d<Q>,dm,d*a")
(match_operand:QI 1 "general_src_operand" "dmi,d<Q>,di*a"))]
"TARGET_COLDFIRE"
"* return output_move_qimode (operands);")
I'm guessing the 'a' constraint is *really* bad for this
pattern. Perhaps it should look like:
(define_insn ""
[(set (match_operand:QI 0 "nonimmediate_operand" "=d<Q>,dm,d")
(match_operand:QI 1 "general_src_operand" "dmi,d<Q>,di"))]
"TARGET_COLDFIRE"
"* return output_move_qimode (operands);")
Better?
I'll try this out on the testcase and see if it suppresses the
problem.
Thanx for the suggestions.
--
Peter Barada
peter@baradas.org