Mercurial > lcfOS
diff python/ppci/assembler.py @ 345:b4882ff0ed06
Added more arm isa tests
author | Windel Bouwman |
---|---|
date | Sun, 02 Mar 2014 17:12:08 +0100 |
parents | 86b02c98a717 |
children | 3bb7dcfe5529 |
line wrap: on
line diff
--- a/python/ppci/assembler.py Sat Mar 01 16:32:27 2014 +0100 +++ b/python/ppci/assembler.py Sun Mar 02 17:12:08 2014 +0100 @@ -7,10 +7,10 @@ def bit_type(value): - assert value < (2**31) + assert value < (2**32) assert value >= 0 t = 'val32' - for n in [16, 8, 5, 3]: + for n in [16, 12, 8, 5, 3]: if value < (2**n): t = 'val{}'.format(n) return t @@ -100,7 +100,7 @@ # Construct a parser given a grammar: tokens2 = ['ID', 'NUMBER', ',', '[', ']', ':', '+', '-', '*', pyyacc.EPS, 'COMMENT', '{', '}', - pyyacc.EOF, 'val32', 'val16', 'val8', 'val5', 'val3'] + pyyacc.EOF, 'val32', 'val16', 'val12', 'val8', 'val5', 'val3'] tokens2.extend(kws) self.kws = kws g = pyyacc.Grammar(tokens2)