This is the mail archive of the
mailing list for the binutils project.
Parsing [reg+label] expressions
- From: Fredrik Rothamel <fredrik dot rothamel at bahnhof dot se>
- To: binutils at sourceware dot org
- Date: Wed, 16 May 2012 23:04:09 +0200
- Subject: Parsing [reg+label] expressions
I get unexpected results from gas expression parser for expressions like
md_register_arithmetic is false, so I get an O_add expression with two
The register name is in the symbol table and is correctly recognized as
X_op = O_register.
The label is parsed and get X_op = O_symbol but when it is inserted in
the add expression using make_expr_symbol() the X_op information is
lost. When I examine the complete expression, the label operand
(X_op_symbol) has X_op = O_constant.
How do I test if this actually is constant or a symbol ?