+ support [const+[ref]] in the x86 intel syntax asm reader

git-svn-id: trunk@38383 -
This commit is contained in:
nickysn 2018-02-28 16:24:45 +00:00
parent 0be6c4538c
commit 6f8abde786
2 changed files with 3 additions and 1 deletions

View File

@ -978,7 +978,7 @@ Unit Rax86int;
AS_PLUS:
Begin
Consume(AS_PLUS);
if isref and (actasmtoken=AS_REGISTER) then
if isref and ((actasmtoken=AS_REGISTER) or (actasmtoken=AS_LBRACKET)) then
break;
expr:=expr + '+';
end;

View File

@ -6,6 +6,8 @@ procedure t; assembler;
asm
mov ax, [bx[5]][di][54][-17][45][4] { mov ax, [bx+di+5Bh] }
mov ax, [[bx+5]+[di+54]+[-17]+[45]+[4]] { mov ax, [bx+di+5Bh] }
mov ax, [5[7]] { mov ax, [000Ch] }
mov ax, [5+[7]] { mov ax, [000Ch] }
end;
begin