re PR middle-end/52372 (gcc.target/mips/mips16-attributes{,-4}.c SEGV in dwf_regno)
gcc/ PR middle-end/52372 * rtl.h (pc_rtx, ret_rtx, simple_return_rtx, cc0_rtx): Redefine as variables. (GR_PC, GR_CC0, GR_RETURN, GR_SIMPLE_RETURN): Delete. * emit-rtl.c (pc_rtx, ret_rtx, simple_return_rtx, cc0_rtx): New variables. (init_emit_regs): Move associated initialization to... (init_emit_once): ...here. From-SVN: r185013
This commit is contained in:
parent
22a89c862f
commit
ca4adc913d
3 changed files with 27 additions and 14 deletions
|
@ -1,3 +1,14 @@
|
|||
2012-03-06 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
PR middle-end/52372
|
||||
* rtl.h (pc_rtx, ret_rtx, simple_return_rtx, cc0_rtx): Redefine as
|
||||
variables.
|
||||
(GR_PC, GR_CC0, GR_RETURN, GR_SIMPLE_RETURN): Delete.
|
||||
* emit-rtl.c (pc_rtx, ret_rtx, simple_return_rtx, cc0_rtx): New
|
||||
variables.
|
||||
(init_emit_regs): Move associated initialization to...
|
||||
(init_emit_once): ...here.
|
||||
|
||||
2012-03-06 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* config/m68k/m68k.h (ISA_HAS_TAS): New.
|
||||
|
|
|
@ -117,6 +117,12 @@ FIXED_VALUE_TYPE fconst1[MAX_FCONST1];
|
|||
|
||||
rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
|
||||
|
||||
/* Standard pieces of rtx, to be substituted directly into things. */
|
||||
rtx pc_rtx;
|
||||
rtx ret_rtx;
|
||||
rtx simple_return_rtx;
|
||||
rtx cc0_rtx;
|
||||
|
||||
/* A hash table storing CONST_INTs whose absolute value is greater
|
||||
than MAX_SAVED_CONST_INT. */
|
||||
|
||||
|
@ -5536,10 +5542,6 @@ init_emit_regs (void)
|
|||
init_reg_modes_target ();
|
||||
|
||||
/* Assign register numbers to the globally defined register rtx. */
|
||||
pc_rtx = gen_rtx_fmt_ (PC, VOIDmode);
|
||||
ret_rtx = gen_rtx_fmt_ (RETURN, VOIDmode);
|
||||
simple_return_rtx = gen_rtx_fmt_ (SIMPLE_RETURN, VOIDmode);
|
||||
cc0_rtx = gen_rtx_fmt_ (CC0, VOIDmode);
|
||||
stack_pointer_rtx = gen_raw_REG (Pmode, STACK_POINTER_REGNUM);
|
||||
frame_pointer_rtx = gen_raw_REG (Pmode, FRAME_POINTER_REGNUM);
|
||||
hard_frame_pointer_rtx = gen_raw_REG (Pmode, HARD_FRAME_POINTER_REGNUM);
|
||||
|
@ -5855,6 +5857,11 @@ init_emit_once (void)
|
|||
const_tiny_rtx[0][(int) BImode] = const0_rtx;
|
||||
if (STORE_FLAG_VALUE == 1)
|
||||
const_tiny_rtx[1][(int) BImode] = const1_rtx;
|
||||
|
||||
pc_rtx = gen_rtx_fmt_ (PC, VOIDmode);
|
||||
ret_rtx = gen_rtx_fmt_ (RETURN, VOIDmode);
|
||||
simple_return_rtx = gen_rtx_fmt_ (SIMPLE_RETURN, VOIDmode);
|
||||
cc0_rtx = gen_rtx_fmt_ (CC0, VOIDmode);
|
||||
}
|
||||
|
||||
/* Produce exact duplicate of insn INSN after AFTER.
|
||||
|
|
15
gcc/rtl.h
15
gcc/rtl.h
|
@ -2089,6 +2089,11 @@ extern GTY(()) rtx const_tiny_rtx[4][(int) MAX_MACHINE_MODE];
|
|||
#define CONST2_RTX(MODE) (const_tiny_rtx[2][(int) (MODE)])
|
||||
#define CONSTM1_RTX(MODE) (const_tiny_rtx[3][(int) (MODE)])
|
||||
|
||||
extern rtx pc_rtx;
|
||||
extern rtx cc0_rtx;
|
||||
extern rtx ret_rtx;
|
||||
extern rtx simple_return_rtx;
|
||||
|
||||
/* If HARD_FRAME_POINTER_REGNUM is defined, then a special dummy reg
|
||||
is used to represent the frame pointer. This is because the
|
||||
hard frame pointer and the automatic variables are separated by an amount
|
||||
|
@ -2112,10 +2117,6 @@ extern GTY(()) rtx const_tiny_rtx[4][(int) MAX_MACHINE_MODE];
|
|||
/* Index labels for global_rtl. */
|
||||
enum global_rtl_index
|
||||
{
|
||||
GR_PC,
|
||||
GR_CC0,
|
||||
GR_RETURN,
|
||||
GR_SIMPLE_RETURN,
|
||||
GR_STACK_POINTER,
|
||||
GR_FRAME_POINTER,
|
||||
/* For register elimination to work properly these hard_frame_pointer_rtx,
|
||||
|
@ -2208,12 +2209,6 @@ extern struct target_rtl *this_target_rtl;
|
|||
#define mode_mem_attrs \
|
||||
(this_target_rtl->x_mode_mem_attrs)
|
||||
|
||||
/* Standard pieces of rtx, to be substituted directly into things. */
|
||||
#define pc_rtx (global_rtl[GR_PC])
|
||||
#define ret_rtx (global_rtl[GR_RETURN])
|
||||
#define simple_return_rtx (global_rtl[GR_SIMPLE_RETURN])
|
||||
#define cc0_rtx (global_rtl[GR_CC0])
|
||||
|
||||
/* All references to certain hard regs, except those created
|
||||
by allocating pseudo regs into them (when that's possible),
|
||||
go through these unique rtx objects. */
|
||||
|
|
Loading…
Add table
Reference in a new issue