picochip.c (reorder_var_tracking_notes): Drop call_arg_location instructions down...
authorHariharan Sandanagobalane <hariharan@picochip.com>
Fri, 27 May 2011 08:27:23 +0000 (08:27 +0000)
committerHariharan Sandanagobalane <hariharans@gcc.gnu.org>
Fri, 27 May 2011 08:27:23 +0000 (08:27 +0000)
        * config/picochip/picochip.c (reorder_var_tracking_notes): Drop
        call_arg_location instructions down the floor.

From-SVN: r174322

gcc/ChangeLog
gcc/config/picochip/picochip.c

index 8e487e407f27541c26469ef0cd54cec265c168b5..43cce51e977f52fe669b0ec1d16f56d48d2a25d2 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-27  Hariharan Sandanagobalane <hariharan@picochip.com>
+
+       * config/picochip/picochip.c (reorder_var_tracking_notes): Drop
+       call_arg_location instructions down the floor.
+
 2011-05-26  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR rtl-optimization/49154
index 8c2a61bb7ef9da45e397bbf7c660e57c125090e7..f7f1646901d4259bedd78d9ecf01e375a151b7a0 100644 (file)
@@ -3243,13 +3243,20 @@ reorder_var_tracking_notes (void)
                     }
                 }
             }
-          else if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_VAR_LOCATION)
+          else if (NOTE_P (insn))
             {
                rtx prev = PREV_INSN (insn);
                PREV_INSN (next) = prev;
                NEXT_INSN (prev) = next;
-               PREV_INSN (insn) = queue;
-               queue = insn;
+               /* Ignore call_arg notes. They are expected to be just after the
+                  call insn. If the call is start of a long VLIW, labels are
+                  emitted in the middle of a VLIW, which our assembler can not
+                  handle. */
+               if (NOTE_KIND (insn) != NOTE_INSN_CALL_ARG_LOCATION)
+                 {
+                   PREV_INSN (insn) = queue;
+                   queue = insn;
+                 }
             }
         }
         /* Make sure we are not dropping debug instructions.*/