Mercurial > lcfOS
annotate python/ppci/core/instruction.py @ 104:ed230e947dc6
Added hexviewer
author | windel |
---|---|
date | Sun, 30 Dec 2012 22:31:55 +0100 |
parents | 6efbeb903777 |
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 |