diff options
| author | Rusty Wagner <rusty@vector35.com> | 2018-01-31 20:24:16 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2018-01-31 20:24:16 -0500 |
| commit | 2f3873928078e8c21911ffeb5476781b31886514 (patch) | |
| tree | 41251ecf52ab82da3d9cf312850a4898df276a96 /python/function.py | |
| parent | 1228e32e300d62f5d76438e4500965d76edeca69 (diff) | |
Adding CPU intrinsics support
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/python/function.py b/python/function.py index 10583b58..7607657f 100644 --- a/python/function.py +++ b/python/function.py @@ -427,7 +427,7 @@ class Function(object): """Function platform (read-only)""" if self._platform: return self._platform - else: + else: plat = core.BNGetFunctionPlatform(self.handle) if plat is None: return None @@ -1878,6 +1878,27 @@ class RegisterStackInfo(object): return "<reg stack: %d regs, stack top in %s>" % (len(self.storage_regs), self.stack_top_reg) +class IntrinsicInput(object): + def __init__(self, type_obj, name=""): + self.name = name + self.type = type_obj + + def __repr__(self): + if len(self.name) == 0: + return "<input: %s>" % str(self.type) + return "<input: %s %s>" % (str(self.type), self.name) + + +class IntrinsicInfo(object): + def __init__(self, inputs, outputs, index=None): + self.inputs = inputs + self.outputs = outputs + self.index = index + + def __repr__(self): + return "<intrinsic: %s -> %s>" % (repr(self.inputs), repr(self.outputs)) + + class InstructionBranch(object): def __init__(self, branch_type, target = 0, arch = None): self.type = branch_type |
