Browse Source

* in the nasm writer, only output a segment prefix for the [si] operand, in
case there's a segment operand, different that DS (the default source
segment) for parameterized x86 string instructions

git-svn-id: trunk@37459 -

nickysn 7 years ago
parent
commit
acfa199b09
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/x86/agx86nsm.pas

+ 2 - 1
compiler/x86/agx86nsm.pas

@@ -991,7 +991,8 @@ interface
                   writer.AsmWrite(#9#9);
                   i:=get_x86_string_op_si_param(fixed_opcode);
                   if (i<>-1) and (taicpu(hp).oper[i]^.typ=top_ref) and
-                     (taicpu(hp).oper[i]^.ref^.segment<>NR_NO) then
+                     (taicpu(hp).oper[i]^.ref^.segment<>NR_NO) and
+                     (taicpu(hp).oper[i]^.ref^.segment<>NR_DS) then
                     writer.AsmWrite(std_regname(taicpu(hp).oper[i]^.ref^.segment)+' ');
                   for i:=0 to taicpu(hp).ops-1 do
                     if taicpu(hp).oper[i]^.typ=top_ref then