On 01/07/2012 01:54 AM, Richard Earnshaw wrote: >> > + >> > +(define_predicate "mem_noofs_operand" >> > + (and (match_code "mem") >> > + (match_code "reg" "0"))) > > Hmm, I'm a bit worried about things like the frame pointer reg matching > this and then everything going screwy when elimination takes place. > Almost certainly LEGITIMIZE_RELOAD_ADDRESS is going to be confused here > as it doesn't have enough information to know what's legitimate in this > particular case.
Given that there's a define_memory_constraint to go along with it, I think we should be ok. The main part of reload certainly has enough information to reload the address. FWIW, ARM is not unique in the no-offset restriction to atomic memories. I've used exactly the same scheme there for years implementing the original sync optabs. r~