From fc6eac6a98564c0d24e53bbaff607c6c01ec8e34 Mon Sep 17 00:00:00 2001 From: nickysn Date: Sun, 13 Apr 2014 13:07:18 +0000 Subject: [PATCH] + added $F directive handling, sets cs_force_far_calls (not implemented yet) git-svn-id: trunk@27560 - --- compiler/globtype.pas | 4 +++- compiler/scandir.pas | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/compiler/globtype.pas b/compiler/globtype.pas index 8948e829c6..d9b218f176 100644 --- a/compiler/globtype.pas +++ b/compiler/globtype.pas @@ -143,7 +143,9 @@ interface cs_external_var, cs_externally_visible, { jvm specific } cs_check_var_copyout, - cs_zerobasedstrings + cs_zerobasedstrings, + { i8086 specific } + cs_force_far_calls ); tlocalswitches = set of tlocalswitch; diff --git a/compiler/scandir.pas b/compiler/scandir.pas index c57d6383bf..35df77d9bb 100644 --- a/compiler/scandir.pas +++ b/compiler/scandir.pas @@ -387,6 +387,20 @@ unit scandir; do_delphiswitch('X'); end; + procedure dir_forcefarcalls; + begin + if (target_info.system<>system_i8086_msdos) +{$ifdef i8086} + or (current_settings.x86memorymodel in x86_near_code_models) +{$endif i8086} + then + begin + Message1(scan_n_ignored_switch,pattern); + exit; + end; + do_localswitch(cs_force_far_calls); + end; + procedure dir_fatal; begin do_message(scan_f_user_defined); @@ -1596,6 +1610,7 @@ unit scandir; AddDirective('ERRORC',directive_mac, @dir_error); AddDirective('EXTENDEDSYNTAX',directive_all, @dir_extendedsyntax); AddDirective('EXTERNALSYM',directive_all, @dir_externalsym); + AddDirective('F',directive_all, @dir_forcefarcalls); AddDirective('FATAL',directive_all, @dir_fatal); AddDirective('FPUTYPE',directive_all, @dir_fputype); AddDirective('FRAMEWORKPATH',directive_all, @dir_frameworkpath);