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: More troubles in ColdFire land



>> I've stumbled across another problem in that GO_IF_LEGITIMATE_ADDRESS
>> doesn't discern between source and destination addresses, so it allows
>> (reg+reg) which works in most cases *except* in moves where the source
>> is immediate.
>
>Egads.  One begins to wonder why ColdFire is considered 
>an m68k at all...

It started out being a strict subset of the 68k where the instructions
could only be 48 bits long to help the pipeline, but extra
instructiosn have been added to improve performance, so its not a 68k
subset anymore.  At some point I wonder if its worth while creating
its own directory in gcc/config/coldfire.

The 68k had its own warts.  You can load from PC-relative address, but
you can't store to it. 

>> Is this the best way to solve this, or is there a better method?
>
>That's certainly not enough.  You'll have to modify the
>instruction pattern, not (just) the expander.

In what way should I modify the pattern?
I tried out the change to the expander, and it exploded in emit_insn
with a null pattern!.  I haven't had a chance to track it down yet,
but here's the backtrace:

(gdb) where 4
#0  emit_insn (pattern=0x0)
    at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/emit-rtl.c:3255
#1  0x080a7b7a in emit_move_insn (x=0x4030e820, y=0x403ee8a0)
    at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/expr.c:2742
#2  0x080a9fb2 in store_expr (exp=0x403ef600, target=0x4030e820, want_value=0)
    at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/expr.c:4218
#3  0x080a9682 in expand_assignment (to=0x4030f068, from=0x403ef600, 
    want_value=0, suggest_reg=1)
    at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/expr.c:3866

(gdb) fra 1
#1  0x080a7b7a in emit_move_insn (x=0x4030e820, y=0x403ee8a0)
    at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/expr.c:2742
(gdb) call debug_rtx(x)

(mem/f:SI (symbol_ref:SI ("unseen_objects")) 13)
(gdb) call debug_rtx(y)

(mem/s:SI (plus:SI (reg/v/f:SI 32)
        (const_int 20 [0x14])) 13)
(gdb) p coldfire_valid_move(QImode, y, x)
$2 = 0


-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)


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