Mercurial > lcfOS
comparison test/testarmasm.py @ 340:c7cc54c0dfdf devel
Test featurebranch
author | Windel Bouwman |
---|---|
date | Sun, 23 Feb 2014 16:24:01 +0100 |
parents | 582a1aaa3983 |
children | 4d204f6f7d4e |
comparison
equal
deleted
inserted
replaced
339:6ee17c4dd6b8 | 340:c7cc54c0dfdf |
---|---|
4 from asm import Assembler | 4 from asm import Assembler |
5 from testasm import AsmTestCaseBase | 5 from testasm import AsmTestCaseBase |
6 from target.target_list import armtarget | 6 from target.target_list import armtarget |
7 | 7 |
8 | 8 |
9 class AssemblerARMTestCase(AsmTestCaseBase): | 9 class AssemblerArmThumb2TestCase(AsmTestCaseBase): |
10 def setUp(self): | 10 def setUp(self): |
11 self.t = armtarget | 11 self.t = armtarget |
12 self.obj = ObjectFile() | 12 self.obj = ObjectFile() |
13 self.o = outstream.BinaryOutputStream(self.obj) | 13 self.o = outstream.BinaryOutputStream(self.obj) |
14 self.o.selectSection('.text') | 14 self.o.selectSection('.text') |
147 self.feed('cmp r3, r5') | 147 self.feed('cmp r3, r5') |
148 self.feed('beq henkie') | 148 self.feed('beq henkie') |
149 self.feed('bne henkie') | 149 self.feed('bne henkie') |
150 self.feed('b henkie') | 150 self.feed('b henkie') |
151 self.check('32b41519 94420198 049332bc a340ab42 f6d0f5d1 f4e7') | 151 self.check('32b41519 94420198 049332bc a340ab42 f6d0f5d1 f4e7') |
152 | |
153 | |
154 class AssemblerArmTestCase(AsmTestCaseBase): | |
155 """ ARM-mode (not thumb-mode) instruction assembly test case """ | |
156 def setUp(self): | |
157 self.t = arm_arm_target | |
158 self.obj = ObjectFile() | |
159 self.o = outstream.BinaryOutputStream(self.obj) | |
160 self.o.selectSection('.text') | |
161 self.a = Assembler(target=self.t, stream=self.o) | |
162 | |
163 def testMapOperand(self): | |
164 pass | |
165 | |
166 def testMovImm(self): | |
167 self.feed('mov r4, 100') | |
168 self.check('6440a0e3') |