diff --git a/compiler/llvm/agllvm.pas b/compiler/llvm/agllvm.pas index 6fa6850dc5..313f91976e 100644 --- a/compiler/llvm/agllvm.pas +++ b/compiler/llvm/agllvm.pas @@ -1024,6 +1024,8 @@ implementation writer.AsmWrite(' "thunk"'); if llvmflag_null_pointer_valid in llvmversion_properties[current_settings.llvmversion] then writer.AsmWrite(' "null-pointer-is-valid"="true"'); + if not(pio_fastmath in pd.implprocoptions) then + writer.AsmWrite(' strictfp'); end; diff --git a/compiler/symconst.pas b/compiler/symconst.pas index cb4125ef74..130fda9049 100644 --- a/compiler/symconst.pas +++ b/compiler/symconst.pas @@ -440,7 +440,9 @@ type { a nested routine accesses a local variable from this routine } pio_nested_access, { a stub/thunk } - pio_thunk + pio_thunk, + { compiled with fastmath enabled } + pio_fastmath ); timplprocoptions = set of timplprocoption; diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 766468ab9e..50e15efbd8 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -6015,6 +6015,8 @@ implementation import_nr:=0; inlininginfo:=nil; deprecatedmsg:=nil; + if cs_opt_fastmath in current_settings.optimizerswitches then + include(implprocoptions, pio_fastmath); end; diff --git a/compiler/utils/ppuutils/ppudump.pp b/compiler/utils/ppuutils/ppudump.pp index 3a188f2885..916592f5ee 100644 --- a/compiler/utils/ppuutils/ppudump.pp +++ b/compiler/utils/ppuutils/ppudump.pp @@ -3215,7 +3215,8 @@ const (mask:pio_has_inlininginfo; str:'HasInliningInfo'), (mask:pio_inline_not_possible; str:'InlineNotPossible'), (mask:pio_nested_access; str:'NestedAccess'), - (mask:pio_thunk; str:'Thunk') + (mask:pio_thunk; str:'Thunk'), + (mask:pio_fastmath; str:'FastMath') ); var i: timplprocoption;