This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: Don't use return_external_pic when generating PA 2.0 code
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Mar 2003 18:15:49 -0500 (EST)
- Subject: [PATCH]: Don't use return_external_pic when generating PA 2.0 code
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 dot anglin at nrc-cnrc dot gc dot ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2003-03-05 John David Anglin <dave dot anglin at nrc-cnrc dot gc dot 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