diff options
author | John David Anglin <dave@hiauly1.hia.nrc.ca> | 2000-11-30 06:31:19 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-11-29 23:31:19 -0700 |
commit | 3502dc9cd31f1497d7190c96e67311c6fef33476 (patch) | |
tree | 57bdfffd7bcfb818e479c3703a8cea6288458407 /gcc/config/pa/pa.c | |
parent | 31a7659bfda8246f1ac518cab9fe920842de292f (diff) | |
download | gcc-3502dc9cd31f1497d7190c96e67311c6fef33476.zip gcc-3502dc9cd31f1497d7190c96e67311c6fef33476.tar.gz gcc-3502dc9cd31f1497d7190c96e67311c6fef33476.tar.bz2 |
function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to...
* function.h (emit_status): Delete member regno_pointer_flag and
rename regno_pointer_flag_length to regno_pointer_align_length.
Delete define for REGNO_POINTER_FLAG.
* integrate.h (inline_remap): Delete member regno_pointer_flag.
Add member x_regno_reg_rtx.
* rtl.h (rtx_def): Use frame_related bit to indicate register is
a pointer in REG expressions. Define REG_POINTER macro.
* alias.c (find_base_value, find_base_term): Use REG_POINTER
instead of REGNO_POINTER_FLAG.
* combine.c (nonzero_bits, num_sign_bit_copies): Likewise.
* emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead
of regno_pointer_flag_length. Remove code which refers to
regno_pointer_flag.
(mark_reg_pointer): Use REG_POINTER.
(free_emit_status): Remove code which refers to regno_pointer_flag.
(init_emit, mark_emit_status): Likewise.
* flow.c (dump_flow_info): Likewise.
* function.c (preserve_temp_slots): Likewise.
* integrate.c (expand_inline_function, copy_rtx_and_substitute):
Use x_regno_reg_rtx instead of regno_pointer_flag for function
pointer determination in map.
* loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER.
* predict.c (estimate_probability): Likewise.
* regclass.c (record_address_regs, reg_scan_mark_refs): Likewise.
* unroll.c (unroll_loop): Use x_regno_reg_rtx instead of
regno_pointer_flag for function pointer determination in map.
* convex.h (RTX_COSTS): Don't test regno_pointer_flag and use
REG_POINTER.
* pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand):
Use REG_POINTER.
(restore_unscaled_index_insn_codes): Revise comment.
From-SVN: r37863
Diffstat (limited to 'gcc/config/pa/pa.c')
-rw-r--r-- | gcc/config/pa/pa.c | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index c7f9209..e2453b7 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -912,8 +912,8 @@ hppa_legitimize_address (x, oldx, mode) idx = NULL_RTX; /* Make sure they're both regs. If one was a SYMBOL_REF [+ const], - then emit_move_sequence will turn on REGNO_POINTER_FLAG so we'll - know it's a base register below. */ + then emit_move_sequence will turn on REG_POINTER so we'll know + it's a base register below. */ if (GET_CODE (reg1) != REG) reg1 = force_reg (Pmode, force_operand (reg1, 0)); @@ -923,7 +923,7 @@ hppa_legitimize_address (x, oldx, mode) /* Figure out what the base and index are. */ if (GET_CODE (reg1) == REG - && REGNO_POINTER_FLAG (REGNO (reg1))) + && REG_POINTER (reg1)) { base = reg1; orig_base = XEXP (XEXP (x, 0), 1); @@ -934,7 +934,7 @@ hppa_legitimize_address (x, oldx, mode) XEXP (x, 1)); } else if (GET_CODE (reg2) == REG - && REGNO_POINTER_FLAG (REGNO (reg2))) + && REG_POINTER (reg2)) { base = reg2; orig_base = XEXP (x, 1); @@ -1544,9 +1544,9 @@ emit_move_sequence (operands, mode, scratch_reg) Don't mark hard registers though. That loses. */ if (GET_CODE (operand0) == REG && REGNO (operand0) >= FIRST_PSEUDO_REGISTER) - REGNO_POINTER_FLAG (REGNO (operand0)) = 1; + REG_POINTER (operand0) = 1; if (REGNO (temp) >= FIRST_PSEUDO_REGISTER) - REGNO_POINTER_FLAG (REGNO (temp)) = 1; + REG_POINTER (temp) = 1; if (ishighonly) set = gen_rtx_SET (mode, operand0, temp); else @@ -6146,17 +6146,19 @@ basereg_operand (op, mode) if (!cse_not_expected) return 0; - /* Once reload has started everything is considered valid. Reload should - only create indexed addresses using the stack/frame pointer, and any - others were checked for validity when created by the combine pass. - - Also allow any register when TARGET_NO_SPACE_REGS is in effect since - we don't have to worry about the braindamaged implicit space register - selection using the basereg only (rather than effective address) - screwing us over. */ - if (TARGET_NO_SPACE_REGS || reload_in_progress || reload_completed) + /* Allow any register when TARGET_NO_SPACE_REGS is in effect since + we don't have to worry about the braindamaged implicit space + register selection from the basereg. */ + if (TARGET_NO_SPACE_REGS) return (GET_CODE (op) == REG); + /* Once reload has started any register with REG_POINTER set + is considered valid. Reload should only create indexed addresses + using the stack/frame pointer. All others are checked for + validity when they are created by the combine pass. */ + if (reload_in_progress || reload_completed) + return (GET_CODE (op) == REG && REG_POINTER (op)); + /* Stack is always OK for indexing. */ if (op == stack_pointer_rtx) return 1; @@ -6168,13 +6170,11 @@ basereg_operand (op, mode) return 1; /* The only other valid OPs are pseudo registers with - REGNO_POINTER_FLAG set. */ - if (GET_CODE (op) != REG - || REGNO (op) < FIRST_PSEUDO_REGISTER - || ! register_operand (op, mode)) - return 0; - - return REGNO_POINTER_FLAG (REGNO (op)); + REG_POINTER set. */ + return (GET_CODE (op) == REG + && REGNO (op) >= FIRST_PSEUDO_REGISTER + && register_operand (op, mode) + && REG_POINTER (op)); } /* Return 1 if this operand is anything other than a hard register. */ @@ -6372,7 +6372,7 @@ restore_unscaled_index_insn_codes (insns) Because of this mis-feature we have to know which register in a reg+reg address is the base and which is the index. - Before reload, the base can be identified by REGNO_POINTER_FLAG. We use + Before reload, the base can be identified by REG_POINTER. We use this to force base + index addresses to match a different insn than index + base addresses. @@ -6392,8 +6392,12 @@ restore_unscaled_index_insn_codes (insns) using unscaled indexed addresses have the same INSN_CODE as they did immediately before delay slot scheduling. - This is extremely gross. Long term, I'd like to be able to look at - REG_POINTER_FLAG to handle these kinds of problems. */ + This is extremely gross. Long term, I'd like to use REG_POINTER to + handle these kinds of problems. + + FIXME: Is this still necessary now that the pointer flag is stored + in REG rtx's and basereg_operand properly checks for the flag after + reload? */ static void record_unscaled_index_insn_codes (insns) |