summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-27 21:52:39 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-27 21:52:39 +0000
commit3a55c112b92d0ef76f0a956b6c3b826037c1be8f (patch)
treec3ffb1e215f4907529c744c4900ca89040e35856
parentb78351e5b501a68b78169103678db806cf610607 (diff)
downloadgcc-3a55c112b92d0ef76f0a956b6c3b826037c1be8f.tar.gz
* rtl.def (DEBUG_INSN, INSN, JUMP_INSN, CALL_INSN, NOTE): Swap operands
4 and 5. * rtl.h (PATTERN, INSN_LOCATOR, NOTE_DATA, NOTE_DELETED_LABEL_NAME, NOTE_BLOCK, NOTE_EH_HANDLER, NOTE_BASIC_BLOCK, NOTE_VAR_LOCATION, NOTE_KIND, LABEL_NUSES, LABEL_REFS): Adjust accordingly. * gengtype.c (adjust_field_rtx_def): Swap operands 4 and 5 of CODE_LABELs and NOTEs. * caller-save.c (init_caller_save): Fix up gen_rtx_INSN call. * combine.c (try_combine): Likewise. * ira.c (setup_prohibited_mode_move_regs): Likewise. * print-rtl.c (print_rtx): Start REG_NOTES on a new line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162602 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/caller-save.c4
-rw-r--r--gcc/combine.c4
-rw-r--r--gcc/gengtype.c8
-rw-r--r--gcc/ira.c2
-rw-r--r--gcc/print-rtl.c6
-rw-r--r--gcc/rtl.def10
-rw-r--r--gcc/rtl.h26
8 files changed, 47 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eb5bad8211a..438f2db9df2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2010-07-27 Bernd Schmidt <bernds@codesourcery.com>
+
+ * rtl.def (DEBUG_INSN, INSN, JUMP_INSN, CALL_INSN, NOTE): Swap operands
+ 4 and 5.
+ * rtl.h (PATTERN, INSN_LOCATOR, NOTE_DATA, NOTE_DELETED_LABEL_NAME,
+ NOTE_BLOCK, NOTE_EH_HANDLER, NOTE_BASIC_BLOCK, NOTE_VAR_LOCATION,
+ NOTE_KIND, LABEL_NUSES, LABEL_REFS): Adjust accordingly.
+ * gengtype.c (adjust_field_rtx_def): Swap operands 4 and 5 of
+ CODE_LABELs and NOTEs.
+ * caller-save.c (init_caller_save): Fix up gen_rtx_INSN call.
+ * combine.c (try_combine): Likewise.
+ * ira.c (setup_prohibited_mode_move_regs): Likewise.
+ * print-rtl.c (print_rtx): Start REG_NOTES on a new line.
+
2010-07-27 Joseph Myers <joseph@codesourcery.com>
* coretypes.h (struct cl_option_handlers): Declare.
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index d95e66c34c1..af9b2da8975 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -263,8 +263,8 @@ init_caller_save (void)
savepat = gen_rtx_SET (VOIDmode, test_mem, test_reg);
restpat = gen_rtx_SET (VOIDmode, test_reg, test_mem);
- saveinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, savepat, -1, 0);
- restinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, restpat, -1, 0);
+ saveinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, savepat, 0, -1, 0);
+ restinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, restpat, 0, -1, 0);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = 1; j <= MOVE_MAX_WORDS; j++)
diff --git a/gcc/combine.c b/gcc/combine.c
index 0a1e787cbb7..ad96e031c73 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2662,8 +2662,8 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
as I2 will not cause a problem. */
i1 = gen_rtx_INSN (VOIDmode, INSN_UID (i2), NULL_RTX, i2,
- BLOCK_FOR_INSN (i2), INSN_LOCATOR (i2),
- XVECEXP (PATTERN (i2), 0, 1), -1, NULL_RTX);
+ BLOCK_FOR_INSN (i2), XVECEXP (PATTERN (i2), 0, 1),
+ INSN_LOCATOR (i2), -1, NULL_RTX);
SUBST (PATTERN (i2), XVECEXP (PATTERN (i2), 0, 0));
SUBST (XEXP (SET_SRC (PATTERN (i2)), 0),
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 9a7de9fb9a9..b26476d50f0 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1105,16 +1105,16 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUSED (opt))
t = mem_attrs_tp, subname = "rt_mem";
else if (i == JUMP_INSN && aindex == 8)
t = rtx_tp, subname = "rt_rtx";
- else if (i == CODE_LABEL && aindex == 4)
- t = scalar_tp, subname = "rt_int";
else if (i == CODE_LABEL && aindex == 5)
+ t = scalar_tp, subname = "rt_int";
+ else if (i == CODE_LABEL && aindex == 4)
t = rtx_tp, subname = "rt_rtx";
else if (i == LABEL_REF
&& (aindex == 1 || aindex == 2))
t = rtx_tp, subname = "rt_rtx";
- else if (i == NOTE && aindex == 4)
- t = note_union_tp, subname = "";
else if (i == NOTE && aindex == 5)
+ t = note_union_tp, subname = "";
+ else if (i == NOTE && aindex == 4)
t = scalar_tp, subname = "rt_int";
else if (i == NOTE && aindex >= 7)
t = scalar_tp, subname = "rt_int";
diff --git a/gcc/ira.c b/gcc/ira.c
index a6b77cdd3df..36d6e61b6ef 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1211,7 +1211,7 @@ setup_prohibited_mode_move_regs (void)
test_reg1 = gen_rtx_REG (VOIDmode, 0);
test_reg2 = gen_rtx_REG (VOIDmode, 0);
move_pat = gen_rtx_SET (VOIDmode, test_reg1, test_reg2);
- move_insn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, move_pat, -1, 0);
+ move_insn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, move_pat, 0, -1, 0);
for (i = 0; i < NUM_MACHINE_MODES; i++)
{
SET_HARD_REG_SET (ira_prohibited_mode_move_regs[i]);
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 96e1485b6ae..8801a88153e 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -333,6 +333,10 @@ print_rtx (const_rtx in_rtx)
case 'e':
do_e:
indent += 2;
+ if (i == 7 && INSN_P (in_rtx))
+ /* Put REG_NOTES on their own line. */
+ fprintf (outfile, "\n%s%*s",
+ print_rtx_head, indent * 2, "");
if (!sawclose)
fprintf (outfile, " ");
print_rtx (XEXP (in_rtx, i));
@@ -378,7 +382,7 @@ print_rtx (const_rtx in_rtx)
break;
case 'i':
- if (i == 4 && INSN_P (in_rtx))
+ if (i == 5 && INSN_P (in_rtx))
{
#ifndef GENERATOR_FILE
/* Pretty-print insn locators. Ignore scoping as it is mostly
diff --git a/gcc/rtl.def b/gcc/rtl.def
index c4a3646afea..7c38fce706f 100644
--- a/gcc/rtl.def
+++ b/gcc/rtl.def
@@ -123,21 +123,21 @@ DEF_RTL_EXPR(ADDRESS, "address", "e", RTX_MATCH)
---------------------------------------------------------------------- */
/* An annotation for variable assignment tracking. */
-DEF_RTL_EXPR(DEBUG_INSN, "debug_insn", "iuuBieie", RTX_INSN)
+DEF_RTL_EXPR(DEBUG_INSN, "debug_insn", "iuuBeiie", RTX_INSN)
/* An instruction that cannot jump. */
-DEF_RTL_EXPR(INSN, "insn", "iuuBieie", RTX_INSN)
+DEF_RTL_EXPR(INSN, "insn", "iuuBeiie", RTX_INSN)
/* An instruction that can possibly jump.
Fields ( rtx->u.fld[] ) have exact same meaning as INSN's. */
-DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBieie0", RTX_INSN)
+DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBeiie0", RTX_INSN)
/* An instruction that can possibly call a subroutine
but which will not change which instruction comes next
in the current function.
Field ( rtx->u.fld[8] ) is CALL_INSN_FUNCTION_USAGE.
All other fields ( rtx->u.fld[] ) have exact same meaning as INSN's. */
-DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuuBieiee", RTX_INSN)
+DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuuBeiiee", RTX_INSN)
/* A marker that indicates that control will not flow through. */
DEF_RTL_EXPR(BARRIER, "barrier", "iuu00000", RTX_EXTRA)
@@ -155,7 +155,7 @@ DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", RTX_EXTRA)
4: note-specific data
5: enum insn_note
6: unique number if insn_note == note_insn_deleted_label. */
-DEF_RTL_EXPR(NOTE, "note", "iuuB0ni", RTX_EXTRA)
+DEF_RTL_EXPR(NOTE, "note", "iuuBn0i", RTX_EXTRA)
/* ----------------------------------------------------------------------
Top level constituents of INSN, JUMP_INSN and CALL_INSN.
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 4fb96e49d93..4dc9b48d4cf 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -757,15 +757,17 @@ extern void rtl_check_failed_flag (const char *, const_rtx, const char *,
#define NEXT_INSN(INSN) XEXP (INSN, 2)
#define BLOCK_FOR_INSN(INSN) XBBDEF (INSN, 3)
-#define INSN_LOCATOR(INSN) XINT (INSN, 4)
+
+/* The body of an insn. */
+#define PATTERN(INSN) XEXP (INSN, 4)
+
+#define INSN_LOCATOR(INSN) XINT (INSN, 5)
/* LOCATION of an RTX if relevant. */
#define RTL_LOCATION(X) (INSN_P (X) ? \
locator_location (INSN_LOCATOR (X)) \
: UNKNOWN_LOCATION)
/* LOCATION of current INSN. */
#define CURR_INSN_LOCATION (locator_location (curr_insn_locator ()))
-/* The body of an insn. */
-#define PATTERN(INSN) XEXP (INSN, 5)
/* Code number of instruction, from when it was recognized.
-1 means this instruction has not been recognized yet. */
@@ -869,17 +871,17 @@ extern const char * const reg_note_name[];
*/
/* Opaque data. */
-#define NOTE_DATA(INSN) RTL_CHECKC1 (INSN, 4, NOTE)
-#define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 4, NOTE)
+#define NOTE_DATA(INSN) RTL_CHECKC1 (INSN, 5, NOTE)
+#define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 5, NOTE)
#define SET_INSN_DELETED(INSN) set_insn_deleted (INSN);
-#define NOTE_BLOCK(INSN) XCTREE (INSN, 4, NOTE)
-#define NOTE_EH_HANDLER(INSN) XCINT (INSN, 4, NOTE)
-#define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 4, NOTE)
-#define NOTE_VAR_LOCATION(INSN) XCEXP (INSN, 4, NOTE)
+#define NOTE_BLOCK(INSN) XCTREE (INSN, 5, NOTE)
+#define NOTE_EH_HANDLER(INSN) XCINT (INSN, 5, NOTE)
+#define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 5, NOTE)
+#define NOTE_VAR_LOCATION(INSN) XCEXP (INSN, 5, NOTE)
/* In a NOTE that is a line number, this is the line number.
Other kinds of NOTEs are identified by negative numbers here. */
-#define NOTE_KIND(INSN) XCINT (INSN, 5, NOTE)
+#define NOTE_KIND(INSN) XCINT (INSN, 4, NOTE)
/* Nonzero if INSN is a note marking the beginning of a basic block. */
#define NOTE_INSN_BASIC_BLOCK_P(INSN) \
@@ -971,7 +973,7 @@ extern const char * const note_insn_name[NOTE_INSN_MAX];
/* In jump.c, each label contains a count of the number
of LABEL_REFs that point at it, so unused labels can be deleted. */
-#define LABEL_NUSES(RTX) XCINT (RTX, 4, CODE_LABEL)
+#define LABEL_NUSES(RTX) XCINT (RTX, 5, CODE_LABEL)
/* Labels carry a two-bit field composed of the ->jump and ->call
bits. This field indicates whether the label is an alternate
@@ -1031,7 +1033,7 @@ enum label_kind
/* Once basic blocks are found, each CODE_LABEL starts a chain that
goes through all the LABEL_REFs that jump to that label. The chain
eventually winds up at the CODE_LABEL: it is circular. */
-#define LABEL_REFS(LABEL) XCEXP (LABEL, 5, CODE_LABEL)
+#define LABEL_REFS(LABEL) XCEXP (LABEL, 4, CODE_LABEL)
/* For a REG rtx, REGNO extracts the register number. REGNO can only
be used on RHS. Use SET_REGNO to change the value. */