def get_target(self,blk,withmap): # withmap unused in fforward m = code.mapper() pc = self.prog.PC() m[pc] = blk.address target = (blk.map[pc]).eval(m) return target.simplify()
def get_targets(self,node,parent): blk = node.data m = code.mapper() pc = self.prog.cpu.PC() m[pc] = blk.address pc = (blk.map(pc)).eval(m) return _target(pc,node).expand()
def get_targets(self,node,parent): """Computes expression of target address in the given node, based on its address and the architecture's program counter (PC). Arguments: node: the current node, not yet added to the cfg. parent: the parent node in the cfg that has targeted the current node. (Unused by :class:`fforward` but required as a generic API for parent classes). Returns: :class:`_target`: the evaluated PC expression. """ blk = node.data m = code.mapper() pc = self.prog.cpu.PC() m[pc] = blk.address pc = (blk.map(pc)).eval(m) return _target(pc,node).expand()
def build(self): m = mapper() for k,v in self.map: m[k.build()] = v.build() m.conds = [c.build() for c in self.conds] return m
def build(self): m = mapper() for k, v in self.map: m[k.build()] = v.build() m.conds = [c.build() for c in self.conds] return m