simulation; vliw targets; writeback tracking bitstring overflow
Frank Ch. Eigler
fche@redhat.com
Thu Jan 25 14:40:00 GMT 2001
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-----
More information about the Cgen
mailing list