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: Fri, 3 Nov 2000 14:12:46 +1100 (EST)
- Cc: cgen development <cgen at sources dot redhat dot com>
: 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?
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.
Ben