Ver Fonte

+ avr processor type information

git-svn-id: branches/avr@17051 -
florian há 14 anos atrás
pai
commit
a178f34ab3
2 ficheiros alterados com 49 adições e 4 exclusões
  1. 47 2
      compiler/avr/cpuinfo.pas
  2. 2 2
      compiler/globals.pas

+ 47 - 2
compiler/avr/cpuinfo.pas

@@ -32,8 +32,30 @@ Type
    { possible supported processors for this target }
    tcputype =
       (cpu_none,
-       cpu_avr
+       cpu_avr1,
+       cpu_avr2,
+       cpu_avr25,
+       cpu_avr3,
+       cpu_avr31,
+       cpu_avr35,
+       cpu_avr4,
+       cpu_avr5,
+       cpu_avr51,
+       cpu_avr6
       );
+
+   tcpuflags =
+      (AVR_HAVE_JMP_CALL,
+       AVR_HAVE_MOVW,
+       AVR_HAVE_LPMX,
+       AVR_HAVE_MUL,
+       AVR_HAVE_RAMPZ,
+       AVR_HAVE_ELPM,
+       AVR_HAVE_ELPMX,
+       AVR_2_BYTE_PC,
+       AVR_3_BYTE_PC
+      );
+
    tfputype =
      (fpu_none,
       fpu_soft,
@@ -72,7 +94,16 @@ Const
    ];
 
    cputypestr : array[tcputype] of string[5] = ('',
-     'AVR'
+     'AVR1',
+     'AVR2',
+     'AVR25',
+     'AVR3',
+     'AVR31',
+     'AVR35',
+     'AVR4',
+     'AVR5',
+     'AVR51',
+     'AVR6'
    );
 
    fputypestr : array[tfputype] of string[6] = (
@@ -112,6 +143,20 @@ Const
      [cs_opt_regvar,cs_opt_stackframe,cs_opt_tailrecursion];
    level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
 
+   cpu_capabilities : array[tcputype] of set of tcpuflags =
+     ( { cpu_none } [],
+       { cpu_avr1 } [],
+       { cpu_avr2 } [],
+       { cpu_avr25 } [],
+       { cpu_avr3 } [],
+       { cpu_avr31 } [],
+       { cpu_avr35 } [],
+       { cpu_avr4 } [],
+       { cpu_avr5 } [],
+       { cpu_avr51 } [],
+       { cpu_avr6 } []
+     );
+
 Implementation
 
 end.

+ 2 - 2
compiler/globals.pas

@@ -399,8 +399,8 @@ interface
         fputype : fpu_sse64;
 {$endif x86_64}
 {$ifdef avr}
-        cputype : cpuinfo.cpu_avr;
-        optimizecputype : cpuinfo.cpu_avr;
+        cputype : cpuinfo.cpu_avr5;
+        optimizecputype : cpuinfo.cpu_avr5;
         fputype : fpu_none;
 {$endif avr}
 {$ifdef mips}