浏览代码

* do not use 'NEAR' conditional jumps on the i8086, because they are 386+

git-svn-id: branches/i8086@23993 -
nickysn 12 年之前
父节点
当前提交
eefc9eed90
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      compiler/x86/agx86nsm.pas

+ 5 - 2
compiler/x86/agx86nsm.pas

@@ -397,16 +397,19 @@ interface
               WriteReference(o.ref^)
             else
               begin
+{ NEAR forces NASM to emit near jumps, which are 386+ }
+{$ifndef i8086}
                 if not(
                        (op=A_JCXZ) or (op=A_JECXZ) or
-{$ifdef x86_64}
+    {$ifdef x86_64}
                        (op=A_JRCXZ) or
-{$endif x86_64}
+    {$endif x86_64}
                        (op=A_LOOP) or (op=A_LOOPE) or
                        (op=A_LOOPNE) or (op=A_LOOPNZ) or
                        (op=A_LOOPZ)
                       ) then
                   AsmWrite('NEAR ');
+{$endif i8086}
                 AsmWrite(o.ref^.symbol.name);
                 if SmartAsm then
                   AddSymbol(o.ref^.symbol.name,false);