annotate python/target.py @ 199:a690473b79e2

Added msp430 target
author Windel Bouwman
date Fri, 07 Jun 2013 18:59:57 +0200
parents
children 5e391d9a3381
rev   line source
199
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
1
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
2 """
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
3 Base classes for defining a target
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
4 """
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
5
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
6 # Machine code interface:
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
7 class Operand:
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
8 """ Single machine operand """
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
9 pass
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
10
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
11 class Register(Operand):
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
12 def __init__(self, name):
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
13 self.name = name
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
14
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
15 class Instruction:
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
16 def __init__(self, opcode):
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
17 self.opcode = opcode
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
18
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
19 class Target:
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
20 def __init__(self):
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
21 self.instructions = []
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
22 def createInstruction(self, vi):
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
23 pass
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
24 pass
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
25
a690473b79e2 Added msp430 target
Windel Bouwman
parents:
diff changeset
26