* expr.c (expr): Move code setting "retval" to the end of the loop,
authorAlan Modra <amodra@gmail.com>
Sun, 9 Sep 2001 14:01:17 +0000 (14:01 +0000)
committerAlan Modra <amodra@gmail.com>
Sun, 9 Sep 2001 14:01:17 +0000 (14:01 +0000)
commite0890092b6a535a9a232ddbed804a0c98a5b4a2c
treebb42790c1bc434ddffe208d731a1f587e182b9f8
parentf16fbd61d9f5f2940137ea1aea523652964723eb
* expr.c (expr): Move code setting "retval" to the end of the loop,
and rearrange for efficiency.  For "PIC code" subtraction, use
"rightseg" rather than recalculating.  For "symbol OP symbol"
subtract, set "retval" to absolute_section if symbols in same
section.
* symbols.c (resolve_symbol_value): Resolve "sym +/- expr" to an
O_symbol.  Simplify a +/- b code.  Allow equality and non-equality
comparisons on symbols from any section.  Allow other comparison
operators as for subtraction.
(symbol_equated_reloc_p): New predicate function.
* symbols.h (symbol_equated_reloc_p): Declare.
* write.c (adjust_reloc_syms): Use symbol_equated_reloc_p.
(write_relocs): Likewise.
(write_object_file): Likewise.
(relax_segment <rs_machine_dependent>): Ensure segment for
expression syms is set correctly.
* config/tc-mips.c (md_estimate_size_before_relax): Likewise.
* config/tc-i386.c (md_assemble <Output jumps>): Don't lose part
of a complex expression when setting up frag_var.
gas/ChangeLog
gas/config/tc-i386.c
gas/config/tc-mips.c
gas/expr.c
gas/symbols.c
gas/symbols.h
gas/write.c