aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2001-05-07 02:54:29 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2001-05-07 02:54:29 +0000
commitd5fa86ba422125132551f77aecb7d047e160ef0e (patch)
tree3727b836eb7f97c7cfce009b0b26ad656abd2ae4 /gcc
parentff5a340ad5ccffb8c843a3f6e7632b22461dab16 (diff)
downloadgcc-d5fa86ba422125132551f77aecb7d047e160ef0e.zip
gcc-d5fa86ba422125132551f77aecb7d047e160ef0e.tar.gz
gcc-d5fa86ba422125132551f77aecb7d047e160ef0e.tar.bz2
rs6000.c (rs6000_emit_prologue): Don't save the link register if we're not going to use it.
* config/rs6000/rs6000.c (rs6000_emit_prologue): Don't save the link register if we're not going to use it. * config/rs6000/rs6000.c (output_profile_hook): Fix a warning. (output_function_profiler): Likewise. From-SVN: r41888
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/rs6000/rs6000.c11
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 11c7b00..9226112 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2001-05-06 Geoff Keating <geoffk@redhat.com>
+
+ * config/rs6000/rs6000.c (rs6000_emit_prologue): Don't save
+ the link register if we're not going to use it.
+
+ * config/rs6000/rs6000.c (output_profile_hook): Fix a warning.
+ (output_function_profiler): Likewise.
+
2001-05-07 Alan Modra <amodra@one.net.au>
* pa.c (compute_frame_size): 64-bit frame marker is 16 bytes.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 4a22802..09cef29 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */
#include "except.h"
#include "function.h"
#include "output.h"
+#include "basic-block.h"
#include "toplev.h"
#include "ggc.h"
#include "hashtab.h"
@@ -5940,8 +5941,9 @@ rs6000_emit_prologue ()
it. We use R11 for this purpose because emit_load_toc_table
can use register 0. This allows us to use a plain 'blr' to return
from the procedure more often. */
- int save_LR_around_toc_setup = (TARGET_ELF && flag_pic != 0 &&
- ! info->lr_save_p);
+ int save_LR_around_toc_setup = (TARGET_ELF && flag_pic != 0
+ && ! info->lr_save_p
+ && EXIT_BLOCK_PTR->pred != NULL);
if (save_LR_around_toc_setup)
emit_move_insn (gen_rtx_REG (Pmode, 11),
gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM));
@@ -7347,7 +7349,7 @@ output_profile_hook (labelno)
}
else if (DEFAULT_ABI == ABI_DARWIN)
{
- char *mcount_name = RS6000_MCOUNT;
+ const char *mcount_name = RS6000_MCOUNT;
int caller_addr_regno = LINK_REGISTER_REGNUM;
/* Be conservative and always set this, at least for now. */
@@ -7376,9 +7378,6 @@ output_function_profiler (file, labelno)
FILE *file;
int labelno;
{
- /* The last used parameter register. */
- int last_parm_reg;
- int i, j;
char buf[100];
ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno);