Browse Source

Fix encoding of shifterops for ARM dataprocessing instructions.

git-svn-id: branches/laksen/armiw@29348 -
Jeppe Johansen 10 years ago
parent
commit
97fdfc942b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/arm/aasmcpu.pas

+ 1 - 1
compiler/arm/aasmcpu.pas

@@ -2558,7 +2558,7 @@ implementation
                 if (op+1<opercnt) and (oper[op+1]^.typ=top_shifterop) then
                 if (op+1<opercnt) and (oper[op+1]^.typ=top_shifterop) then
                   with oper[op+1]^.shifterop^ do
                   with oper[op+1]^.shifterop^ do
                     begin
                     begin
-                      bytes:=bytes or (shiftimm shl 7);
+                      bytes:=bytes or ((shiftimm and $1F) shl 7);
                       if shiftmode<>SM_RRX then
                       if shiftmode<>SM_RRX then
                         bytes:=bytes or (ord(shiftmode) - ord(SM_LSL)) shl 5
                         bytes:=bytes or (ord(shiftmode) - ord(SM_LSL)) shl 5
                       else
                       else