瀏覽代碼

* fixed handling of doubles in a native arm compiler
* fixed handling of typed double constants on arm

florian 21 年之前
父節點
當前提交
0b0c4a4062
共有 3 個文件被更改,包括 31 次插入5 次删除
  1. 8 1
      compiler/aggas.pas
  2. 11 2
      compiler/ptconst.pas
  3. 12 2
      compiler/rautils.pas

+ 8 - 1
compiler/aggas.pas

@@ -534,6 +534,8 @@ var
                  swap64bitarray(t64bitarray(d));
                  swap64bitarray(t64bitarray(d));
                AsmWrite(#9'.byte'#9);
                AsmWrite(#9'.byte'#9);
 {$ifdef arm}
 {$ifdef arm}
+{ on a real arm cpu, it's already hi/lo swapped }
+{$ifndef cpuarm}
                if tai_real_64bit(hp).formatoptions=fo_hiloswapped then
                if tai_real_64bit(hp).formatoptions=fo_hiloswapped then
                  begin
                  begin
                    for i:=4 to 7 do
                    for i:=4 to 7 do
@@ -549,6 +551,7 @@ var
                      end;
                      end;
                  end
                  end
                else
                else
+{$endif cpuarm}
 {$endif arm}
 {$endif arm}
                  begin
                  begin
                    for i:=0 to 7 do
                    for i:=0 to 7 do
@@ -879,7 +882,11 @@ var
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.47  2004-03-02 17:32:12  florian
+  Revision 1.48  2004-03-17 22:27:41  florian
+    * fixed handling of doubles in a native arm compiler
+    * fixed handling of typed double constants on arm
+
+  Revision 1.47  2004/03/02 17:32:12  florian
     * make cycle fixed
     * make cycle fixed
     + pic support for darwin
     + pic support for darwin
     + support of importing vars from shared libs on darwin implemented
     + support of importing vars from shared libs on darwin implemented

+ 11 - 2
compiler/ptconst.pas

@@ -230,7 +230,12 @@ implementation
                  s32real :
                  s32real :
                    curconstSegment.concat(Tai_real_32bit.Create(ts32real(value)));
                    curconstSegment.concat(Tai_real_32bit.Create(ts32real(value)));
                  s64real :
                  s64real :
-                   curconstSegment.concat(Tai_real_64bit.Create(ts64real(value)));
+{$ifdef ARM}
+                   if aktfputype in [fpu_fpa,fpu_fpa10,fpu_fpa11] then
+                     curconstSegment.concat(Tai_real_64bit.Create_hiloswapped(ts64real(value)))
+                   else
+{$endif ARM}
+                     curconstSegment.concat(Tai_real_64bit.Create(ts64real(value)));
                  s80real :
                  s80real :
                    curconstSegment.concat(Tai_real_80bit.Create(value));
                    curconstSegment.concat(Tai_real_80bit.Create(value));
 
 
@@ -1020,7 +1025,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.80  2004-03-02 00:36:33  olle
+  Revision 1.81  2004-03-17 22:27:41  florian
+    * fixed handling of doubles in a native arm compiler
+    * fixed handling of typed double constants on arm
+
+  Revision 1.80  2004/03/02 00:36:33  olle
     * big transformation of Tai_[const_]Symbol.Create[data]name*
     * big transformation of Tai_[const_]Symbol.Create[data]name*
 
 
   Revision 1.79  2004/02/26 16:15:23  peter
   Revision 1.79  2004/02/26 16:15:23  peter

+ 12 - 2
compiler/rautils.pas

@@ -1557,7 +1557,13 @@ end;
     Begin
     Begin
        case real_typ of
        case real_typ of
           s32real : p.concat(Tai_real_32bit.Create(value));
           s32real : p.concat(Tai_real_32bit.Create(value));
-          s64real : p.concat(Tai_real_64bit.Create(value));
+          s64real :
+{$ifdef ARM}
+           if aktfputype in [fpu_fpa,fpu_fpa10,fpu_fpa11] then
+             p.concat(Tai_real_64bit.Create_hiloswapped(value))
+           else
+{$endif ARM}
+             p.concat(Tai_real_64bit.Create(value));
           s80real : p.concat(Tai_real_80bit.Create(value));
           s80real : p.concat(Tai_real_80bit.Create(value));
           s64comp : p.concat(Tai_comp_64bit.Create(trunc(value)));
           s64comp : p.concat(Tai_comp_64bit.Create(trunc(value)));
        end;
        end;
@@ -1626,7 +1632,11 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.82  2004-03-02 00:36:33  olle
+  Revision 1.83  2004-03-17 22:27:41  florian
+    * fixed handling of doubles in a native arm compiler
+    * fixed handling of typed double constants on arm
+
+  Revision 1.82  2004/03/02 00:36:33  olle
     * big transformation of Tai_[const_]Symbol.Create[data]name*
     * big transformation of Tai_[const_]Symbol.Create[data]name*
 
 
   Revision 1.81  2004/02/21 21:04:09  daniel
   Revision 1.81  2004/02/21 21:04:09  daniel