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: RFA: performance improvement for PowerPC disassembly


On 03/16/2012 08:13 AM, Alan Modra wrote:
On Thu, Mar 15, 2012 at 10:32:36PM +1030, Alan Modra wrote:
> The middle of print_insn_powerpc should then look like
[snip]

As suggested, this splits out the opcode lookup, and makes some
further tweaks that speed up powerpc disassembly a few percent.

	* ppc-dis.c (PPC_OPC_SEGS, PPC_OP_TO_SEG): Delete.
	(powerpc_opcd_indices): Bump array size.
	(disassemble_init_powerpc): Set powerpc_opcd_indices entries
	corresponding to unused opcodes to following entry.
	(lookup_powerpc): New function, extracted and optimised from..
	(print_insn_powerpc): ..here.

Cool. The search is now bounded to one of the calculated opcode table segments. Wouldn't it be preferable to keep a #define for the number of segments versus having 64 or 65 in various places?
Cheers, Jim.


--
Jim Lemke
Mentor Graphics / CodeSourcery
Orillia Ontario,  +1-613-963-1073


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