[PATCH]: Don't use return_external_pic when generating PA 2.0 code
John David Anglin
dave@hiauly1.hia.nrc.ca
Wed Mar 5 23:15:00 GMT 2003
We don't need to use return_external_pic on PA 2.0. This is a small
optimization that I missed when I reworked the save and restore of the
pic register.
Tested on hppa2.0-hp-hp11.11, hppa64-hp-hpux11.x, 3.3 and 3.4.
Installed to main and 3.3 branch.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2003-03-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.md (return_external_pic): Add !TARGET_PA_20 to constraint.
(epilogue): Don't generate return_external_pic when emitting PA 2.0
code.
Index: config/pa/pa.md
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.md,v
retrieving revision 1.121
diff -u -3 -p -r1.121 pa.md
--- config/pa/pa.md 18 Feb 2003 18:27:13 -0000 1.121
+++ config/pa/pa.md 4 Mar 2003 20:45:08 -0000
@@ -5629,7 +5629,9 @@
[(return)
(clobber (reg:SI 1))
(use (reg:SI 2))]
- "!TARGET_NO_SPACE_REGS && flag_pic && current_function_calls_eh_return"
+ "!TARGET_NO_SPACE_REGS
+ && !TARGET_PA_20
+ && flag_pic && current_function_calls_eh_return"
"ldsid (%%sr0,%%r2),%%r1\;mtsp %%r1,%%sr0\;be%* 0(%%sr0,%%r2)"
[(set_attr "type" "branch")
(set_attr "length" "12")])
@@ -5668,6 +5670,7 @@
This is only a problem for returns from shared code on ports
using space registers. */
if (!TARGET_NO_SPACE_REGS
+ && !TARGET_PA_20
&& flag_pic && current_function_calls_eh_return)
x = gen_return_external_pic ();
else
More information about the Gcc-patches
mailing list