diff python/ppci/core/instruction.py @ 104:ed230e947dc6

Added hexviewer
author windel
date Sun, 30 Dec 2012 22:31:55 +0100
parents 6efbeb903777
children 9e552d34bd60
line wrap: on
line diff
--- a/python/ppci/core/instruction.py	Wed Dec 26 10:53:33 2012 +0100
+++ b/python/ppci/core/instruction.py	Sun Dec 30 22:31:55 2012 +0100
@@ -2,16 +2,18 @@
 from .value import Value
 
 class Instruction(Value):
-   """
-      Base class for all instructions.
-   """
+   """ Base class for all instructions. """
    pass
 
 class CallInstruction(Instruction):
    pass
 
 class BinaryOperator(Instruction):
-   pass
+   def __init__(self, operation, value1, value2):
+      # Check types of the two operands:
+      self.value1 = value1
+      self.value2 = value2
+      self.operation = operation
 
 class LoadInstruction(Instruction):
    def __init__(self, ptr, name, insertBefore):