Explorar el Código

* fixed fpu type setting for avr

git-svn-id: trunk@10463 -
florian hace 17 años
padre
commit
48fb130be3
Se han modificado 3 ficheros con 17 adiciones y 9 borrados
  1. 4 3
      compiler/avr/cpuinfo.pas
  2. 5 1
      compiler/globals.pas
  3. 8 5
      rtl/inc/systemh.inc

+ 4 - 3
compiler/avr/cpuinfo.pas

@@ -1,7 +1,7 @@
 {
 {
-    Copyright (c) 1998-2002 by the Free Pascal development team
+    Copyright (c) 2008 by the Free Pascal development team
 
 
-    Basic Processor information for the ARM
+    Basic Processor information for the AVR
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
@@ -65,7 +65,8 @@ Const
      'AVR'
      'AVR'
    );
    );
 
 
-   fputypestr : array[tfputype] of string[6] = ('',
+   fputypestr : array[tfputype] of string[6] = (
+     'NONE',
      'SOFT',
      'SOFT',
      'LIBGCC'
      'LIBGCC'
    );
    );

+ 5 - 1
compiler/globals.pas

@@ -798,7 +798,7 @@ implementation
           FillChar(GUID,SizeOf(GUID),0);
           FillChar(GUID,SizeOf(GUID),0);
           string2guid:=true;
           string2guid:=true;
           end
           end
-        else  
+        else
           string2guid:=false;
           string2guid:=false;
       end;
       end;
 
 
@@ -1263,6 +1263,10 @@ implementation
         init_settings.cputype:=cpu_athlon64;
         init_settings.cputype:=cpu_athlon64;
         init_settings.fputype:=fpu_sse64;
         init_settings.fputype:=fpu_sse64;
 {$endif x86_64}
 {$endif x86_64}
+{$ifdef avr}
+        init_settings.cputype:=cpuinfo.cpu_avr;
+        init_settings.fputype:=fpu_none;
+{$endif avr}
         if init_settings.optimizecputype=cpu_none then
         if init_settings.optimizecputype=cpu_none then
           init_settings.optimizecputype:=init_settings.cputype;
           init_settings.optimizecputype:=init_settings.cputype;
 
 

+ 8 - 5
rtl/inc/systemh.inc

@@ -214,14 +214,17 @@ Type
 {$ifdef CPUAVR}
 {$ifdef CPUAVR}
   {$define DEFAULT_SINGLE}
   {$define DEFAULT_SINGLE}
 
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$define FPC_INCLUDE_SOFTWARE_MOD_DIV}
   {$define FPC_INCLUDE_SOFTWARE_MOD_DIV}
   {$define FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
   {$define FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
-  {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
 
 
-  ValReal = Real;
+  {$ifndef FPUNONE}
+    {$define SUPPORT_SINGLE}
+    {$define SUPPORT_DOUBLE}
+
+    {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
+
+    ValReal = Real;
+  {$endif}
 
 
   { map comp to int64, but this doesn't mean we compile the comp support in! }
   { map comp to int64, but this doesn't mean we compile the comp support in! }
   Comp = Int64;
   Comp = Int64;