summaryrefslogtreecommitdiff
path: root/gas/config/tc-tilegx.c
diff options
context:
space:
mode:
authorwalt <walt>2011-10-28 14:43:53 +0000
committerwalt <walt>2011-10-28 14:43:53 +0000
commit603ae4c2aacf5628f38ead292b493b645a42f256 (patch)
tree9c247c6c171034855848437eb3a18caa199c67b0 /gas/config/tc-tilegx.c
parent03b73d6784caa7ef0723bb2f3d8559c2edd9de5c (diff)
downloadbinutils-redhat-603ae4c2aacf5628f38ead292b493b645a42f256.tar.gz
Fixes the TILE-Gx/TILEPro port of gas to deal with relocations of
aliases.
Diffstat (limited to 'gas/config/tc-tilegx.c')
-rw-r--r--gas/config/tc-tilegx.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c
index 2f4d79c601..39e1907322 100644
--- a/gas/config/tc-tilegx.c
+++ b/gas/config/tc-tilegx.c
@@ -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
{