NDS32/gas: Limit the format of pseudo instruction la.
authorKuan-Lin Chen <kuanlinchentw@gmail.com>
Tue, 27 Jan 2015 03:19:13 +0000 (11:19 +0800)
committerKuan-Lin Chen <kuanlinchentw@gmail.com>
Tue, 27 Jan 2015 03:19:13 +0000 (11:19 +0800)
gas/ChangeLog
gas/config/tc-nds32.c

index 6dbdb7927ed4c850246cf2cdfa3ba3cb800bc688..2e7205b3e609bfff3ce2a78a014dd5c00205c6ea 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-27  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+       * config/tc-nds32.c (do_pseudo_la_internal): Limit the second argument
+       of instruction la to a symbol.
+
 2015-01-27  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
 
        * config/tc-nds32.c (nds32_parse_name): Ignore when the input is
index 28e90aea409d8658a068219bf00b238645c60857..bf537b21681b9922dd3b6f86fd26b3bd9fcc674d 100644 (file)
@@ -2311,9 +2311,18 @@ do_pseudo_bral (int argc, char *argv[], int pv ATTRIBUTE_UNUSED)
 }
 
 static void
-do_pseudo_la_internal (const char *arg_reg, const char *arg_label,
+do_pseudo_la_internal (const char *arg_reg, char *arg_label,
                       const char *line)
 {
+  expressionS exp;
+
+  parse_expression (arg_label, &exp);
+  if (exp.X_op != O_symbol)
+    {
+      as_bad (_("la must use with symbol. '%s'"), line);
+      return;
+    }
+
   relaxing = TRUE;
   /* rt, label */
   if (!nds32_pic && !strstr(arg_label, "@"))
This page took 0.027408 seconds and 4 git commands to generate.