Simulator: base_insn and insn in decode.c
Ronald Hecht
ronald.hecht@uni-rostock.de
Mon Aug 7 14:53:00 GMT 2006
I switched to the SID framework. I found it easier to create a new
target. The disassemby works better as it calls this disassembler code
in src/opcodes. But I'm still in trouble with decode.cxx. It looks the
same as in sim. I'n my opinion the entire_insn should alwasy be left
aligned and not right_aligned as it is now. Base_insn should have the
same alignment. I think this way it is easier to support variable sized
instructions.
Best Regards
Ronald
Dave Brolley wrote:
> 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
>
More information about the Cgen
mailing list