Browse Source

Fix display of 80bit floats in cross-endian case

Pierre Muller 10 months ago
parent
commit
8cacfc3355
1 changed files with 5 additions and 6 deletions
  1. 5 6
      compiler/utils/ppuutils/ppudump.pp

+ 5 - 6
compiler/utils/ppuutils/ppudump.pp

@@ -537,12 +537,6 @@ const
     e_qw, mantval : qword;
     e_qw, mantval : qword;
     e_w : word;
     e_w : word;
   begin
   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
     if sizeof(ext)=10 then
       begin
       begin
         ext:=pextended(@e)^;
         ext:=pextended(@e)^;
@@ -560,6 +554,11 @@ const
         e_w:=pword(@(e.bytes[8]))^;
         e_w:=pword(@(e.bytes[8]))^;
         e_qw:=pqword(@(e.bytes[0]))^;
         e_qw:=pqword(@(e.bytes[0]))^;
       end;
       end;
+    if ppufile.change_endian then
+      begin
+        e_w:=swapendian(e_w);
+        e_qw:=swapendian(e_qw);
+      end;
     sign := (e_w and $8000) <> 0;
     sign := (e_w and $8000) <> 0;
     expMaximal := (e_w and $7fff) = 32767;
     expMaximal := (e_w and $7fff) = 32767;
     exp:=(e_w and $7fff) - 16383 - 63;
     exp:=(e_w and $7fff) - 16383 - 63;