Browse Source

* unsigned byte ldr/str allow also an offset of max. +/-4095

git-svn-id: trunk@22220 -
florian 13 years ago
parent
commit
73d540e7b5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/arm/aoptcpu.pas

+ 2 - 2
compiler/arm/aoptcpu.pas

@@ -987,13 +987,13 @@ Implementation
                           { new offset must be valid: either in the range of 8 or 12 bit, depend on the
                           { new offset must be valid: either in the range of 8 or 12 bit, depend on the
                             ldr postfix }
                             ldr postfix }
                           (((taicpu(p).opcode=A_ADD) and
                           (((taicpu(p).opcode=A_ADD) and
-                            (((taicpu(hp1).oppostfix=PF_None) and
+                            (((taicpu(hp1).oppostfix in [PF_None,PF_B]) and
                               (abs(taicpu(hp1).oper[1]^.ref^.offset+taicpu(p).oper[2]^.val)<4096)) or
                               (abs(taicpu(hp1).oper[1]^.ref^.offset+taicpu(p).oper[2]^.val)<4096)) or
                              (abs(taicpu(hp1).oper[1]^.ref^.offset+taicpu(p).oper[2]^.val)<256)
                              (abs(taicpu(hp1).oper[1]^.ref^.offset+taicpu(p).oper[2]^.val)<256)
                             )
                             )
                            ) or
                            ) or
                            ((taicpu(p).opcode=A_SUB) and
                            ((taicpu(p).opcode=A_SUB) and
-                             (((taicpu(hp1).oppostfix=PF_None) and
+                             (((taicpu(hp1).oppostfix in [PF_None,PF_B]) and
                                (abs(taicpu(hp1).oper[1]^.ref^.offset-taicpu(p).oper[2]^.val)<4096)) or
                                (abs(taicpu(hp1).oper[1]^.ref^.offset-taicpu(p).oper[2]^.val)<4096)) or
                               (abs(taicpu(hp1).oper[1]^.ref^.offset-taicpu(p).oper[2]^.val)<256)
                               (abs(taicpu(hp1).oper[1]^.ref^.offset-taicpu(p).oper[2]^.val)<256)
                              )
                              )