From 80553119b54a5944d9c6ff7a86f885190c1dc960 Mon Sep 17 00:00:00 2001 From: pierre Date: Sun, 2 Aug 2020 09:02:10 +0000 Subject: [PATCH] Merge cs_check_fpu_exception part of commit 39813 Adapt ppudump to added entry to tlocalswitch enum type. git-svn-id: branches/fixes_3_2@45984 - --- compiler/globtype.pas | 2 +- compiler/options.pas | 5 +++++ compiler/scandir.pas | 7 +++++++ compiler/utils/ppuutils/ppudump.pp | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/compiler/globtype.pas b/compiler/globtype.pas index 030afb4ade..7613fa72da 100644 --- a/compiler/globtype.pas +++ b/compiler/globtype.pas @@ -156,7 +156,7 @@ interface cs_full_boolean_eval,cs_typed_const_writable,cs_allow_enum_calc, cs_do_inline,cs_fpu_fwait,cs_ieee_errors, cs_check_low_addr_load,cs_imported_data, - cs_excessprecision, + cs_excessprecision,cs_check_fpu_exceptions, { mmx } cs_mmx,cs_mmx_saturation, { parser } diff --git a/compiler/options.pas b/compiler/options.pas index 2cc366703c..eabd42b84a 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -1191,6 +1191,11 @@ begin include(init_settings.moduleswitches,cs_fp_emulation); end; {$endif cpufpemu} + 'E' : + If UnsetBool(More, j, opt, false) then + exclude(init_settings.localswitches,cs_check_fpu_exceptions) + Else + include(init_settings.localswitches,cs_check_fpu_exceptions); 'f' : begin s:=upper(copy(more,j+1,length(more)-j)); diff --git a/compiler/scandir.pas b/compiler/scandir.pas index 811e8edd74..9516a50a54 100644 --- a/compiler/scandir.pas +++ b/compiler/scandir.pas @@ -436,6 +436,12 @@ unit scandir; end; + procedure dir_checkfpuexceptions; + begin + do_localswitch(cs_check_fpu_exceptions); + end; + + procedure dir_objectchecks; begin do_localswitch(cs_check_object); @@ -1907,6 +1913,7 @@ unit scandir; AddDirective('BOOLEVAL',directive_all, @dir_booleval); AddDirective('BITPACKING',directive_all, @dir_bitpacking); AddDirective('CALLING',directive_all, @dir_calling); + AddDirective('CHECKFPUEXCEPTIONS',directive_all, @dir_checkfpuexceptions); AddDirective('CHECKLOWADDRLOADS',directive_all, @dir_checklowaddrloads); AddDirective('CHECKPOINTER',directive_all, @dir_checkpointer); AddDirective('CODEALIGN',directive_all, @dir_codealign); diff --git a/compiler/utils/ppuutils/ppudump.pp b/compiler/utils/ppuutils/ppudump.pp index 6f4c9f0bfd..0c6c94ecc8 100644 --- a/compiler/utils/ppuutils/ppudump.pp +++ b/compiler/utils/ppuutils/ppudump.pp @@ -2211,7 +2211,7 @@ const 'Check low address loading', {cs_check_low_addr_load} 'Imported data', {cs_imported_data} 'Excess precision', {cs_excessprecision} - // 'Check fpu exceptions', {cs_check_fpu_exceptions} {not yet merged} + 'Check fpu exceptions', {cs_check_fpu_exceptions} // 'Check all case coverage', {cs_check_all_case_coverage} {not yet merged} { mmx } 'Allow MMX instructions', {cs_mmx}