This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: Unbreak CRIS sim: fix -gen-decode-insn-entry. And why the widened mem fetch?
- From: Dave Brolley <brolley at redhat dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: cgen at sourceware dot org
- Date: Mon, 05 Dec 2005 12:11:12 -0500
- Subject: Re: Unbreak CRIS sim: fix -gen-decode-insn-entry. And why the widened mem fetch?
- References: <200512050130.jB51UttW013171@ignucius.se.axis.com>
Hans-Peter Nilsson wrote:
Date: Fri, 02 Dec 2005 14:13:26 -0500
From: Dave Brolley <brolley@redhat.com>
The switch generator stops when it has tested enough bits to resolve
ambiguity among the defined insns, but since it wasn't going on to test
the remaining bits, the decoder was recognizing invalid insns as valid.
This additional test goes on to test all the fixed bits in each insn to
ensure that they are all correct.
I assume you mean with opcode definitions for
opcode=
0?0
1?0
(where opcode & 2 is don't care and opcode & 1 is invalid)
that there was *before* the extra generated code, only a test
generated for (opcode & 4) and that there's *now* (opcode & 5)
== 4 and (opcode & 5) == 0, with 1 and 5 flagged as invalid
insns; not that you mean that there are now checks for (opcode &
7) == 0 and (opcode & 7) == 4.
Correct.
Dave