Prechádzať zdrojové kódy

* sorted MIPS defines

florian 3 rokov pred
rodič
commit
ed2b73eee6
2 zmenil súbory, kde vykonal 34 pridanie a 16 odobranie
  1. 1 2
      compiler/fpcdefs.inc
  2. 33 14
      compiler/options.pas

+ 1 - 2
compiler/fpcdefs.inc

@@ -275,12 +275,11 @@
 
 {$ifdef mips64}
   {$define mips}
-  {$define mipseb}
+  {$define mips64}
 {$endif mips64}
 
 {$ifdef mips64el}
   {$define mips}
-  {$define mipsel}
   {$define mips64}
 {$endif mips64el}
 

+ 33 - 14
compiler/options.pas

@@ -4172,16 +4172,9 @@ procedure read_arguments(cmd:TCmdStr);
       {$ifdef mipsel}
         def_system_macro('CPUMIPS');
         def_system_macro('CPUMIPSEL');
-      {$ifdef mips64el}
-        def_system_macro('CPUMIPS64');
-        def_system_macro('CPUMIPSEL64');
-        def_system_macro('CPUMIPS64EL');
-        def_system_macro('CPU64');
-      {$else}
         def_system_macro('CPUMIPS32');
         def_system_macro('CPUMIPSEL32');
         def_system_macro('CPU32');
-      {$endif}
         def_system_macro('FPC_HAS_TYPE_DOUBLE');
         def_system_macro('FPC_HAS_TYPE_SINGLE');
         def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
@@ -4198,25 +4191,51 @@ procedure read_arguments(cmd:TCmdStr);
       {$ifdef mipseb}
         def_system_macro('CPUMIPS');
         def_system_macro('CPUMIPSEB');
+        def_system_macro('CPUMIPS32');
+        def_system_macro('CPUMIPSEB32');
+        def_system_macro('CPU32');
+        def_system_macro('FPC_HAS_TYPE_DOUBLE');
+        def_system_macro('FPC_HAS_TYPE_SINGLE');
+        def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
+        def_system_macro('FPC_CURRENCY_IS_INT64');
+        def_system_macro('FPC_COMP_IS_INT64');
+        def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
+        { See comment above for mipsel }
+        def_system_macro('FPC_LOCALS_ARE_STACK_REG_RELATIVE');
+      {$endif mipseb}
+
       {$ifdef mips64}
+        def_system_macro('CPUMIPS');
         def_system_macro('CPUMIPS64');
         def_system_macro('CPUMIPSEB64');
         def_system_macro('CPUMIPS64EB');
         def_system_macro('CPU64');
-      {$else}
-        def_system_macro('CPUMIPS32');
-        def_system_macro('CPUMIPSEB32');
-        def_system_macro('CPU32');
-      {$endif}
+        def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
+        def_system_macro('FPC_CURRENCY_IS_INT64');
+        def_system_macro('FPC_COMP_IS_INT64');
+        def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
+        { See comment above for mipsel }
+        def_system_macro('FPC_LOCALS_ARE_STACK_REG_RELATIVE');
+      {$endif mips64}
+
+      {$ifdef mips64el}
+        def_system_macro('CPUMIPS');
+        def_system_macro('CPUMIPS64');
+        def_system_macro('CPUMIPSEL64');
+        def_system_macro('CPUMIPS64EL');
+        def_system_macro('CPU64');
         def_system_macro('FPC_HAS_TYPE_DOUBLE');
         def_system_macro('FPC_HAS_TYPE_SINGLE');
         def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
         def_system_macro('FPC_CURRENCY_IS_INT64');
         def_system_macro('FPC_COMP_IS_INT64');
         def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
-        { See comment above for mipsel }
+        { On most systems, locals are accessed relative to base pointer,
+          but for MIPS cpu, they are accessed relative to stack pointer.
+          This needs adaptation for so low level routines,
+          like MethodPointerLocal and related objects unit functions. }
         def_system_macro('FPC_LOCALS_ARE_STACK_REG_RELATIVE');
-      {$endif}
+      {$endif mips64el}
 
       {$ifdef i8086}
         def_system_macro('CPU86');  { Borland compatibility }