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: Indexed address problem


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.


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