This is the mail archive of the gcc-patches@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]

[committed] Delete GO_IF_LEGITIMATE_ADDRESS on PA target


The main goal of this change was to replace the deprecated
GO_IF_LEGITIMATE_ADDRESS macro with TARGET_LEGITIMATE_ADDRESS_P.
The patch also modifies the LEGITIMIZE_RELOAD_ADDRESS macro
to use pa_legitimize_reload_address and tightens the memory
address constraint used for floating point moves and stores.

While moving this code was straight forward, as I tried to simplify
the handling of REG+SMALLINT and symbolic addresses, bugs started
crawling out of the woodwork.

I discovered that symbolic_memory_operand was broken.  There were
reload issues for loading constants to floating point registers.
Some patterns in pa.md just made matters worse by creating RTL with
constant sources.  The DF and SFmode move expanders had hacks intended
to reject these constants but they aren't supposed to fail.  So, in
the end, I touched a lot more code than I expected.

The tricky part of pa_legitimate_address_p is the forcing of secondary
reloads to fix SImode and DImode floating point instructions.  In the end,
I decided "reload_in_progress && strict" was the correct way to do this.
"strict" by itself fails to handle asm's correctly.

Tested on hppa-unknown-linux-gnu, hppa2.0w-hp-hpux11.11 and
hppa64-hp-hpux11.11 with no regressions.

Committed to trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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