From: Ben Elliston <bje@redhat.com>
To: cgen@sources.redhat.com
Subject: decoder bug fix
Date: Thu, 09 Jan 2003 03:07:00 -0000 [thread overview]
Message-ID: <m3znqbm365.fsf@scooby.brisbane.redhat.com> (raw)
I am committing the following patch (written by Graydon Hoare last
year) that fixes an edge condition in the (-gen-decoder-switch) logic.
Ben
2003-01-09 Ben Elliston <bje@redhat.com>
From Graydon Hoare <graydon@redhat.com>:
* utils-sim.scm (-gen-decoder-switch): Fix edge condition
empty ISAs.
Index: utils-sim.scm
===================================================================
RCS file: /cvs/src/src/cgen/utils-sim.scm,v
retrieving revision 1.8
diff -u -p -r1.8 utils-sim.scm
--- utils-sim.scm 20 Dec 2002 07:58:32 -0000 1.8
+++ utils-sim.scm 9 Jan 2003 03:05:01 -0000
@@ -938,9 +938,11 @@
";\n"
indent " val = "))
(string-append indent " unsigned int val = "))
- (-gen-decode-bits (dtable-guts-bitnums table-guts)
- (dtable-guts-startbit table-guts)
- (dtable-guts-bitsize table-guts) "insn" lsb0?)
+ (if (< (length (dtable-guts-bitnums table-guts)) 1)
+ "0"
+ (-gen-decode-bits (dtable-guts-bitnums table-guts)
+ (dtable-guts-startbit table-guts)
+ (dtable-guts-bitsize table-guts) "insn" lsb0?))
";\n"
indent " switch (val)\n"
indent " {\n"
<
next reply other threads:[~2003-01-09 3:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-09 3:07 Ben Elliston [this message]
2003-01-09 3:45 ` Doug Evans
2003-01-09 4:02 ` Ben Elliston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3znqbm365.fsf@scooby.brisbane.redhat.com \
--to=bje@redhat.com \
--cc=cgen@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).