changeset 349:13a6e73b448f

Added test load from label
author Windel Bouwman
date Sat, 08 Mar 2014 16:16:41 +0100
parents 442fb043d149
children 2b02bd286fe9
files test/testarmasm.py util/test_patterns.txt
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/testarmasm.py	Sat Mar 08 15:32:33 2014 +0100
+++ b/test/testarmasm.py	Sat Mar 08 16:16:41 2014 +0100
@@ -75,6 +75,14 @@
         self.feed('ldr r5, [r3, 87]')
         self.check('575093e5')
 
+    def testLdrLabel(self):
+        self.feed('ldr r5, lab1')
+        self.feed('ldr r11, lab1')
+        self.feed('ldr r10, lab1')
+        self.feed('lab1:')
+        self.feed('dcd 0x12345566')
+        self.check('04509fe5 00b09fe5 04a01fe5 66553412')
+
     def testSequence1(self):
         self.feed('sub r4,r5,23')
         self.feed('blt x')
--- a/util/test_patterns.txt	Sat Mar 08 15:32:33 2014 +0100
+++ b/util/test_patterns.txt	Sat Mar 08 16:16:41 2014 +0100
@@ -19,4 +19,9 @@
 str r9, [r2, #33]
 ===
 ldr r5, [r3, #87]
-
+===
+ldr r5, lab1
+ldr r11, lab1
+ldr r10, lab1
+lab1:
+.word 0x12345566