annotate python/ppci/target/thumb/armtoken.py @ 364:c49459768aaa

Work on globals
author Windel Bouwman
date Wed, 19 Mar 2014 20:24:03 +0100
parents 86b02c98a717
children
rev   line source
341
4d204f6f7d4e Rewrite of assembler parts
Windel Bouwman
parents: 340
diff changeset
1
342
86b02c98a717 Moved target directory
Windel Bouwman
parents: 341
diff changeset
2 from ..token import Token, u16, bit_range
340
c7cc54c0dfdf Test featurebranch
Windel Bouwman
parents:
diff changeset
3
341
4d204f6f7d4e Rewrite of assembler parts
Windel Bouwman
parents: 340
diff changeset
4 class ThumbToken(Token):
4d204f6f7d4e Rewrite of assembler parts
Windel Bouwman
parents: 340
diff changeset
5 def __init__(self):
342
86b02c98a717 Moved target directory
Windel Bouwman
parents: 341
diff changeset
6 super().__init__(16)
341
4d204f6f7d4e Rewrite of assembler parts
Windel Bouwman
parents: 340
diff changeset
7
340
c7cc54c0dfdf Test featurebranch
Windel Bouwman
parents:
diff changeset
8 rd = bit_range(0, 3)
c7cc54c0dfdf Test featurebranch
Windel Bouwman
parents:
diff changeset
9
c7cc54c0dfdf Test featurebranch
Windel Bouwman
parents:
diff changeset
10 def encode(self):
c7cc54c0dfdf Test featurebranch
Windel Bouwman
parents:
diff changeset
11 return u16(self.bit_value)
c7cc54c0dfdf Test featurebranch
Windel Bouwman
parents:
diff changeset
12