view python/ppci/core/instruction.py @ 105:6a303f835c6d

Removed compilers directory
author Windel Bouwman
date Mon, 31 Dec 2012 17:35:17 +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)