Переглянути джерело

some more generic i8086 defines added

git-svn-id: branches/i8086@23712 -
nickysn 12 роки тому
батько
коміт
a9809323dc
4 змінених файлів з 31 додано та 0 видалено
  1. 14 0
      compiler/fpcdefs.inc
  2. 8 0
      compiler/options.pas
  3. 6 0
      compiler/symconst.pas
  4. 3 0
      compiler/symdef.pas

+ 14 - 0
compiler/fpcdefs.inc

@@ -42,6 +42,20 @@
   {$packrecords c}
 {$endif cpuarm}
 
+{$ifdef i8086}
+  {$define cpu16bit}
+  {$define cpu16bitaddr}
+  {$define cpu16bitalu}
+  {$define x86}
+  {$define cpuflags}
+  {$define cpuextended}
+  {//$define SUPPORT_MMX}
+  {$define cpumm}
+  {$define fewintregisters}
+  {$define cpurox}
+  {$define SUPPORT_SAFECALL}
+{$endif i8086}
+
 {$ifdef i386}
   {$define cpu32bit}
   {$define cpu32bitaddr}

+ 8 - 0
compiler/options.pas

@@ -2960,6 +2960,14 @@ begin
   def_system_macro('FPC_LOCALS_ARE_STACK_REG_RELATIVE');
 {$endif}
 
+{$ifdef i8086}
+  def_system_macro('CPU86');  { Borland compatibility }
+  def_system_macro('CPU87');  { Borland compatibility }
+  def_system_macro('CPU8086');
+  def_system_macro('CPUI8086');
+  def_system_macro('CPU16');
+{$endif i8086}
+
   { Set up a default prefix for binutils when cross-compiling }
   if source_info.system<>target_info.system then
     case target_info.system of

+ 6 - 0
compiler/symconst.pas

@@ -659,6 +659,12 @@ inherited_objectoptions : tobjectoptions = [oo_has_virtual,oo_has_private,oo_has
    }
    pushleftright_pocalls : tproccalloptions = [pocall_register,pocall_pascal];
 {$endif}
+{$ifdef i8086}
+   { we only take this into account on i386, on other platforms we always
+     push in the same order
+   }
+   pushleftright_pocalls : tproccalloptions = [pocall_register,pocall_pascal];
+{$endif}
 
      SymTypeName : array[tsymtyp] of string[12] = (
        'abstractsym','globalvar','localvar','paravar','fieldvar',

+ 3 - 0
compiler/symdef.pas

@@ -888,6 +888,9 @@ interface
        java_procvarbase          : tobjectdef;
 
     const
+{$ifdef i8086}
+       pbestrealtype : ^tdef = @s80floattype;
+{$endif}
 {$ifdef i386}
        pbestrealtype : ^tdef = @s80floattype;
 {$endif}