annotate python/ppci/target/arm/token.py @ 342:86b02c98a717 devel

Moved target directory
author Windel Bouwman
date Sat, 01 Mar 2014 15:40:31 +0100
parents
children b4882ff0ed06
rev   line source
342
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
1
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
2 from ..token import Token, u32, bit_range
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
3
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
4
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
5 class ArmToken(Token):
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
6 def __init__(self):
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
7 super().__init__(32)
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
8
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
9 cond = bit_range(28, 32)
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
10
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
11 def encode(self):
86b02c98a717 Moved target directory
Windel Bouwman
parents:
diff changeset
12 return u32(self.bit_value)