From 8cacfc3355fc5c82aaabcc191ae368b282d3d51c Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Sat, 28 Sep 2024 13:13:18 +0200 Subject: [PATCH] Fix display of 80bit floats in cross-endian case --- compiler/utils/ppuutils/ppudump.pp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler/utils/ppuutils/ppudump.pp b/compiler/utils/ppuutils/ppudump.pp index 5fbdbab00e..511a14a924 100644 --- a/compiler/utils/ppuutils/ppudump.pp +++ b/compiler/utils/ppuutils/ppudump.pp @@ -537,12 +537,6 @@ const e_qw, mantval : qword; e_w : word; begin - if ppufile.change_endian then - begin - for i:=0 to 9 do - new.bytes[i]:=e.bytes[9-i]; - e:=new; - end; if sizeof(ext)=10 then begin ext:=pextended(@e)^; @@ -560,6 +554,11 @@ const e_w:=pword(@(e.bytes[8]))^; e_qw:=pqword(@(e.bytes[0]))^; end; + if ppufile.change_endian then + begin + e_w:=swapendian(e_w); + e_qw:=swapendian(e_qw); + end; sign := (e_w and $8000) <> 0; expMaximal := (e_w and $7fff) = 32767; exp:=(e_w and $7fff) - 16383 - 63;