public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@transmeta.com>
To: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
Cc: cgen@sources.redhat.com
Subject: [RFA:] Fix lsb? bug with insn fields beyond base insn size.
Date: Wed, 19 Jun 2002 11:05:00 -0000	[thread overview]
Message-ID: <15632.51166.158258.170560@casey.transmeta.com> (raw)
In-Reply-To: <200206190111.DAA19613@ignucius.axis.se>

Hans-Peter Nilsson writes:
 > This is a partial fix for what seems like a central problem:
 > bitfields are expressed as (start length) but whether "start" is
 > highest or lowest bit-number depends on "lsb0?".  It looks like
 > that's an ungood design choice and causes several bugs, two
 > fixed below, I hope.  (The "bitrange-overlap?" thingy looks
 > harmless though).  If anyone would ask, I'd say convert all
 > bit-field numbering to be as for the lsb0? #f case: a bitfield
 > specified as (dnf f-op "" () 0 3) always starts at 0 and is 3
 > bits long everywhere, regardless of lsb0?.

One recognizes these issues going in.
One problem to consider is whether the .cpu writer
can enter the data using the numbering scheme found in the architecture
manual, or whether s/he has to translate to cgen's scheme.

Certainly .cpu derived machine generated documentation
should match the architecture manual, but that can be done
at document generation time.  The issue then becomes one
of maintenance.  Are people willing to put up with having
to continually do the translation for cpu's that happen
to pick the "wrong" (1/2 :-) numbering scheme.  And when they
make mistakes will they also argue there's a bug?

One alternative is to do the canonicalization at .cpu reading time,
but that can also lead to confusion (causing people to revisit
the issue again).

I'm not fixed on the current scheme, but it shouldn't change without
a full discussion and buy-in from people on the list.

It'll take a day to study the patch.

  reply	other threads:[~2002-06-19 18:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-18 18:11 Hans-Peter Nilsson
2002-06-19 11:05 ` Doug Evans [this message]
2002-06-24  8:24   ` Hans-Peter Nilsson
2002-06-21 11:59 ` Doug Evans
2002-06-24  7:59   ` Hans-Peter Nilsson
2002-06-21 12:13 ` Doug Evans
2002-06-24  8:00   ` Hans-Peter Nilsson
2002-06-21 13:54 ` Doug Evans
2002-06-24  8:11   ` Hans-Peter Nilsson
2002-06-24  8:18     ` Doug Evans
2002-06-24  9:05       ` Hans-Peter Nilsson

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=15632.51166.158258.170560@casey.transmeta.com \
    --to=dje@transmeta.com \
    --cc=cgen@sources.redhat.com \
    --cc=hans-peter.nilsson@axis.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).