From: Geoffrey Keating <geoffk@thief.cygnus.com>
To: cgen@sources.redhat.com
Subject: Support SIGN-OPT attribute.
Date: Sat, 30 Jun 2001 18:03:00 -0000 [thread overview]
Message-ID: <200107010103.f6113sw13115@thief.cygnus.com> (raw)
The SIGN-OPT field attribute was documented, used in a number of .cpu
files, was correctly output to the *_cgen_insert_operand routine...
but was never actually _implemented_ anywhere.
OK to commit?
--
Geoff Keating <geoffk@redhat.com>
===File ~/patches/cgen-signopt.patch========================
2001-06-30 Geoffrey Keating <geoffk@redhat.com>
* cgen-ibld.in (insert_normal): Support CGEN_IFLD_SIGN_OPT.
Index: cgen-ibld.in
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/cgen-ibld.in,v
retrieving revision 1.14
diff -p -u -p -r1.14 cgen-ibld.in
--- cgen-ibld.in 2001/05/07 17:55:25 1.14
+++ cgen-ibld.in 2001/07/01 00:59:27
@@ -145,7 +145,22 @@ insert_normal (cd, value, attrs, word_of
}
/* Ensure VALUE will fit. */
- if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
+ if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
+ {
+ long minval = - (1L << (length - 1));
+ unsigned long maxval = mask;
+
+ if ((value > 0 && (unsigned long) value > maxval)
+ || value < minval)
+ {
+ /* xgettext:c-format */
+ sprintf (errbuf,
+ _("operand out of range (%ld not between %ld and %lu)"),
+ value, minval, maxval);
+ return errbuf;
+ }
+ }
+ else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
{
unsigned long maxval = mask;
============================================================
next reply other threads:[~2001-06-30 18:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-30 18:03 Geoffrey Keating [this message]
2001-06-30 19:28 ` 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=200107010103.f6113sw13115@thief.cygnus.com \
--to=geoffk@thief.cygnus.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).