setting BI operands
Frank Ch. Eigler
fche@redhat.com
Thu Nov 2 18:57:00 GMT 2000
Hi -
On Fri, Nov 03, 2000 at 10:56:34AM +1100, Ben Elliston wrote:
: I noticed that it's possible to assign operands of BI modes to non-boolean
: values. I'm assuming this is because the generated code stores this in a
: byte quantity.
The cgen type system is only partly defined by cgen proper. Most of it is
actually up to the run-time code in opcodes/, sim/, sid/. In C++, the bool
type is used, and its conersion rules happen to apply.
: If the appropriate setter method for BI operands were altered to include
: something like (newval > 0) rather than (newval), we could ensure that these
: operands only ever equal zero or one.
This would be a restriction over the C rules (0 vs !0). In what context
is it an improvement?
- FChE
--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE6Ail5VZbdDOm/ZT0RAu59AJwP2gx8Pu4rp48aalQZPvG+mnEEhACeJXTo
K5AbjWduDOtgiM0yyinV3eU=
=TIVC
-----END PGP SIGNATURE-----
More information about the Cgen
mailing list