浏览代码

--- Merging r19312 into '.':
U rtl/solaris/system.pp
U rtl/linux/system.pp
U compiler/sparc/ncpucnv.pas
U compiler/arm/rgcpu.pas
U .

git-svn-id: tags/release_2_6_0_rc1@19313 -

marco 14 年之前
父节点
当前提交
fb5cb6fb1d
共有 4 个文件被更改,包括 56 次插入16 次删除
  1. 23 0
      compiler/arm/rgcpu.pas
  2. 1 12
      compiler/sparc/ncpucnv.pas
  3. 4 4
      rtl/linux/system.pp
  4. 28 0
      rtl/solaris/system.pp

+ 23 - 0
compiler/arm/rgcpu.pas

@@ -62,6 +62,8 @@ unit rgcpu;
       procinfo;
 
     procedure trgintcputhumb2.add_cpu_interferences(p: tai);
+      var
+        r : tregister;
       begin
         if p.typ=ait_instruction then
           begin
@@ -95,6 +97,27 @@ unit rgcpu;
                         end;
                     end;
                 end;
+              A_LDRB,
+              A_STRB,
+              A_STR,
+              A_LDR,
+              A_LDRH,
+              A_STRH,
+              A_LDRSB,
+              A_LDRSH,
+              A_LDRD,
+              A_STRD:
+                { don't mix up the framepointer and stackpointer with pre/post indexed operations }
+                if (taicpu(p).oper[1]^.typ=top_ref) and
+                  (taicpu(p).oper[1]^.ref^.addressmode in [AM_PREINDEXED,AM_POSTINDEXED]) then
+                  begin
+                    add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),getsupreg(current_procinfo.framepointer));
+                    { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
+                    {        while compiling the compiler. }
+                    r:=NR_STACK_POINTER_REG;
+                    if current_procinfo.framepointer<>r then
+                      add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),getsupreg(r));
+                  end;
             end;
           end;
       end;

+ 1 - 12
compiler/sparc/ncpucnv.pas

@@ -77,18 +77,7 @@ implementation
         if is_64bitint(left.resultdef) or
           is_currency(left.resultdef) then
           begin
-            { hack to avoid double division by 10000, as it's
-              already done by typecheckpass.resultdef_int_to_real }
-            if is_currency(left.resultdef) then
-              left.resultdef := s64inttype;
-            if is_signed(left.resultdef) then
-              fname := 'fpc_int64_to_double'
-            else
-              fname := 'fpc_qword_to_double';
-            result := ccallnode.createintern(fname,ccallparanode.create(
-              left,nil));
-            left:=nil;
-            firstpass(result);
+            result:=inherited first_int_to_real;
             exit;
           end
         else

+ 4 - 4
rtl/linux/system.pp

@@ -36,13 +36,13 @@ Unit System;
 function get_cmdline:Pchar; 
 property cmdline:Pchar read get_cmdline;
 
-{$if defined(CPUARM) or defined(CPUM68K)}
+{$if defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
 
 {$define fpc_softfpu_interface}
 {$i softfpu.pp}
 {$undef fpc_softfpu_interface}
 
-{$endif defined(CPUARM) or defined(CPUM68K)}
+{$endif defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
 
 {*****************************************************************************}
                                  implementation
@@ -55,7 +55,7 @@ var
 
 const calculated_cmdline:Pchar=nil;
 
-{$if defined(CPUARM) or defined(CPUM68K)}
+{$if defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
 
 {$define fpc_softfpu_implementation}
 {$i softfpu.pp}
@@ -73,7 +73,7 @@ const calculated_cmdline:Pchar=nil;
 {$define FPC_SYSTEM_HAS_extractFloat32Exp}
 {$define FPC_SYSTEM_HAS_extractFloat32Sign}
 
-{$endif defined(CPUARM) or defined(CPUM68K)}
+{$endif defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
 
 {$I system.inc}
 

+ 28 - 0
rtl/solaris/system.pp

@@ -28,9 +28,37 @@ var argc:longint;
     argv:PPchar;
     envp:PPchar;
 
+{$if defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
+
+{$define fpc_softfpu_interface}
+{$i softfpu.pp}
+{$undef fpc_softfpu_interface}
+
+{$endif defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
 
 implementation
 
+
+{$if defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
+
+{$define fpc_softfpu_implementation}
+{$i softfpu.pp}
+{$undef fpc_softfpu_implementation}
+
+{ we get these functions and types from the softfpu code }
+{$define FPC_SYSTEM_HAS_float64}
+{$define FPC_SYSTEM_HAS_float32}
+{$define FPC_SYSTEM_HAS_flag}
+{$define FPC_SYSTEM_HAS_extractFloat64Frac0}
+{$define FPC_SYSTEM_HAS_extractFloat64Frac1}
+{$define FPC_SYSTEM_HAS_extractFloat64Exp}
+{$define FPC_SYSTEM_HAS_extractFloat64Sign}
+{$define FPC_SYSTEM_HAS_ExtractFloat32Frac}
+{$define FPC_SYSTEM_HAS_extractFloat32Exp}
+{$define FPC_SYSTEM_HAS_extractFloat32Sign}
+
+{$endif defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
+
 { OS independant parts}
 
 {$I system.inc}