Indexed address problem
Saajan Singh Chana
ssc24@cam.ac.uk
Wed Jul 19 13:49:00 GMT 2006
Rask Ingemann Lambertsen wrote:
> You are not making it easy to help you. Please tell us what makes you
> conclude that it isn't working reliably (error messages, code which is
> slower and/or larger than expected, etc) and how you tried to make it work,
> such as: Your definition of GO_IF_LEGITIMATE_ADDRESS() and
> TARGET_ADDRESS_COST(), if any.
>
I have defined GO_IF_LEGITIMATE_ADDRESS() to only accept indexed
addresses where the index is HImode, and then LEGITIMIZE_ADDRESS to
replace SImode index registers with a subreg. This sometimes causes
ICEs in emit_move_insn or copy_to_mode_reg because the mode of the index
register is different to the mode of the PLUS or the MULT. I'll try
using a zero_extend as you suggested.
> I would imagine that you need some (zero_extend ...) expressions and also
> to use PSImode for pointers. Your second example above would then look like
>
What is the advantage of using PSImode? As far as I can see there is
nothing which specifies how many bits are actually used, so it would
seem to be treated the same as SImode. The target machine doesn't have
special instructions for manipulating 24-bit pointers, all pointer moves
and arithmetic are done with 32-bit instructions.
> On <URL:http://gcc.gnu.org/lists.html>, please read the part which
> follows: "Please do not include or reference confidentiality notices".
>
Sorry!
Thanks for your help,
Saajan.
More information about the Gcc
mailing list