comparison test/testthumbasm.py @ 346:3bb7dcfe5529

expanded arm target
author Windel Bouwman
date Fri, 07 Mar 2014 17:05:32 +0100
parents b4882ff0ed06
children 442fb043d149
comparison
equal deleted inserted replaced
345:b4882ff0ed06 346:3bb7dcfe5529
3 from ppci.objectfile import ObjectFile 3 from ppci.objectfile import ObjectFile
4 from asm import Assembler 4 from asm import Assembler
5 from testasm import AsmTestCaseBase 5 from testasm import AsmTestCaseBase
6 from ppci.target.target_list import thumb_target 6 from ppci.target.target_list import thumb_target
7 7
8 a = Assembler(thumb_target)
8 9
9 class ThumbAssemblerTestCase(AsmTestCaseBase): 10 class ThumbAssemblerTestCase(AsmTestCaseBase):
10 def setUp(self): 11 def setUp(self):
11 self.t = thumb_target 12 self.t = thumb_target
12 self.obj = ObjectFile() 13 self.obj = ObjectFile()
13 self.o = BinaryOutputStream(self.obj) 14 self.ostream = BinaryOutputStream(self.obj)
14 self.o.selectSection('.text') 15 self.ostream.selectSection('.text')
15 self.a = Assembler(target=self.t, stream=self.o) 16 self.a = a #
16 17
17 def testMovImm8(self): 18 def testMovImm8(self):
18 self.feed('mov r4, 100') 19 self.feed('mov r4, 100')
19 self.check('6424') 20 self.check('6424')
20 21