Forráskód Böngészése

+ added $F directive handling, sets cs_force_far_calls (not implemented yet)

git-svn-id: trunk@27560 -
nickysn 11 éve
szülő
commit
fc6eac6a98
2 módosított fájl, 18 hozzáadás és 1 törlés
  1. 3 1
      compiler/globtype.pas
  2. 15 0
      compiler/scandir.pas

+ 3 - 1
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;
 

+ 15 - 0
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);