aboutsummaryrefslogtreecommitdiff
path: root/gcc/resource.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-01-29 14:34:48 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-01-29 14:34:48 -0800
commit12beba6fe60833d89cf886bbce863371fa4c97a0 (patch)
tree773ecd145345464a68b2e439a644c31df6f3d773 /gcc/resource.c
parent2583081eb57e13822839118432d5ac1281b60f89 (diff)
downloadgcc-12beba6fe60833d89cf886bbce863371fa4c97a0.zip
gcc-12beba6fe60833d89cf886bbce863371fa4c97a0.tar.gz
gcc-12beba6fe60833d89cf886bbce863371fa4c97a0.tar.bz2
expr.c (force_operand): Ignore flag_pic for detecting pic address loads.
* expr.c (force_operand): Ignore flag_pic for detecting pic address loads. * regclass.c (init_reg_sets_1): Test fixed_regs not flag_pic for determining if PIC_OFFSET_TABLE_REGNUM is call-clobbered. * resource.c (mark_target_live_regs): Use regs_invalidated_by_call instead of open-coded loop. * doc/tm.texi (PIC_OFFSET_TABLE_REGNUM): Clarify that it must be fixed when in use. From-SVN: r49329
Diffstat (limited to 'gcc/resource.c')
-rw-r--r--gcc/resource.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/gcc/resource.c b/gcc/resource.c
index ebff8c6..5b19fe4 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -1023,21 +1023,8 @@ mark_target_live_regs (insns, target, res)
/* CALL clobbers all call-used regs that aren't fixed except
sp, ap, and fp. Do this before setting the result of the
call live. */
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (call_used_regs[i]
- && i != STACK_POINTER_REGNUM && i != FRAME_POINTER_REGNUM
- && i != ARG_POINTER_REGNUM
-#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
- && i != HARD_FRAME_POINTER_REGNUM
-#endif
-#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
- && ! (i == ARG_POINTER_REGNUM && fixed_regs[i])
-#endif
-#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
- && ! (i == PIC_OFFSET_TABLE_REGNUM && flag_pic)
-#endif
- )
- CLEAR_HARD_REG_BIT (current_live_regs, i);
+ AND_COMPL_HARD_REG_SET (current_live_regs,
+ regs_invalidated_by_call);
/* A CALL_INSN sets any global register live, since it may
have been modified by the call. */