Add a new index type table for instruction decoding.
This is in prep for -- recurring theme here -- adding the new extended opcode formats. It turns out that we can avoid a lot of duplicated code if we determine the type of thing referred to in index-bearing instructions inside the general instruction decoder. To do so straightforwardly, this means adding a new opcode info table and then passing it into the decoder. Rather than add another argument to the decoder, I defined a struct to contain all the info tables together, and a pointer to that can get passed in. I simplified the setting up of the info tables, too, so all the allocation is handled within InstrUtils, rather than being (partially) duplicated in a couple places. The only downside is that dexdump will construct one more table than it actually needs, but given that construction is quick and the table is only 256 bytes (though will soon be growing to -- gasp! -- 294 bytes), I figure it's not such a big deal. Most of the files that changed only had edits for how to refer to these info tables. Change-Id: Ia6f1cb25da6e558ac90c6dd3af6bce36b82a6b4d
Loading
Please sign in to comment