Patchwork [picochip] Drop call arg location notes.

login
register
mail settings
Submitter Hariharan Sandanagobalane
Date May 27, 2011, 8:30 a.m.
Message ID <4DDF6136.4010303@picochip.com>
Download mbox | patch
Permalink /patch/97663/
State New
Headers show

Comments

Hariharan Sandanagobalane - May 27, 2011, 8:30 a.m.
Hello,
Recent changes to dwarf information adds call_arg_location notes just 
after the call instruction. They need to follow the call instruction 
strictly. But, this means that they could occur in the middle of a VLIW 
instruction. Our assembler currently can not handle labels in the middle 
of a VLIW. We are working towards a port of GNU assembler which should 
make this easy in the future. Committed to mainline as r174322

Thanks
Hari

ChangeLog:
         * config/picochip/picochip.c (reorder_var_tracking_notes): Drop
         call_arg_location instructions down the floor.

Patch:

+                 }
              }
          }
          /* Make sure we are not dropping debug instructions.*/

Patch

Index: gcc/config/picochip/picochip.c
===================================================================
--- gcc/config/picochip/picochip.c      (revision 174269)
+++ gcc/config/picochip/picochip.c      (working copy)
@@ -3243,13 +3243,20 @@ 
                      }
                  }
              }
-          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;