fix and clean up Xtensa GAS operand checks
Bob Wilson
bwilson@tensilica.com
Tue Jan 31 19:45:00 GMT 2006
The error checking for symbolic operands in the Xtensa port of GAS has been
convoluted and confused. This patch cleans it up a bit. Expressions for the
difference of 2 symbols have not been allowed as operands of Xtensa instructions
for some time, but there was still some complicated logic to check for them in
certain cases depending on whether the instruction might later be relaxed. It
is somewhat simpler now, and the patch also reduces the memory usage by removing
some fields in Xtensa-specific data structures. Tested with an xtensa-elf build
and committed on mainline.
2006-01-31 Bob Wilson <bob.wilson@acm.org>
* config/xtensa-istack.h (TInsn): Remove record_fix and sub_symbol
fields.
* config/tc-xtensa.h (xtensa_frag_type): Remove slot_sub_symbols field.
* config/tc-xtensa.c (md_apply_fix): Check for unexpected uses of
subtracted symbols.
(relaxation_requirements): Add pfinish_frag argument and use it to
replace setting tinsn->record_fix fields.
(xg_assemble_vliw_tokens): Adjust calls to relaxation_requirements
and vinsn_to_insnbuf. Remove references to record_fix and
slot_sub_symbols fields.
(xtensa_mark_narrow_branches): Delete unused code.
(is_narrow_branch_guaranteed_in_range): Handle expr that is not just
a symbol.
(convert_frag_immed): Adjust vinsn_to_insnbuf call and do not set
record_fix fields.
(tinsn_immed_from_frag): Remove code for handling slot_sub_symbols.
(vinsn_to_insnbuf): Change use of record_fixup argument, replacing use
of the record_fix field. Simplify error messages for unexpected
symbolic operands.
(set_expr_symbol_offset_diff): Delete.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas-sym.diff
Type: text/x-patch
Size: 13007 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060131/1fe7be6a/attachment.bin>
More information about the Binutils
mailing list