summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-24 14:06:36 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-24 14:06:36 +0000
commit0b3d548d3cbea0b5145e02fccdb7e4be3da6e2f0 (patch)
tree7877cdb4afe5f959690782856ad59a351244fec5
parentec2bca61ec83873beb28eb2f0df6bc00da70c0a8 (diff)
downloadfpc-0b3d548d3cbea0b5145e02fccdb7e4be3da6e2f0.tar.gz
* fpsr and fpcr are 64 bit on aarch64
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49257 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--rtl/aarch64/mathu.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/rtl/aarch64/mathu.inc b/rtl/aarch64/mathu.inc
index f55471e963..5e1235171c 100644
--- a/rtl/aarch64/mathu.inc
+++ b/rtl/aarch64/mathu.inc
@@ -14,25 +14,25 @@
{$asmmode gas}
-function getfpcr: dword; nostackframe; assembler;
+function getfpcr: qword; nostackframe; assembler;
asm
mrs x0,fpcr
end;
-procedure setfpcr(val: dword); nostackframe; assembler;
+procedure setfpcr(val: qword); nostackframe; assembler;
asm
msr fpcr,x0
end;
-function getfpsr: dword; nostackframe; assembler;
+function getfpsr: qword; nostackframe; assembler;
asm
mrs x0,fpsr
end;
-procedure setfpsr(val: dword); nostackframe; assembler;
+procedure setfpsr(val: qword); nostackframe; assembler;
asm
msr fpsr, x0
end;
@@ -75,7 +75,7 @@ const
fpu_ufe = 1 shl 11;
fpu_ixe = 1 shl 12;
fpu_ide = 1 shl 15;
- fpu_exception_mask = fpu_ioe or fpu_dze or fpu_ofe or fpu_ufe or fpu_ixe or fpu_ide;
+ fpu_exception_mask = qword(fpu_ioe or fpu_dze or fpu_ofe or fpu_ufe or fpu_ixe or fpu_ide);
fpu_exception_mask_to_status_mask_shift = 8;
@@ -111,13 +111,13 @@ function GetExceptionMask: TFPUExceptionMask;
function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
var
- newfpcr: dword;
+ newfpcr: qword;
begin
{ clear "exception happened" flags }
ClearExceptions(false);
softfloat_exception_mask:=mask;
- { at least the ThunderX AArch64 support apperently hardware exceptions,
+ { at least the ThunderX AArch64 support apparently hardware exceptions,
so set fpcr correctly, thought it might be WI on most implementations it does not hurt
}
newfpcr:=fpu_exception_mask;
@@ -143,7 +143,7 @@ function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
procedure ClearExceptions(RaisePending: Boolean);
var
- fpsr: dword;
+ fpsr: qword;
f: TFPUException;
begin
fpsr:=getfpsr;