This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: setting BI operands


   : 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]