This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: Simulator: base_insn and insn in decode.c
- From: Dave Brolley <brolley at redhat dot com>
- To: Ronald Hecht <ronald dot hecht at uni-rostock dot de>
- Cc: cgen at sourceware dot org
- Date: Thu, 03 Aug 2006 18:08:40 -0400
- Subject: Re: Simulator: base_insn and insn in decode.c
- References: <44CDF0AC.6070707@uni-rostock.de> <44D270CF.30506@redhat.com>
I forgot to address your other question which was about the difficulty
of setting entire_insn before decoding. It's a bit of a chicken and egg
situation isnt'y it? You can't set entire insn properly until you know
something about the insn, but you can't call decode without setting
entire_insn properly.
Your method of calling decode twice won't work because of this.
Most existing ports determine the insn length by looking at a few bits
in base_insn and use this information to fill entire_insn.
I'm wondering if the decoder shouldn't be redesigned so that all it
takes is base_insn, which should be all that is necessary to identify
the insn. The extractors for each format would then read any additional
bytes as needed. There is already support for this for ISAs with insns
which are longer than an insn word.
Dave