This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Parsing [reg+label] expressions


Hi,

I get unexpected results from gas expression parser for expressions like "reg+label".
md_register_arithmetic is false, so I get an O_add expression with two operands.
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 ?


BR,
Fredrik Rothamel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]