瀏覽代碼

* fix code for ARM FPA, just in case ...

florian 3 年之前
父節點
當前提交
5065e4ba50
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 1 1
      compiler/globals.pas
  2. 4 0
      tests/webtbs/tw39357.pp

+ 1 - 1
compiler/globals.pas

@@ -1112,7 +1112,7 @@ implementation
         p: pbyte;
         p: pbyte;
       begin
       begin
         p := pbyte(@r);
         p := pbyte(@r);
-{$ifdef CPU_ARM}
+{$ifdef FPUARM_HAS_FPA}
         inc(p,4);
         inc(p,4);
 {$else}
 {$else}
 {$ifdef FPC_LITTLE_ENDIAN}
 {$ifdef FPC_LITTLE_ENDIAN}

+ 4 - 0
tests/webtbs/tw39357.pp

@@ -6,8 +6,12 @@ function get_sign(d: double): Integer;
   begin
   begin
     get_sign:=1;
     get_sign:=1;
     p:=pbyte(@d);
     p:=pbyte(@d);
+{$ifdef FPUARM_HAS_FPA}
+    inc(p,4);
+{$else}
 {$ifdef FPC_LITTLE_ENDIAN}
 {$ifdef FPC_LITTLE_ENDIAN}
     inc(p,4);
     inc(p,4);
+{$endif}
 {$endif}
 {$endif}
     if (p^ and $80)=0 then
     if (p^ and $80)=0 then
       get_sign:=-1;
       get_sign:=-1;