public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: cgen@sources.redhat.com
Subject: simulation; vliw targets; writeback tracking bitstring overflow
Date: Thu, 25 Jan 2001 14:40:00 -0000	[thread overview]
Message-ID: <20010125173953.B915@redhat.com> (raw)

Hi -

For an under-development cgen-based simulator port, we have a VLIW-type
machine that uses the "parallel-write?" method of concurrency modelling.
That means that during the semantic stage, a parexec struct is filled up
with write-queued operand values, and a bitmask field ("written") is
tweaked to indicate that a given field in the struct was in fact enqueued.

The problem is that this indicator bitfield is hard-coded as an "unsigned
int", meaning that it can be used to track just 32 operands.  My port of
interest manages to overflow this humble limit, and uses bit numbers on
the order 35 .. 37.  That obviously won't fit, and leads to failures.
(Actually, only the compiler warnings "left shift amount >= width" gave
away that something suspicious was going on!)

Anyway, this needs to get fixed.  A couple of alternatives are:

- widening the bitfield to "unsigned long long"
- adopting a separate per-field indicator variable
- (since I'm interested in sid -> C++) adopting a std::bitset<N> type

I'm tempted to do #1 for now, though #2 sounds straightforward too.
Opinions?

- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6cKs5VZbdDOm/ZT0RAmU+AJ9XZqm1nz2v0fEhVQWM714TCCioIQCfXVeO
/fyvgV05BY+xWYUl4Hb8db4=
=hDZs
-----END PGP SIGNATURE-----

             reply	other threads:[~2001-01-25 14:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-25 14:40 Frank Ch. Eigler [this message]
2001-01-28 19:44 ` Ben Elliston
2001-01-28 20:04   ` Frank Ch. Eigler

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=20010125173953.B915@redhat.com \
    --to=fche@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).