Fixes the TILE-Gx/TILEPro port of gas to deal with relocations of
authorWalter Lee <walt@tilera.com>
Fri, 28 Oct 2011 14:43:54 +0000 (14:43 +0000)
committerWalter Lee <walt@tilera.com>
Fri, 28 Oct 2011 14:43:54 +0000 (14:43 +0000)
aliases.

gas/ChangeLog
gas/config/tc-tilegx.c
gas/config/tc-tilepro.c

index 76d3c12651a862a8b1da2cb6fd13f2cee4b8b605..b06ac947f72f74cf4e95267cd89a70796a73a5d5 100644 (file)
@@ -1,6 +1,9 @@
 2011-10-28  Walter Lee  <walt@tilera.com>
 
        * NEWS: Fix TILEPro capitalization.
+       * config/tc-tilegx.c (emit_tilegx_instruction) Handle
+        relocations of aliases.
+       * config/tc-tilepro.c: (emit_tilepro_instruction) Likewise.
 
 2011-10-28  Nick Clifton  <nickc@redhat.com>
 
index 2f4d79c6010b7edd39fa4e49206e637a646fafd2..39e1907322d237baa4dfcf76ba24cce0d4b1f7d5 100644 (file)
@@ -691,15 +691,19 @@ emit_tilegx_instruction (tilegx_bundle_bits bits,
 
              if (operand_exp->X_add_symbol->sy_value.X_md)
                {
-                 if (require_symbol)
-                   {
-                     as_bad (_("Operator may only be applied to symbols."));
-                   }
-
                  /* HACK: We used X_md to mark this symbol as a fake wrapper
                     around a real expression. To unwrap it, we just grab its
                     value here.  */
                  operand_exp = &operand_exp->X_add_symbol->sy_value;
+
+                 if (require_symbol)
+                   {
+                     /* Look at the expression, and reject it if it's not a
+                        plain symbol.  */
+                     if (operand_exp->X_op != O_symbol
+                         || operand_exp->X_add_number != 0)
+                       as_bad (_("Operator may only be applied to symbols."));
+                   }
                }
              else
                {
index c198b2c4fa6941e04e63970633e83c1e43290081..44e40d17da1618edd181686a49c45121ee3baf9b 100644 (file)
@@ -560,15 +560,19 @@ emit_tilepro_instruction (tilepro_bundle_bits bits,
 
              if (operand_exp->X_add_symbol->sy_value.X_md)
                {
-                 if (require_symbol)
-                   {
-                     as_bad (_("Operator may only be applied to symbols."));
-                   }
-
                  /* HACK: We used X_md to mark this symbol as a fake wrapper
                     around a real expression. To unwrap it, we just grab its
                     value here.  */
                  operand_exp = &operand_exp->X_add_symbol->sy_value;
+
+                 if (require_symbol)
+                   {
+                     /* Look at the expression, and reject it if it's not a
+                        plain symbol.  */
+                     if (operand_exp->X_op != O_symbol
+                         || operand_exp->X_add_number != 0)
+                       as_bad (_("Operator may only be applied to symbols."));
+                   }
                }
              else
                {