(mask)
| 364 | return '((%s & 0x%X)%s0x%X)' % (varName, mask, comparator, reqVal) |
| 365 | |
| 366 | def measureBitmask(mask): |
| 367 | if not re.match(r'^[01x]+$', mask): |
| 368 | parseError("invalid bitmask \"%s\"" % mask) |
| 369 | result = 0 |
| 370 | for c in mask: |
| 371 | if c in '01': |
| 372 | result += 1 |
| 373 | return result |
| 374 | |
| 375 | #------------------------------------------------------------------------------ |
| 376 | # bit pattern class |
nothing calls this directly
no test coverage detected