diff --git a/compiler/switches.pas b/compiler/switches.pas index 6addd6e950..3969e3df15 100644 --- a/compiler/switches.pas +++ b/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;