MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / measureBitmask

Function measureBitmask

arch/armv7/thumb2_disasm/generator.py:366–373  ·  view source on GitHub ↗
(mask)

Source from the content-addressed store, hash-verified

364 return '((%s & 0x%X)%s0x%X)' % (varName, mask, comparator, reqVal)
365
366def 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

Callers

nothing calls this directly

Calls 2

parseErrorFunction · 0.85
matchMethod · 0.80

Tested by

no test coverage detected