[Xtensa] use symbolic enum values in ISA tables

Bob Wilson bwilson@tensilica.com
Fri Nov 14 17:38:00 GMT 2008


The tables in bfd/xtensa-modules.c, which provide information about the 
configurable Xtensa ISA, are littered with hardcoded constants to refer to the 
various entities (opcodes, register files, processor states, etc.) defined in 
that file.  We need to make some changes to this file, but it is a bit of a mess 
because many of all those hardcoded constants.  This patch adds enums for all 
those entities and replaces the hardcoded constants with the symbolic enum 
values.  Tested with an xtensa-elf target and committed on the trunk.

bfd/ChangeLog/

2008-11-14  Bob Wilson  <bob.wilson@acm.org>

	* xtensa-modules.c (xtensa_state_id): New enum, replacing STATE macros.
	(xtensa_field_id, xtensa_regfile_id, xtensa_operand_id)
	(xtensa_iclass_id, xtensa_opcode_id): New enums.
	Replace hardcoded constants throughout this file with enum values.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xtensa-modules.patch.gz
Type: application/x-gzip
Size: 18762 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20081114/b3c63434/attachment.bin>


More information about the Binutils mailing list