Browse Source

Make sure to change BLX instructions back to BL when the target is not a Thumb function.

git-svn-id: branches/laksen/armiw@29282 -
Jeppe Johansen 10 years ago
parent
commit
b4a4dda4e5
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/arm/cpuelf.pas

+ 5 - 0
compiler/arm/cpuelf.pas

@@ -674,6 +674,11 @@ implementation
                       address:=(address and $FE000000) or (((tmp-curloc) and 2) shl 23) or $F0000000
                       address:=(address and $FE000000) or (((tmp-curloc) and 2) shl 23) or $F0000000
                     else
                     else
                       InternalError(2014092001);
                       InternalError(2014092001);
+                  end
+                else if (address and $FF000000)=$FA000000 then
+                  begin
+                    { Change BLX to BL }
+                    address:=(address and $EA000000) or $01000000;
                   end;
                   end;
                 tmp:=tmp-curloc;
                 tmp:=tmp-curloc;
                 // TODO: check overflow
                 // TODO: check overflow