summaryrefslogtreecommitdiff
path: root/pysc-v/InstructionSets/instructions.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysc-v/InstructionSets/instructions.py')
-rw-r--r--pysc-v/InstructionSets/instructions.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/pysc-v/InstructionSets/instructions.py b/pysc-v/InstructionSets/instructions.py
deleted file mode 100644
index 00a3146..0000000
--- a/pysc-v/InstructionSets/instructions.py
+++ /dev/null
@@ -1,36 +0,0 @@
-from ctypes import c_uint32
-
-
-class Instruction:
- size = 4 # Instruction size in bytes
-
- def __init__(self):
- pass
-
- def compile(self):
- # return the binstream of the instruction in a c_uint32
- pass
-
- def execute(self, pc):
- # executes the instruction and returns the next program counter
- return
-
-class InstructionSet:
-
- def __init__(self, init=None):
- self.instructions = dict()
-
- def instruction(self, ins):
- if ins.name not in self.instructions:
- self.instructions[ins.name] = ins
- return ins
-
- # NOTE: We don't need to treat pseudoinstructions in an special way yet,
- # but we separate the decorator for clarity
- pseudoinstruction = instruction
-
-
-if __name__ == "__main__":
- # TODO This is the interface i'd love to have
- addins = add("x5","x2","zero")
- j("labelName")