diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/cse.c | 2 | ||||
-rw-r--r-- | gcc/defaults.h | 4 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 5 | ||||
-rw-r--r-- | gcc/flow.c | 10 | ||||
-rw-r--r-- | gcc/gcse.c | 4 | ||||
-rw-r--r-- | gcc/resource.c | 2 | ||||
-rw-r--r-- | gcc/rtl.h | 3 |
8 files changed, 30 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7876cc4b79d..f48ac5403e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +Tue Feb 13 21:09:11 CET 2001 Jan Hubicka <jh@suse.cz> + + * cse.c (cse_main): Converts ifdefs on PIC_OFFSET_TABLE_REGNUM to + conditionals. + * defaults.h (PIC_OFFSET_TABLE_REGNUM): Default to INVALID_REGNUM. + * emit-rtl.c (init_emit_once): Convert ifdefs to conditionals. + * flow.c (mark_regs_live_at_end): Likewise. + (calculate_global_regs_live): Likewise. + * gcse.c (compute_hash_table): Likewise. + (compute_kill_rd): Likewise. + * resource.c (mark_target_live_regs): Likewise. + * rtl.h (INVALID_REGNUM): New macro. + Tue Feb 13 20:59:22 CET 2001 Jan Hubicka <jh@suse.cz> * i386.md (fixsfsi2, fixdfdi2): Fix previous patch. diff --git a/gcc/cse.c b/gcc/cse.c index e69bb634ebb..aacc7750fb6 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -7119,7 +7119,7 @@ cse_main (f, nregs, after_loop, file) #if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM && ! (i == ARG_POINTER_REGNUM && fixed_regs[i]) #endif -#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED) +#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED) && ! (i == PIC_OFFSET_TABLE_REGNUM && flag_pic) #endif ) diff --git a/gcc/defaults.h b/gcc/defaults.h index 20ea99ab62c..098beae440a 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -296,6 +296,10 @@ do { \ #define BUILD_VA_LIST_TYPE(X) ((X) = ptr_type_node) #endif +#ifndef PIC_OFFSET_TABLE_REGNUM +#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM +#endif + /* By default, the preprocessor should be invoked the same way in C++ as in C. */ #ifndef CPLUSPLUS_CPP_SPEC diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 0b9e4aa9e51..96fea2ccf27 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -4197,9 +4197,8 @@ init_emit_once (line_numbers) #endif #endif -#ifdef PIC_OFFSET_TABLE_REGNUM - pic_offset_table_rtx = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM); -#endif + if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) + pic_offset_table_rtx = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM); ggc_add_rtx_root (&pic_offset_table_rtx, 1); ggc_add_rtx_root (&struct_value_rtx, 1); diff --git a/gcc/flow.c b/gcc/flow.c index aff84451e8d..d22540e2801 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -3345,15 +3345,14 @@ mark_regs_live_at_end (set) #endif } -#ifdef PIC_OFFSET_TABLE_REGNUM #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED /* Many architectures have a GP register even without flag_pic. Assume the pic register is not in use, or will be handled by other means, if it is not fixed. */ - if (fixed_regs[PIC_OFFSET_TABLE_REGNUM]) + if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM + && fixed_regs[PIC_OFFSET_TABLE_REGNUM]) SET_REGNO_REG_SET (set, PIC_OFFSET_TABLE_REGNUM); #endif -#endif /* Mark all global registers, and all registers used by the epilogue as being live at the end of the function since they may be @@ -3484,12 +3483,11 @@ calculate_global_regs_live (blocks_in, blocks_out, flags) SET_REGNO_REG_SET (new_live_at_end, ARG_POINTER_REGNUM); #endif -#ifdef PIC_OFFSET_TABLE_REGNUM /* Any constant, or pseudo with constant equivalences, may require reloading from memory using the pic register. */ - if (fixed_regs[PIC_OFFSET_TABLE_REGNUM]) + if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM + && fixed_regs[PIC_OFFSET_TABLE_REGNUM]) SET_REGNO_REG_SET (new_live_at_end, PIC_OFFSET_TABLE_REGNUM); -#endif } /* Regs used in phi nodes are not included in diff --git a/gcc/gcse.c b/gcc/gcse.c index f423c5ec27d..a0eece4ae7a 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -2208,7 +2208,7 @@ compute_hash_table (set_p) #if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM && ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno]) #endif -#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED) +#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED) && ! (regno == PIC_OFFSET_TABLE_REGNUM && flag_pic) #endif @@ -2641,7 +2641,7 @@ compute_kill_rd () && ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno]) #endif -#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED) +#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED) && ! (regno == PIC_OFFSET_TABLE_REGNUM && flag_pic) #endif && regno != FRAME_POINTER_REGNUM) diff --git a/gcc/resource.c b/gcc/resource.c index fa7e9573061..772dad765f5 100644 --- a/gcc/resource.c +++ b/gcc/resource.c @@ -1029,7 +1029,7 @@ mark_target_live_regs (insns, target, res) #if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM && ! (i == ARG_POINTER_REGNUM && fixed_regs[i]) #endif -#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED) +#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED) && ! (i == PIC_OFFSET_TABLE_REGNUM && flag_pic) #endif ) diff --git a/gcc/rtl.h b/gcc/rtl.h index 9db7a37183c..003e92dc316 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1606,6 +1606,9 @@ extern rtx gen_rtx_MEM PARAMS ((enum machine_mode, rtx)); #define LAST_VIRTUAL_REGISTER ((FIRST_VIRTUAL_REGISTER) + 4) +/* REGNUM never really appearing in the INSN stream. */ +#define INVALID_REGNUM (~(unsigned int)0) + extern rtx find_next_ref PARAMS ((rtx, rtx)); extern rtx *find_single_use PARAMS ((rtx, rtx, rtx *)); |