Commit 6e8a92b5 authored by Christian Dietrich's avatar Christian Dietrich

cfg-regions: delete all unused bits after check

Not all bits in the cfg region word are used, therefore we can safely
reset them so a known state afterwards.

Change-Id: Ic059b80bf46f9a53742383025e495e653837cb68
parent 243b6a9f
......@@ -64,6 +64,12 @@ class CFGRegions(Analysis):
logging.debug("Region %s: 0x%x", region, region_mask)
# Generate new mask for next region
region_mask <<= 1
ignore_mask = 0
while region_mask < (1 << self.maximal_regions):
ignore_mask |= region_mask
region_mask <<= 1
self.ignore_mask = ignore_mask
def generate_bitmasks(self):
"""Generates the enter/check/leave bitmasks"""
......@@ -97,7 +103,7 @@ class CFGRegions(Analysis):
if _type == "enter":
ret = self.enter_mask.get(abb, [])
elif _type == "leave":
ret = self.leave_mask[abb]
ret = self.leave_mask[abb] + [hex(self.ignore_mask)]
elif _type == "check":
ret = self.check_mask[abb]
assert not ret is None, "Invalid argument"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment