This is the mail archive of the
mailing list for the binutils project.
RE: [PATCH 1/6] gas/arc: Modify structure used to hold opcodes
- From: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: "noamca at mellanox dot com" <noamca at mellanox dot com>, Francois Bedard <Francois dot Bedard at synopsys dot com>
- Date: Mon, 4 Apr 2016 08:21:11 +0000
- Subject: RE: [PATCH 1/6] gas/arc: Modify structure used to hold opcodes
- Authentication-results: sourceware.org; auth=none
- References: <1459637470-30538-1-git-send-email-andrew dot burgess at embecosm dot com>
> The assembler builds a hash to hold references to arc_opcode entries in
> the arc_opcodes table. This hash assumes that each mnemonic will always
> appear in contiguous blocks within the arc_opcodes table, so all ADD
> instruction will be together, all AND instructions will likewise be
> together and so on.
Yes this is on purpose. Having the group, we ensure we choose the correct encoding. As you can see the grouping of a mnemonic is done accordingly to an order, such that the small immediate arguments are preferred before the long ones. Once, breaking that you need to do the sorting at runtime, which will increase the time a file is assembled.
> The problem with this is that as different variations of arc are added,
> then it is often more convenient to split instructions apart, so all the
> base ADD instructions are together, but, variants of ADD specific to one
> variation of arc are grouped with other instructions specific to that
> arc variant. The current data structures don't support this
> configuration of instructions.
It may not be a good idea to overwrite the basic ARC ISA. Any ARC customer can choose to have a different name than the standard ISA names. Please can u reconsider this. I do not see any reason why a customer to use ADD mnemonic and not MYADD or something of a sort. Allowing the overwriting/addnotation of the standard ISA mnemonics is opening a domain of pain. On top of everything, I miss tests for your proposed patch (1 to 4).