Mercurial > lcfOS
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 | 1 |
71 | 2 from .value import Value |
70 | 3 |
4 class Instruction(Value): | |
104 | 5 """ Base class for all instructions. """ |
70 | 6 pass |
7 | |
8 class CallInstruction(Instruction): | |
9 pass | |
10 | |
11 class BinaryOperator(Instruction): | |
104 | 12 def __init__(self, operation, value1, value2): |
13 # Check types of the two operands: | |
14 self.value1 = value1 | |
15 self.value2 = value2 | |
16 self.operation = operation | |
70 | 17 |
18 class LoadInstruction(Instruction): | |
19 def __init__(self, ptr, name, insertBefore): | |
20 self.setName(name) | |
21 |