… | |
… | |
145 | void update_ (); |
145 | void update_ (); |
146 | MTH void update () |
146 | MTH void update () |
147 | { |
147 | { |
148 | // we take advantage of the fact that 0x80 is the sign bit |
148 | // we take advantage of the fact that 0x80 is the sign bit |
149 | // to generate more efficient code on many cpus |
149 | // to generate more efficient code on many cpus |
150 | assert (P_UPTODATE == 0x80); |
150 | assert (sint8 (P_UPTODATE) < 0); |
|
|
151 | assert (sint8 (-1 & ~P_UPTODATE) >= 0); |
151 | |
152 | |
152 | if (expect_false (sint8 (flags_) < 0)) |
153 | if (expect_false (sint8 (flags_) >= 0)) |
153 | update_ (); |
154 | update_ (); |
154 | |
155 | |
155 | // must be true by now |
156 | // must be true by now |
156 | assume (sint8 (flags_) < 0); |
157 | assume (sint8 (flags_) < 0); |
157 | assume (flags_ & P_UPTODATE); |
158 | assume (flags_ & P_UPTODATE); |