This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: CGEN_DIS_HASH: how to get endianness and/or instruction size?
On Thu, Jan 25, 2007 at 09:59:50AM -0500, Frank Ch. Eigler wrote:
> Use the "value" parameter (a host-endian copy of the "base insn")
> rather than the "buffer" parameter.
>
> > If I want to use the passed instruction value, I need to know what
> > size it is. [...]
>
> See m32r_cgen_dis_hash: a hand-written baby insn classifier routine.
I've seen that, but it assumes that if the top 16 its are zero,
the instruction can be hashed as a 16 bit instruction. That is not
the case for ARCompact.
Branch Conditionally is a 32 bit instuction can have all the top 16 bits
zeroed, and its bottom 16 bits are all operand.
> It is important to realize though that this disassembler hashing
> widget is strictly an optimization. You can try hard-coding the hash
> value to 0 like some other cgen platforms, and see if the performance
> is bearable.
I can only verify this positively when I've completely finished the
port so that other people can use it...