]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rtl.def (DEBUG_INSN, [...]): Swap operands 4 and 5.
authorBernd Schmidt <bernds@codesourcery.com>
Tue, 27 Jul 2010 21:52:39 +0000 (21:52 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 27 Jul 2010 21:52:39 +0000 (21:52 +0000)
* 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.

From-SVN: r162602

gcc/ChangeLog
gcc/caller-save.c
gcc/combine.c
gcc/gengtype.c
gcc/ira.c
gcc/print-rtl.c
gcc/rtl.def
gcc/rtl.h

index eb5bad8211a0c3812635e824694b1084e1cfc859..438f2db9df2d956b264a2dc1fc8a666a54403022 100644 (file)
@@ -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.
index d95e66c34c1f788b18e9fa68c7812ee7226616e2..af9b2da8975bd2f4f15c5c20ee116421d0ecdf3f 100644 (file)
@@ -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++)
index 0a1e787cbb712d8f81dbedc2a1074653a9122c1a..ad96e031c7318b1cabe96591b7ec3cdc7a00e961 100644 (file)
@@ -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),
index 9a7de9fb9a9f29adbe4f371d1a333c54c00e6789..b26476d50f07ed716bcbaec687968879565459aa 100644 (file)
@@ -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";
index a6b77cdd3df92033d2c429a6e15dfbaee7464ab4..36d6e61b6ef1bc0dac678b85b3064d8e97ad5842 100644 (file)
--- 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]);
index 96e1485b6ae46814f660aadbf53bd41242218918..8801a88153e3cde4d867b46009cb63c7b88576cc 100644 (file)
@@ -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
index c4a3646afeaee15d55a97c0c30948344a8a23b59..7c38fce706f2840cb35bac12ccc8eaf81b53688d 100644 (file)
@@ -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.
index 4fb96e49d9366a1fc7a39e0244252e91fe97deb1..4dc9b48d4cfb73f613926d050087e961abf9ec04 100644 (file)
--- 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)
 \f
 /* For a REG rtx, REGNO extracts the register number.  REGNO can only
    be used on RHS.  Use SET_REGNO to change the value.  */