Browse Source

+ made the $W switch control the FarProcsPushOddBP target switch in the i8086
compiler (BP7 compatibility) instead of controlling stack frame elimination
(which isn't supported by the compiler on i8086 anyway, due to i8086's lack
of support for stack relative addressing)

git-svn-id: trunk@31834 -

nickysn 9 năm trước cách đây
mục cha
commit
ae533e4c77
1 tập tin đã thay đổi với 12 bổ sung2 xóa
  1. 12 2
      compiler/switches.pas

+ 12 - 2
compiler/switches.pas

@@ -42,7 +42,7 @@ procedure flushpendingswitchesstate;
 implementation
 uses
   systems,cpuinfo,
-  globals,verbose,comphook,
+  globals,verbose,comphook,dirparse,
   fmodule;
 
 {****************************************************************************
@@ -50,7 +50,7 @@ uses
 ****************************************************************************}
 
 type
-  TSwitchType=(ignoredsw,localsw,modulesw,globalsw,illegalsw,unsupportedsw,alignsw,optimizersw,packenumsw,pentiumfdivsw);
+  TSwitchType=(ignoredsw,localsw,modulesw,globalsw,illegalsw,unsupportedsw,alignsw,optimizersw,packenumsw,pentiumfdivsw,targetsw);
   SwitchRec=record
     typesw : TSwitchType;
     setsw  : byte;
@@ -85,7 +85,11 @@ const
    {T} (typesw:localsw; setsw:ord(cs_typed_addresses)),
    {U} (typesw:pentiumfdivsw; setsw:ord(cs_localnone)),
    {V} (typesw:localsw; setsw:ord(cs_strict_var_strings)),
+{$ifdef i8086}
+   {W} (typesw:targetsw; setsw:ord(ts_x86_far_procs_push_odd_bp)),
+{$else i8086}
    {W} (typesw:localsw; setsw:ord(cs_generate_stackframes)),
+{$endif i8086}
    {X} (typesw:modulesw; setsw:ord(cs_extsyntax)),
    {Y} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {Z} (typesw:packenumsw; setsw:ord(cs_localnone))
@@ -119,7 +123,11 @@ const
    {T} (typesw:localsw; setsw:ord(cs_typed_addresses)),
    {U} (typesw:illegalsw; setsw:ord(cs_localnone)),
    {V} (typesw:localsw; setsw:ord(cs_strict_var_strings)),
+{$ifdef i8086}
+   {W} (typesw:targetsw; setsw:ord(ts_x86_far_procs_push_odd_bp)),
+{$else i8086}
    {W} (typesw:localsw; setsw:ord(cs_generate_stackframes)),
+{$endif i8086}
    {X} (typesw:modulesw; setsw:ord(cs_extsyntax)),
    {Y} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {Z} (typesw:localsw; setsw:ord(cs_externally_visible))
@@ -222,6 +230,8 @@ begin
            if state='+' then
              Message1(scan_w_unsupported_switch,'$'+switch);
          end;
+       targetsw:
+         UpdateTargetSwitchStr(TargetSwitchStr[ttargetswitch(setsw)].name+state,current_settings.targetswitches,current_module.in_global);
      end;
    end;
 end;