[committed] Delete GO_IF_LEGITIMATE_ADDRESS on PA target
John David Anglin
Sun Feb 3 20:25:00 GMT 2013
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.
J. David Anglin email@example.com
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
More information about the Gcc-patches