Problem with reloading in a new backend...
Jim Wilson
wilson@tuliptree.org
Sat Apr 12 00:04:00 GMT 2008
Stelian Pop wrote:
> I will still have the problems with the fact that my indirect addressing
> doesn't allow displacements, no ? (so I would need to implement
> LEGITIMIZE_RELOAD_ADDRESS, in which I'll need a special reserved
> register to compute the full address by adding the base and the
> displacement). Or do you imply that I won't need this anymore ?
In your original message, the right thing happens. The stack slot
address gets reloaded.
> (insn 1117 16 1118 2 ../../../../src/gcc-4.3.0/libgcc/../gcc/libgcc2.c:1090 (set (reg:QI 10 r10)
> (const_int 24 [0x18])) 1 {*movqi_imm} (nil))
> (insn 1118 1117 1119 2 ../../../../src/gcc-4.3.0/libgcc/../gcc/libgcc2.c:1090 (set (reg:QI 10 r10)
> (plus:QI (reg:QI 10 r10)
> (reg/f:QI 30 r30))) 13 {addqi3} (expr_list:REG_EQUIV (plus:QI (reg/f:QI 30 r30)
> (const_int 24 [0x18]))
> (nil)))
> (insn 1119 1118 21 2 ../../../../src/gcc-4.3.0/libgcc/../gcc/libgcc2.c:1090 (set (mem/c:QI (reg:QI 10 r10) [31 S1 A16])
> (reg:QI 14 r14)) 8 {*movqi_tomem} (nil))
The only problem here is that the register choice is wrong, and I
already explained why it is wrong.
It is only after you started making some changes that this apparently
broke. It isn't clear why. I can only suggest that you try to debug
it. Put a breakpoint in find_reloads() conditional on the instruction
number. Then step through to see what happens. It should call
finds_reloads_address or find_reloads_toplev at some point, which will
see that we don't have a strictly valid address, and then reload it.
Jim
More information about the Gcc
mailing list