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: Implementing a restrictive addressing mode for a gcc port


Mohamed Shafi wrote:
For the source or the destination register Rd/Ra, the restriction is
that it should be one more than the base register . So the following
instructions are valid:

GCC doesn't provide any easy way for the source address to depend on the destination address, or vice versa.


One thing you could try is generating a double-word pseudo-reg at RTL expand time, and then using subreg 0 for the source and subreg 1 for the dest (or vice versa depending on endianness/word order). This will get you a register pair you can use from the register allocator. This doesn't help at reload time though.

You probably have to define a constraint for every register, and then write an alternative for every register pair matching the correct even register with the correct odd register. That gets you past reload.

Another alternative might be to have a pattern (e.g. reload_insi) that generates secondary reloads that request the register pair you need. This is unlikely to get good code, but would not be hard to do.

Jim


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