Browse Source

* don't push cs in ti8086callnode.extra_interrupt_code in the far code memory
models, because in these models, interrupt procedures are treated as far and
an appropriate far call (or push cs+near call if in the same segment) is made
anyway

git-svn-id: trunk@27622 -

nickysn 11 years ago
parent
commit
8a606761cd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/i8086/n8086cal.pas

+ 2 - 1
compiler/i8086/n8086cal.pas

@@ -60,7 +60,8 @@ implementation
     procedure ti8086callnode.extra_interrupt_code;
     procedure ti8086callnode.extra_interrupt_code;
       begin
       begin
         emit_none(A_PUSHF,S_W);
         emit_none(A_PUSHF,S_W);
-        emit_reg(A_PUSH,S_W,NR_CS);
+        if current_settings.x86memorymodel in x86_near_code_models then
+          emit_reg(A_PUSH,S_W,NR_CS);
       end;
       end;