From 3f18d8543495b8b8cb46465c8ca97d95865dce69 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 31 Aug 2014 15:01:55 +0000 Subject: [PATCH] * create a thumb_func directive before .globl directives in assembler to prevent accidental changes of asm mode git-svn-id: trunk@28556 - --- compiler/aggas.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/aggas.pas b/compiler/aggas.pas index 415122cd74..9586deff42 100644 --- a/compiler/aggas.pas +++ b/compiler/aggas.pas @@ -1244,6 +1244,11 @@ implementation end; if tai_label(hp).labsym.bind in [AB_GLOBAL,AB_PRIVATE_EXTERN] then begin +{$ifdef arm} + { do no change arm mode accidently, .globl seems to reset the mode } + if GenerateThumbCode or GenerateThumb2Code then + AsmWriteln(#9'.thumb_func'#9); +{$endif arm} AsmWrite('.globl'#9); if replaceforbidden then AsmWriteLn(ReplaceForbiddenAsmSymbolChars(tai_label(hp).labsym.name))