… | |
… | |
157 | void update_ (); |
157 | void update_ (); |
158 | MTH void update () |
158 | MTH void update () |
159 | { |
159 | { |
160 | // we take advantage of the fact that 0x80 is the sign bit |
160 | // we take advantage of the fact that 0x80 is the sign bit |
161 | // to generate more efficient code on many cpus |
161 | // to generate more efficient code on many cpus |
162 | assert (sint8 (P_UPTODATE) < 0); |
162 | //assert (sint8 (P_UPTODATE) < 0); |
163 | assert (sint8 (-1 & ~P_UPTODATE) >= 0); |
163 | //assert (sint8 (-1 & ~P_UPTODATE) >= 0); |
164 | |
164 | |
165 | if (expect_false (sint8 (flags_) >= 0)) |
165 | if (expect_false (sint8 (flags_) >= 0)) |
166 | update_ (); |
166 | update_ (); |
167 | |
167 | |
168 | // must be true by now (gcc seems content with only the second test) |
168 | // must be true by now (gcc seems content with only the second test) |
169 | assume (sint8 (flags_) < 0); |
169 | ecb_assume (sint8 (flags_) < 0); |
170 | assume (flags_ & P_UPTODATE); |
170 | ecb_assume (flags_ & P_UPTODATE); |
171 | } |
171 | } |
172 | |
172 | |
173 | MTH uint8 flags () |
173 | MTH uint8 flags () |
174 | { |
174 | { |
175 | update (); |
175 | update (); |