From: Ben Elliston <bje@redhat.com>
To: CGEN <cgen@sources.redhat.com>
Subject: [RFA] Code gen improvement for sim-decode.scm
Date: Wed, 06 Dec 2000 04:40:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.30.0012062338170.12462-100000@moshpit.cygnus.com> (raw)
The following patch improves the generated extraction code -- such that an
`insn' variable is not defined for instructions that have zero ifields.
Comments? Is there a better way to do this?
Ben
@@ -433,10 +433,13 @@
" extract_" (gen-sym sfmt) ":\n"
" {\n"
" const IDESC *idesc = &" IDESC-TABLE-VAR "[itype];\n"
- " CGEN_INSN_INT insn = "
- (if (adata-integral-insn? CURRENT-ARCH)
- "entire_insn;\n"
- "base_insn;\n")
+ (if (> (length (sfmt-iflds sfmt)) 0)
+ (string-append
+ " CGEN_INSN_INT insn = "
+ (if (adata-integral-insn? CURRENT-ARCH)
+ "entire_insn;\n"
+ "base_insn;\n"))
+ "")
(gen-define-field-macro sfmt)
(gen-define-ifields (sfmt-iflds sfmt) (sfmt-length sfmt) " " #f)
"\n"
next reply other threads:[~2000-12-06 4:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-06 4:40 Ben Elliston [this message]
2000-12-06 17:36 ` Frank Ch. Eigler
2000-12-06 17:44 ` 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=Pine.LNX.4.30.0012062338170.12462-100000@moshpit.cygnus.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).