Browse Source

* jmp table code generation for case statement on sparc

florian 21 years ago
parent
commit
3a06b4f0fd
3 changed files with 29 additions and 15 deletions
  1. 5 2
      compiler/ncgset.pas
  2. 17 10
      compiler/sparc/cpunode.pas
  3. 7 3
      compiler/sparc/ncpuset.pas

+ 5 - 2
compiler/ncgset.pas

@@ -843,7 +843,7 @@ implementation
                    { optimize for size ? }
                    { optimize for size ? }
                    if cs_littlesize in aktglobalswitches  then
                    if cs_littlesize in aktglobalswitches  then
                      begin
                      begin
-                       if (has_jumptable) and
+                       if has_jumptable and
                           not((labels<=2) or
                           not((labels<=2) or
                               ((max_label-min_label)<0) or
                               ((max_label-min_label)<0) or
                               ((max_label-min_label)>3*labels)) then
                               ((max_label-min_label)>3*labels)) then
@@ -944,7 +944,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.68  2004-09-25 14:23:54  peter
+  Revision 1.69  2004-10-30 22:01:11  florian
+    * jmp table code generation for case statement on sparc
+
+  Revision 1.68  2004/09/25 14:23:54  peter
     * ungetregister is now only used for cpuregisters, renamed to
     * ungetregister is now only used for cpuregisters, renamed to
       ungetcpuregister
       ungetcpuregister
     * renamed (get|unget)explicitregister(s) to ..cpuregister
     * renamed (get|unget)explicitregister(s) to ..cpuregister

+ 17 - 10
compiler/sparc/cpunode.pas

@@ -20,22 +20,29 @@
 
 
  *****************************************************************************}
  *****************************************************************************}
 unit CpuNode;
 unit CpuNode;
-{$INCLUDE fpcdefs.inc}
+
+{$I fpcdefs.inc}
+
 interface
 interface
-{This unit is used to define the specific CPU implementations. All needed
+{ This unit is used to define the specific CPU implementations. All needed
 actions are included in the INITALIZATION part of these units. This explains
 actions are included in the INITALIZATION part of these units. This explains
-the behaviour of such a unit having just a USES clause!}
+the behaviour of such a unit having just a USES clause! }
+
 implementation
 implementation
-uses
-  ncgbas,ncgflw,ncgcnv,ncgld,ncgmem,ncgcon,
-  ncpuadd,ncpucall,ncpumat,
-  ncgset,ncpuinln,ncpucnv,ncpuobj,
-  { this not really a node }
-  rgcpu;
+
+  uses
+    ncgbas,ncgflw,ncgcnv,ncgld,ncgmem,ncgcon,ncgset,
+    ncpuadd,ncpucall,ncpumat,ncpuinln,ncpucnv,ncpuobj,ncpuset,
+    { this not really a node }
+    rgcpu;
+
 end.
 end.
 {
 {
     $Log$
     $Log$
-    Revision 1.10  2004-06-20 08:55:32  florian
+    Revision 1.11  2004-10-30 22:01:11  florian
+      * jmp table code generation for case statement on sparc
+
+    Revision 1.10  2004/06/20 08:55:32  florian
       * logs truncated
       * logs truncated
 
 
     Revision 1.9  2004/06/16 20:07:10  florian
     Revision 1.9  2004/06/16 20:07:10  florian

+ 7 - 3
compiler/sparc/ncpuset.pas

@@ -124,10 +124,14 @@ unit ncpuset;
 
 
 
 
 
 
-
+begin
+  ccasenode:=tcpucasenode;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  2004-10-30 17:50:53  florian
+  Revision 1.2  2004-10-30 22:01:11  florian
+    * jmp table code generation for case statement on sparc
+
+  Revision 1.1  2004/10/30 17:50:53  florian
     * initial revision, not yet enabled
     * initial revision, not yet enabled
-}
+}