Browse Source

* consume the register in the reference before the check for invalid reference
syntax in the x86 intel syntax asm reader; this is preparation for support of
segment overrides inside the reference expression (i.e. [es:bx] instead of
es:[bx])

git-svn-id: trunk@38363 -

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

+ 2 - 2
compiler/x86/rax86int.pas

@@ -1606,11 +1606,11 @@ Unit Rax86int;
 
             AS_REGISTER :
               begin
+                hreg:=actasmregister;
+                Consume(AS_REGISTER);
                 if not((GotPlus and (not Negative)) or
                        GotStar) then
                   Message(asmr_e_invalid_reference_syntax);
-                hreg:=actasmregister;
-                Consume(AS_REGISTER);
                 { this register will be the index:
                    1. just read a *
                    2. next token is a *