annotate python/ppci/core/instruction.py @ 107:1544e7a4aa98

Improvements
author Windel Bouwman
date Tue, 01 Jan 2013 17:16:05 +0100
parents ed230e947dc6
children 9e552d34bd60
rev   line source
99
windel
parents: 95
diff changeset
1
71
5351594349b0 Moved error to core
windel
parents: 70
diff changeset
2 from .value import Value
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
3
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
4 class Instruction(Value):
104
ed230e947dc6 Added hexviewer
windel
parents: 99
diff changeset
5 """ Base class for all instructions. """
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
6 pass
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
7
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
8 class CallInstruction(Instruction):
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
9 pass
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
10
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
11 class BinaryOperator(Instruction):
104
ed230e947dc6 Added hexviewer
windel
parents: 99
diff changeset
12 def __init__(self, operation, value1, value2):
ed230e947dc6 Added hexviewer
windel
parents: 99
diff changeset
13 # Check types of the two operands:
ed230e947dc6 Added hexviewer
windel
parents: 99
diff changeset
14 self.value1 = value1
ed230e947dc6 Added hexviewer
windel
parents: 99
diff changeset
15 self.value2 = value2
ed230e947dc6 Added hexviewer
windel
parents: 99
diff changeset
16 self.operation = operation
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
17
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
18 class LoadInstruction(Instruction):
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
19 def __init__(self, ptr, name, insertBefore):
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
20 self.setName(name)
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
21