Selaa lähdekoodia

Avoid new line after lock prefix for nasm

git-svn-id: trunk@27511 -
pierre 11 vuotta sitten
vanhempi
commit
816dfa69c1
1 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. 10 2
      compiler/x86/agx86nsm.pas

+ 10 - 2
compiler/x86/agx86nsm.pas

@@ -608,7 +608,7 @@ interface
       i,j,l    : longint;
       InlineLevel : longint;
       consttype : taiconst_type;
-      do_line,
+      do_line, SkipNewLine,
       quoted   : boolean;
       co       : comp;
       sin      : single;
@@ -1000,6 +1000,13 @@ interface
                fixed_opcode:=taicpu(hp).FixNonCommutativeOpcodes;
                { We need intel order, no At&t }
                taicpu(hp).SetOperandOrder(op_intel);
+               { LOCK must be on same line as opcode }
+               if (taicpu(hp).ops = 0) and
+                   (fixed_opcode = A_LOCK) then
+                 SkipNewLine:=true
+               else
+                 SkipNewLine:=false;
+
                s:='';
                if ((fixed_opcode=A_FADDP) or
                    (fixed_opcode=A_FMULP))
@@ -1069,7 +1076,8 @@ interface
                          end;
                       end;
                    end;
-                  AsmLn;
+                  if not SkipNewLine then
+                    AsmLn;
                 end;
              end;