diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-12-11 15:40:07 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-12-11 15:40:07 +0000 |
commit | f47d6c2b80865013c1d457ca7060298a475fb2b5 (patch) | |
tree | 645e029b76633b37232c2531310109056b1df198 /rtl | |
parent | 313bee9c30fc90d4208dfdddb3f877ba025a439c (diff) | |
download | fpc-f47d6c2b80865013c1d457ca7060298a475fb2b5.tar.gz |
--- Merging r46880 into '.':
U rtl/aarch64/mathu.inc
--- Recording mergeinfo for merge of r46880 into '.':
U .
--- Merging r40512 into '.':
A tests/webtbs/tw33607.pp
--- Recording mergeinfo for merge of r40512 into '.':
G .
--- Merging r42961 into '.':
U compiler/aarch64/aasmcpu.pas
--- Recording mergeinfo for merge of r42961 into '.':
G .
--- Merging r44932 into '.':
G compiler/aarch64/aasmcpu.pas
--- Recording mergeinfo for merge of r44932 into '.':
G .
--- Merging r44933 into '.':
U compiler/aarch64/racpugas.pas
--- Recording mergeinfo for merge of r44933 into '.':
G .
--- Merging r44998 into '.':
U compiler/aarch64/racpu.pas
--- Recording mergeinfo for merge of r44998 into '.':
G .
--- Merging r45667 into '.':
G compiler/aarch64/racpugas.pas
U compiler/rautils.pas
A tests/webtbs/tw37218.pp
--- Recording mergeinfo for merge of r45667 into '.':
G .
--- Merging r45814 into '.':
U compiler/aarch64/rgcpu.pas
A tests/webtbs/tw37393.pp
--- Recording mergeinfo for merge of r45814 into '.':
G .
--- Merging r46690 into '.':
G compiler/aarch64/aasmcpu.pas
--- Recording mergeinfo for merge of r46690 into '.':
G .
--- Merging r46871 into '.':
U compiler/aarch64/cgcpu.pas
--- Recording mergeinfo for merge of r46871 into '.':
G .
git-svn-id: https://svn.freepascal.org/svn/fpc/branches/fixes_3_2@47756 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl')
-rw-r--r-- | rtl/aarch64/mathu.inc | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/rtl/aarch64/mathu.inc b/rtl/aarch64/mathu.inc index 7481703372..469bb49eca 100644 --- a/rtl/aarch64/mathu.inc +++ b/rtl/aarch64/mathu.inc @@ -103,21 +103,23 @@ function GetExceptionMask: TFPUExceptionMask; if ((fpcr and fpu_ide)=0) then result := result+[exDenormalized]; } + { as the fpcr flags might be RAZ, the softfloat exception mask + is considered as the authoritative mask } result:=softfloat_exception_mask; end; function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask; - { var newfpcr: dword; - } begin - { as I am not aware of any hardware exception supporting AArch64 implementation, - and else the trapping enable flags are RAZ, work solely with softfloat_exception_mask (FK) - } + { clear "exception happened" flags } + ClearExceptions(false); softfloat_exception_mask:=mask; - { + + { at least the ThunderX AArch64 support apperently hardware exceptions, + so set fpcr correctly, thought it might be WI on most implementations it does not hurt + } newfpcr:=fpu_exception_mask; if exInvalidOp in Mask then newfpcr:=newfpcr and not(fpu_ioe); @@ -131,14 +133,10 @@ function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask; newfpcr:=newfpcr and not(fpu_ixe); if exDenormalized in Mask then newfpcr:=newfpcr and not(fpu_ide); - } - { clear "exception happened" flags } - ClearExceptions(false); - { set new exception mask } -// setfpcr((getfpcr and not(fpu_exception_mask)) or newfpcr); - { unsupported mask bits will remain 0 -> read exception mask again } -// result:=GetExceptionMask; -// softfloat_exception_mask:=result; + setfpcr((getfpcr and not(fpu_exception_mask)) or newfpcr); + + { as the fpcr flags might be RAZ, the softfloat exception mask + is considered as the authoritative mask } result:=softfloat_exception_mask; end; |