setting BI operands

Ben Elliston bje@cygnus.com
Sun Nov 5 13:56:00 GMT 2000


   : 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



More information about the Cgen mailing list