* record whether a function uses fastmath, and define the function as

strictfp if it doesn't (so LLVM doesn't perform transformations that can
    change the fp/exception behaviour)

git-svn-id: trunk@43818 -
This commit is contained in:
Jonas Maebe 2019-12-30 15:05:06 +00:00
parent 67dbd0cdb3
commit b355ba3d39
4 changed files with 9 additions and 2 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;