diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-29 22:34:48 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-29 22:34:48 +0000 |
commit | 41828ba0c91cdb4856a5c077e1f70d84ca80364f (patch) | |
tree | 773ecd145345464a68b2e439a644c31df6f3d773 /gcc | |
parent | d922644ae1702b8554ddfbc5c76969f825065db2 (diff) | |
download | gcc-41828ba0c91cdb4856a5c077e1f70d84ca80364f.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49329 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 3 | ||||
-rw-r--r-- | gcc/expr.c | 3 | ||||
-rw-r--r-- | gcc/regclass.c | 2 | ||||
-rw-r--r-- | gcc/resource.c | 17 |
5 files changed, 17 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cedff732fa1..6d0befa4cd8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,16 @@ 2002-01-29 Richard Henderson <rth@redhat.com> + * 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. + +2002-01-29 Richard Henderson <rth@redhat.com> + * sched-int.h (struct deps_reg): Add uses_length, clobbers_length. * sched-rgn.c (propagate_deps): Update them. * sched-deps.c (sched_analyze_insn): Update them. Flush the diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index a7a7c5b73f9..f3454f33c5c 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5603,7 +5603,8 @@ processor's ``application binary interface'' (ABI)@. When this macro is defined, RTL is generated for this register once, as with the stack pointer and frame pointer registers. If this macro is not defined, it is up to the machine-dependent files to allocate such a register (if -necessary). +necessary). Note that this register must be fixed when in use (e.g. +when @code{flag_pic} is true). @findex PIC_OFFSET_TABLE_REG_CALL_CLOBBERED @item PIC_OFFSET_TABLE_REG_CALL_CLOBBERED diff --git a/gcc/expr.c b/gcc/expr.c index 06914206ae7..2b8b0856b46 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5393,8 +5393,7 @@ force_operand (value, target) rtx subtarget = get_subtarget (target); /* Check for a PIC address load. */ - if (flag_pic - && (GET_CODE (value) == PLUS || GET_CODE (value) == MINUS) + if ((GET_CODE (value) == PLUS || GET_CODE (value) == MINUS) && XEXP (value, 0) == pic_offset_table_rtx && (GET_CODE (XEXP (value, 1)) == SYMBOL_REF || GET_CODE (XEXP (value, 1)) == LABEL_REF diff --git a/gcc/regclass.c b/gcc/regclass.c index 9bf07048db9..d064e240b62 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -470,7 +470,7 @@ init_reg_sets_1 () ; #endif #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED - else if (i == PIC_OFFSET_TABLE_REGNUM && flag_pic) + else if (i == PIC_OFFSET_TABLE_REGNUM && fixed_regs[i]) ; #endif else if (0 diff --git a/gcc/resource.c b/gcc/resource.c index ebff8c61887..5b19fe45450 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. */ |