aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-bfin.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2005-10-24 18:35:59 +0000
committerBernd Schmidt <bernds@codesourcery.com>2005-10-24 18:35:59 +0000
commitbeb6bfe84a45198c22b6fb47ec34d34695dc1f3f (patch)
treeb0a43974163077e084cae861c95808ba23d0216f /gas/config/tc-bfin.c
parent124fe9430ecf667c622b63ff43f98d3b0bf219ee (diff)
downloadgdb-beb6bfe84a45198c22b6fb47ec34d34695dc1f3f.zip
gdb-beb6bfe84a45198c22b6fb47ec34d34695dc1f3f.tar.gz
gdb-beb6bfe84a45198c22b6fb47ec34d34695dc1f3f.tar.bz2
* config/tc-bfin.c (Expr_Node_Gen_Reloc): If have symbol + constant,
make a single reloc with an offset rather than a stack. * config/tc-bfin.h (MD_APPLY_SYM_VALUE): Define to 0.
Diffstat (limited to 'gas/config/tc-bfin.c')
-rw-r--r--gas/config/tc-bfin.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c
index a1b3971..d9e88de 100644
--- a/gas/config/tc-bfin.c
+++ b/gas/config/tc-bfin.c
@@ -1003,6 +1003,21 @@ Expr_Node_Gen_Reloc (Expr_Node * head, int parent_reloc)
if (note1 != NULL_CODE)
note = conscode (note1, note);
}
+ else if (head->type == Expr_Node_Binop
+ && (head->value.op_value == Expr_Op_Type_Add
+ || head->value.op_value == Expr_Op_Type_Sub)
+ && head->Left_Child->type == Expr_Node_Reloc
+ && head->Right_Child->type == Expr_Node_Constant)
+ {
+ int val = head->Right_Child->value.i_value;
+ if (head->value.op_value == Expr_Op_Type_Sub)
+ val = -val;
+ note = conscode (note_reloc2 (gencode (0), head->Left_Child->value.s_value,
+ parent_reloc, val, 0),
+ NULL_CODE);
+ if (note1 != NULL_CODE)
+ note = conscode (note1, note);
+ }
else
{
/* Call the recursive function. */