Browse Source

* fixed fpu type setting for avr

git-svn-id: trunk@10463 -
florian 17 years ago
parent
commit
48fb130be3
3 changed files with 17 additions and 9 deletions
  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,
     for details about the copyright.
@@ -65,7 +65,8 @@ Const
      'AVR'
    );
 
-   fputypestr : array[tfputype] of string[6] = ('',
+   fputypestr : array[tfputype] of string[6] = (
+     'NONE',
      'SOFT',
      'LIBGCC'
    );

+ 5 - 1
compiler/globals.pas

@@ -798,7 +798,7 @@ implementation
           FillChar(GUID,SizeOf(GUID),0);
           string2guid:=true;
           end
-        else  
+        else
           string2guid:=false;
       end;
 
@@ -1263,6 +1263,10 @@ implementation
         init_settings.cputype:=cpu_athlon64;
         init_settings.fputype:=fpu_sse64;
 {$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
           init_settings.optimizecputype:=init_settings.cputype;
 

+ 8 - 5
rtl/inc/systemh.inc

@@ -214,14 +214,17 @@ Type
 {$ifdef CPUAVR}
   {$define DEFAULT_SINGLE}
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$define FPC_INCLUDE_SOFTWARE_MOD_DIV}
   {$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! }
   Comp = Int64;