view python/ppci/core/instruction.py @ 108:8267ba1dbce3

Added testcode
author Windel Bouwman
date Tue, 01 Jan 2013 17:17:44 +0100
parents ed230e947dc6
children 9e552d34bd60
line wrap: on
line source


from .value import Value

class Instruction(Value):
   """ Base class for all instructions. """
   pass

class CallInstruction(Instruction):
   pass

class BinaryOperator(Instruction):
   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):
      self.setName(name)