Răsfoiți Sursa

* arm thumb: strh/ldrh does not allow stack pointer based references with offset

git-svn-id: trunk@24200 -
florian 12 ani în urmă
părinte
comite
e41b7b1b94
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      compiler/arm/cgcpu.pas

+ 1 - 1
compiler/arm/cgcpu.pas

@@ -1125,7 +1125,7 @@ unit cgcpu;
             (((oppostfix in [PF_SB,PF_SH]) and (ref.offset<>0)) or
              ((oppostfix=PF_None) and ((ref.offset<0) or ((ref.base<>NR_STACK_POINTER_REG) and (ref.offset>124)) or
                ((ref.base=NR_STACK_POINTER_REG) and (ref.offset>1020)) or ((ref.offset mod 4)<>0))) or
-             ((oppostfix=PF_H) and ((ref.offset<0) or (ref.offset>62) or ((ref.offset mod 2)<>0))) or
+             ((oppostfix=PF_H) and ((ref.offset<0) or (ref.offset>62) or ((ref.offset mod 2)<>0) or ((getsupreg(ref.base) in [RS_R8..RS_R15]) and (ref.offset<>0)))) or
              ((oppostfix=PF_B) and ((ref.offset<0) or (ref.offset>31) or ((getsupreg(ref.base) in [RS_R8..RS_R15]) and (ref.offset<>0))))
             )
            ) then