Parcourir la source

* treat interrupt procedures as 'near' in the i8086 inline assembler for TP7
compatibility

git-svn-id: trunk@32194 -

nickysn il y a 9 ans
Parent
commit
9e110e8e7e
2 fichiers modifiés avec 8 ajouts et 4 suppressions
  1. 4 2
      compiler/rautils.pas
  2. 4 2
      compiler/x86/rax86int.pas

+ 4 - 2
compiler/rautils.pas

@@ -908,7 +908,8 @@ Begin
             begin
               opr.ref.symbol:=current_asmdata.RefAsmSymbol(tprocdef(tprocsym(sym).ProcdefList[0]).mangledname);
 {$ifdef i8086}
-              opr.ref_farproc_entry:=is_proc_far(tprocdef(tprocsym(sym).ProcdefList[0]));
+              opr.ref_farproc_entry:=is_proc_far(tprocdef(tprocsym(sym).ProcdefList[0]))
+                        and not (po_interrupt in tprocdef(tprocsym(sym).ProcdefList[0]).procoptions);
 {$endif i8086}
             end;
           OPR_NONE:
@@ -916,7 +917,8 @@ Begin
               opr.typ:=OPR_SYMBOL;
               opr.symbol:=current_asmdata.RefAsmSymbol(tprocdef(tprocsym(sym).ProcdefList[0]).mangledname);
 {$ifdef i8086}
-              opr.sym_farproc_entry:=is_proc_far(tprocdef(tprocsym(sym).ProcdefList[0]));
+              opr.sym_farproc_entry:=is_proc_far(tprocdef(tprocsym(sym).ProcdefList[0]))
+                        and not (po_interrupt in tprocdef(tprocsym(sym).ProcdefList[0]).procoptions);
 {$endif i8086}
               opr.symofs:=0;
             end;

+ 4 - 2
compiler/x86/rax86int.pas

@@ -1025,7 +1025,8 @@ Unit Rax86int;
                                 Message(asmr_w_calling_overload_func);
                                hs:=tprocdef(tprocsym(sym).ProcdefList[0]).mangledname;
 {$ifdef i8086}
-                               is_farproc_entry:=is_proc_far(tprocdef(tprocsym(sym).ProcdefList[0]));
+                               is_farproc_entry:=is_proc_far(tprocdef(tprocsym(sym).ProcdefList[0]))
+                                    and not (po_interrupt in tprocdef(tprocsym(sym).ProcdefList[0]).procoptions);
 {$endif i8086}
                                hssymtyp:=AT_FUNCTION;
                              end;
@@ -2109,7 +2110,8 @@ Unit Rax86int;
           current procedure (BP7 compatible) }
         else if (instr.opcode=A_RET) then
           begin
-            if is_proc_far(current_procinfo.procdef) then
+            if is_proc_far(current_procinfo.procdef) and
+               not (po_interrupt in current_procinfo.procdef.procoptions) then
               instr.opcode:=A_RETF
             else
               instr.opcode:=A_RETN;