瀏覽代碼

* fixed writing of double constants on WinCE

git-svn-id: trunk@5416 -
florian 18 年之前
父節點
當前提交
fbc197f27a
共有 4 個文件被更改,包括 8 次插入4 次删除
  1. 2 1
      compiler/arm/narmcon.pas
  2. 2 1
      compiler/ncgcon.pas
  3. 2 1
      compiler/ptconst.pas
  4. 2 1
      compiler/rautils.pas

+ 2 - 1
compiler/arm/narmcon.pas

@@ -66,7 +66,8 @@ interface
         location_reset(location,LOC_CREFERENCE,def_cgsize(resultdef));
         lastlabel:=nil;
         realait:=floattype2ait[tfloatdef(resultdef).floattype];
-        hiloswapped:=current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11];
+        hiloswapped:=(current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and
+          not(cs_fp_emulation in current_settings.moduleswitches);;
         { const already used ? }
         if not assigned(lab_real) then
           begin

+ 2 - 1
compiler/ncgcon.pas

@@ -122,7 +122,8 @@ implementation
         lastlabel:=nil;
         realait:=floattype2ait[tfloatdef(resultdef).floattype];
 {$ifdef ARM}
-        hiloswapped:=current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11];
+        hiloswapped:=(current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and
+          not(cs_fp_emulation in current_settings.moduleswitches);
 {$endif ARM}
         { const already used ? }
         if not assigned(lab_real) then

+ 2 - 1
compiler/ptconst.pas

@@ -163,7 +163,8 @@ implementation
                list.concat(Tai_real_32bit.Create(ts32real(value)));
              s64real :
 {$ifdef ARM}
-               if current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11] then
+               if (current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and
+                 not(cs_fp_emulation in current_settings.moduleswitches) then
                  list.concat(Tai_real_64bit.Create_hiloswapped(ts64real(value)))
                else
 {$endif ARM}

+ 2 - 1
compiler/rautils.pas

@@ -1482,7 +1482,8 @@ end;
           s32real : p.concat(Tai_real_32bit.Create(value));
           s64real :
 {$ifdef ARM}
-           if current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11] then
+           if (current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and
+             not(cs_fp_emulation in current_settings.moduleswitches) then
              p.concat(Tai_real_64bit.Create_hiloswapped(value))
            else
 {$endif ARM}