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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185013
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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. */
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);
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);
}
\f
/* Produce exact duplicate of insn INSN after AFTER.
#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
/* 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,
#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. */