diff options
author | Walter Lee <walt@tilera.com> | 2011-10-28 14:43:54 +0000 |
---|---|---|
committer | Walter Lee <walt@tilera.com> | 2011-10-28 14:43:54 +0000 |
commit | e8b9f50888378c3b742fe435da4bd7c99ab20d42 (patch) | |
tree | a2330158f42e9b5decdf22eabefadbfd8fc0947d /gas | |
parent | ab8b6d29a2a4d48d5046d8fd68f13bb1081d9d7a (diff) | |
download | gdb-e8b9f50888378c3b742fe435da4bd7c99ab20d42.zip gdb-e8b9f50888378c3b742fe435da4bd7c99ab20d42.tar.gz gdb-e8b9f50888378c3b742fe435da4bd7c99ab20d42.tar.bz2 |
Fixes the TILE-Gx/TILEPro port of gas to deal with relocations of
aliases.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 3 | ||||
-rw-r--r-- | gas/config/tc-tilegx.c | 14 | ||||
-rw-r--r-- | gas/config/tc-tilepro.c | 14 |
3 files changed, 21 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 76d3c12..b06ac94 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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> diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c index 2f4d79c..39e1907 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 { diff --git a/gas/config/tc-tilepro.c b/gas/config/tc-tilepro.c index c198b2c..44e40d1 100644 --- a/gas/config/tc-tilepro.c +++ b/gas/config/tc-tilepro.c @@ -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 { |