2004-03-03 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 3 Mar 2004 19:26:26 +0000 (19:26 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 3 Mar 2004 19:26:26 +0000 (19:26 +0000)
* config/tc-ia64.c (dot_align): New.
(ia64_do_align): Make it static.
(md_pseudo_table): Use "dot_align" for "align".
(ia64_md_do_align): Don't set align_frag here.
(ia64_handle_align): Add a stop bit to the previous bundle if
needed.

* config/tc-ia64.h (ia64_do_align): Removed.

gas/ChangeLog
gas/config/tc-ia64.c
gas/config/tc-ia64.h

index 21acef086c858995428faf44527e0098e6925daf..223a01e3fb797072f3c573f16516e84a2e32390e 100644 (file)
@@ -1,3 +1,14 @@
+2004-03-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-ia64.c (dot_align): New.
+       (ia64_do_align): Make it static.
+       (md_pseudo_table): Use "dot_align" for "align".
+       (ia64_md_do_align): Don't set align_frag here.
+       (ia64_handle_align): Add a stop bit to the previous bundle if
+       needed.
+
+       * config/tc-ia64.h (ia64_do_align): Removed.
+
 2003-03-03  Andrew Stubbs  <andrew.stubbs@superh.com>
 
        * config/tc-sh.c (md_parse_option): Add -isa=sh4-nofpu and
index 96a0ef503fce724e44c3a4986f14feeaa57e8223..57ed9b3a7ca9ad2b4edf3255b2599698cd80e719 100644 (file)
@@ -705,6 +705,7 @@ static int ar_is_in_integer_unit PARAMS ((int regnum));
 static void set_section PARAMS ((char *name));
 static unsigned int set_regstack PARAMS ((unsigned int, unsigned int,
                                          unsigned int, unsigned int));
+static void dot_align (int);
 static void dot_radix PARAMS ((int));
 static void dot_special_section PARAMS ((int));
 static void dot_proc PARAMS ((int));
@@ -1135,9 +1136,8 @@ ia64_flush_insns ()
     as_bad ("qualifying predicate not followed by instruction");
 }
 
-void
-ia64_do_align (nbytes)
-     int nbytes;
+static void
+ia64_do_align (int nbytes)
 {
   char *saved_input_line_pointer = input_line_pointer;
 
@@ -3033,6 +3033,14 @@ convert_expr_to_xy_reg (e, xy, regp)
   return 1;
 }
 
+static void
+dot_align (int arg)
+{
+  /* The current frag is an alignment frag.  */
+  align_frag = frag_now;
+  s_align_bytes (arg);
+}
+
 static void
 dot_radix (dummy)
      int dummy ATTRIBUTE_UNUSED;
@@ -4960,7 +4968,7 @@ const pseudo_typeS md_pseudo_table[] =
     { "lb", dot_scope, 0 },
     { "le", dot_scope, 1 },
 #endif
-    { "align", s_align_bytes, 0 },
+    { "align", dot_align, 0 },
     { "regstk", dot_regstk, 0 },
     { "rotr", dot_rot, DYNREG_GR },
     { "rotf", dot_rot, DYNREG_FR },
@@ -10828,8 +10836,6 @@ ia64_md_do_align (n, fill, len, max)
      int len ATTRIBUTE_UNUSED;
      int max ATTRIBUTE_UNUSED;
 {
-  /* The current frag is an alignment frag.  */
-  align_frag = frag_now;
   if (subseg_text_p (now_seg))
     ia64_flush_insns ();
 }
@@ -10862,6 +10868,18 @@ ia64_handle_align (fragp)
   bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
   p = fragp->fr_literal + fragp->fr_fix;
 
+  /* If no paddings are needed, we check if we need a stop bit.  */ 
+  if (!bytes && fragp->tc_frag_data)
+    {
+      if (fragp->fr_fix < 16)
+       as_bad_where (fragp->fr_file, fragp->fr_line,
+                     _("Can't add stop bit to mark end of instruction group"));
+      else
+       /* Bundles are always in little-endian byte order. Make sure
+          the previous bundle has the stop bit.  */
+       *(p - 16) |= 1;
+    }
+
   /* Make sure we are on a 16-byte boundary, in case someone has been
      putting data into a text section.  */
   if (bytes & 15)
index b112e752a4aab571227ff00c46bf011cac324f0f..dcc2c299602dcd28944479805f65beb673715caf 100644 (file)
@@ -86,7 +86,6 @@ struct ia64_fix
     enum ia64_opnd opnd;
   };
 
-extern void ia64_do_align PARAMS((int n));
 extern void ia64_end_of_source PARAMS((void));
 extern void ia64_start_line PARAMS((void));
 extern int ia64_unrecognized_line PARAMS((int ch));
This page took 0.034096 seconds and 4 git commands to generate.