public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* simulation; vliw targets; writeback tracking bitstring overflow
@ 2001-01-25 14:40 Frank Ch. Eigler
  2001-01-28 19:44 ` Ben Elliston
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2001-01-25 14:40 UTC (permalink / raw)
  To: cgen

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-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: simulation; vliw targets; writeback tracking bitstring overflow
  2001-01-25 14:40 simulation; vliw targets; writeback tracking bitstring overflow Frank Ch. Eigler
@ 2001-01-28 19:44 ` Ben Elliston
  2001-01-28 20:04   ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Elliston @ 2001-01-28 19:44 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: cgen

   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

What are the runtime memory requirements for moving to unsigned long long?

Ben

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: simulation; vliw targets; writeback tracking bitstring overflow
  2001-01-28 19:44 ` Ben Elliston
@ 2001-01-28 20:04   ` Frank Ch. Eigler
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2001-01-28 20:04 UTC (permalink / raw)
  To: Ben Elliston; +Cc: cgen

Hi -

On Mon, Jan 29, 2001 at 01:25:40PM +1000, Ben Elliston wrote:
:    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
: 
: What are the runtime memory requirements for moving to unsigned long long?

Effectively immeasurably small: an extra 4 bytes in an scache struct
and semantic function stack frame.  It's not really a big issue either
way.

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

iD8DBQE6dOvaVZbdDOm/ZT0RAvAxAJ9voCBZI7ZQ8rJ+KzlpwjWqkfvXRQCfdN/b
q0rFopFXMsbylOpGGOvd1tI=
=FKDq
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-01-28 20:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-25 14:40 simulation; vliw targets; writeback tracking bitstring overflow Frank Ch. Eigler
2001-01-28 19:44 ` Ben Elliston
2001-01-28 20:04   ` Frank Ch. Eigler

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).