From 0f953f83c264764697ed852c41c5cfca66147883 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Thu, 29 Jul 2010 21:48:03 +0200
Subject: [PATCH] revert: rtl.def (NOTE): Swap operands 4 and 5.

	Revert:
	* rtl.def (NOTE): Swap operands 4 and 5.
        * rtl.h (NOTE_DATA, NOTE_DELETED_LABEL_NAME, NOTE_BLOCK,
	NOTE_EH_HANDLER, NOTE_BASIC_BLOCK, NOTE_VAR_LOCATION, NOTE_KIND):
	Adjust accordingly.
        * gengtype.c (adjust_field_rtx_def): Swap operands 4 and 5 of NOTEs.

From-SVN: r162692
---
 gcc/ChangeLog  |  9 +++++++++
 gcc/gengtype.c |  4 ++--
 gcc/rtl.def    |  2 +-
 gcc/rtl.h      | 14 +++++++-------
 4 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a72b83039cec..a0a3833a0ba7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-29  Jakub Jelinek  <jakub@redhat.com>
+
+	Revert:
+	* rtl.def (NOTE): Swap operands 4 and 5.
+        * rtl.h (NOTE_DATA, NOTE_DELETED_LABEL_NAME, NOTE_BLOCK,
+	NOTE_EH_HANDLER, NOTE_BASIC_BLOCK, NOTE_VAR_LOCATION, NOTE_KIND):
+	Adjust accordingly.
+        * gengtype.c (adjust_field_rtx_def): Swap operands 4 and 5 of NOTEs.
+
 2010-07-29  Jakub Jelinek  <jakub@redhat.com>
 
 	PR debug/45110
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index b26476d50f07..9cdc6a46bf0c 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1112,9 +1112,9 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUSED (opt))
 	      else if (i == LABEL_REF
 		       && (aindex == 1 || aindex == 2))
 		t = rtx_tp, subname = "rt_rtx";
-	      else if (i == NOTE && aindex == 5)
-		t = note_union_tp, subname = "";
 	      else if (i == NOTE && aindex == 4)
+		t = note_union_tp, subname = "";
+	      else if (i == NOTE && aindex == 5)
 		t = scalar_tp, subname = "rt_int";
 	      else if (i == NOTE && aindex >= 7)
 		t = scalar_tp, subname = "rt_int";
diff --git a/gcc/rtl.def b/gcc/rtl.def
index 7c38fce706f2..26014ae8d493 100644
--- a/gcc/rtl.def
+++ b/gcc/rtl.def
@@ -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", "iuuBn0i", RTX_EXTRA)
+DEF_RTL_EXPR(NOTE, "note", "iuuB0ni", RTX_EXTRA)
 
 /* ----------------------------------------------------------------------
    Top level constituents of INSN, JUMP_INSN and CALL_INSN.
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 4dc9b48d4cfb..546089068bec 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -871,17 +871,17 @@ extern const char * const reg_note_name[];
    */
 
 /* Opaque data.  */
-#define NOTE_DATA(INSN)	        RTL_CHECKC1 (INSN, 5, NOTE)
-#define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 5, NOTE)
+#define NOTE_DATA(INSN)	        RTL_CHECKC1 (INSN, 4, NOTE)
+#define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 4, NOTE)
 #define SET_INSN_DELETED(INSN) set_insn_deleted (INSN);
-#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)
+#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)
 
 /* 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, 4, NOTE)
+#define NOTE_KIND(INSN) XCINT (INSN, 5, NOTE)
 
 /* Nonzero if INSN is a note marking the beginning of a basic block.  */
 #define NOTE_INSN_BASIC_BLOCK_P(INSN)			\
-- 
GitLab