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]

RE: [PATCH 1/6] gas/arc: Modify structure used to hold opcodes


Hi Andrew,

> 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).

Best,
Claudiu


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