瀏覽代碼

Fix cross-compiler with soft 80bit with external assembler

git-svn-id: trunk@37306 -
pierre 8 年之前
父節點
當前提交
8614a38ad3
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      compiler/assemble.pas

+ 12 - 0
compiler/assemble.pas

@@ -1068,6 +1068,18 @@ Implementation
               { can't write full 80 bit floating point constants yet on non-x86 }
               aitrealconst_s80bit:
                 writer.AsmWriteLn(asminfo^.comment+'value: '+extended2str(tai_realconst(hp).value.s80val));
+{$else}
+{$ifdef FPC_SOFT_FPUX80}
+             aitrealconst_s80bit:
+	    begin
+	      if sizeof(tai_realconst(hp).value.s80val) = sizeof(double) then
+                writer.AsmWriteLn(asminfo^.comment+'value: '+double2str(tai_realconst(hp).value.s80val))
+	      else if sizeof(tai_realconst(hp).value.s80val) = sizeof(single) then
+                writer.AsmWriteLn(asminfo^.comment+'value: '+single2str(tai_realconst(hp).value.s80val))
+	      else
+		internalerror(2017091901);
+	    end;
+{$endif}
 {$endif cpuextended}
               aitrealconst_s64comp:
                 writer.AsmWriteLn(asminfo^.comment+'value: '+extended2str(tai_realconst(hp).value.s64compval));