From b4a4dda4e5e4bc3af56f4bfe4fe99427e6cb580a Mon Sep 17 00:00:00 2001 From: Jeppe Johansen Date: Sat, 13 Dec 2014 18:18:51 +0000 Subject: [PATCH] Make sure to change BLX instructions back to BL when the target is not a Thumb function. git-svn-id: branches/laksen/armiw@29282 - --- compiler/arm/cpuelf.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/arm/cpuelf.pas b/compiler/arm/cpuelf.pas index b6e25584e2..3909850603 100644 --- a/compiler/arm/cpuelf.pas +++ b/compiler/arm/cpuelf.pas @@ -674,6 +674,11 @@ implementation address:=(address and $FE000000) or (((tmp-curloc) and 2) shl 23) or $F0000000 else InternalError(2014092001); + end + else if (address and $FF000000)=$FA000000 then + begin + { Change BLX to BL } + address:=(address and $EA000000) or $01000000; end; tmp:=tmp-curloc; // TODO: check overflow