This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: setting BI operands
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Subject: Re: setting BI operands
- From: Ben Elliston <bje at cygnus dot com>
- Date: Mon, 6 Nov 2000 08:55:53 +1100 (EST)
- Cc: cgen development <cgen at sources dot redhat dot com>
: A port I've worked on had frequently did this:
: (set cbit (if QI newc 1 0))
: It should be possible to just use:
: (set cbit newc)
: and for newc to be coerced to BI, based on the convention you've mentioned.
Right, but does this not already work this way? Does the negativeness
of newc have anything to do with the truthness of cbit?
No, it doesn't work as expected. If I set a BI to the value of newc, I get
the 8-bit value of newc, not a 0 or a 1. This leads to unpredictable
results when later interrogating cbit.
Ben