diff options
Diffstat (limited to 'test/analysis')
| -rw-r--r-- | test/analysis/data_flow.py | 8 | ||||
| -rw-r--r-- | test/analysis/depgraph.py | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/test/analysis/data_flow.py b/test/analysis/data_flow.py index 1784f87f..2c24773a 100644 --- a/test/analysis/data_flow.py +++ b/test/analysis/data_flow.py @@ -32,10 +32,11 @@ LBL4 = AsmLabel("lbl4") LBL5 = AsmLabel("lbl5") LBL6 = AsmLabel("lbl6") +IRDst = ExprId('IRDst', 32) +dummy = ExprId('dummy', 32) def gen_irblock(label, exprs_list): - lines = [None for _ in xrange(len(exprs_list))] irs = [] for exprs in exprs_list: if isinstance(exprs, AssignBlock): @@ -43,7 +44,8 @@ def gen_irblock(label, exprs_list): else: irs.append(AssignBlock(exprs)) - irbl = IRBlock(label, irs, lines) + irs.append(AssignBlock({IRDst:dummy})) + irbl = IRBlock(label, irs) return irbl @@ -67,7 +69,7 @@ class IRATest(ira): def __init__(self, symbol_pool=None): arch = Arch() super(IRATest, self).__init__(arch, 32, symbol_pool) - self.IRDst = pc + self.IRDst = IRDst self.ret_reg = r def get_out_regs(self, _): diff --git a/test/analysis/depgraph.py b/test/analysis/depgraph.py index 005ab32c..63313861 100644 --- a/test/analysis/depgraph.py +++ b/test/analysis/depgraph.py @@ -50,10 +50,9 @@ LBL5 = AsmLabel("lbl5") LBL6 = AsmLabel("lbl6") def gen_irblock(label, exprs_list): - """ Returns an IRBlock with empty lines. + """ Returns an IRBlock. Used only for tests purpose """ - lines = [None for _ in xrange(len(exprs_list))] irs = [] for exprs in exprs_list: if isinstance(exprs, AssignBlock): @@ -61,7 +60,7 @@ def gen_irblock(label, exprs_list): else: irs.append(AssignBlock(exprs)) - irbl = IRBlock(label, irs, lines) + irbl = IRBlock(label, irs) return irbl |