mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
* improve assembler reader
git-svn-id: trunk@44621 -
This commit is contained in:
parent
2e23e2b0fd
commit
759803f268
@ -596,9 +596,10 @@ Unit racpugas;
|
|||||||
BuildReference(oper);
|
BuildReference(oper);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AS_HASH: { Constant expression }
|
AS_MINUS,
|
||||||
|
AS_PLUS,
|
||||||
|
AS_INTNUM: { Constant expression }
|
||||||
Begin
|
Begin
|
||||||
Consume(AS_HASH);
|
|
||||||
BuildConstantOperand(oper);
|
BuildConstantOperand(oper);
|
||||||
end;
|
end;
|
||||||
AS_ID: { A constant expression, or a Variable ref. }
|
AS_ID: { A constant expression, or a Variable ref. }
|
||||||
@ -841,14 +842,13 @@ Unit racpugas;
|
|||||||
|
|
||||||
actcondition:=C_None;
|
actcondition:=C_None;
|
||||||
|
|
||||||
{ first, handle B else BLS is read wrong }
|
if hs[1]='B' then
|
||||||
if ((hs[1]='J') and (length(hs)=3)) then
|
|
||||||
begin
|
begin
|
||||||
for icond:=low(tasmcond) to high(tasmcond) do
|
for icond:=low(tasmcond) to high(tasmcond) do
|
||||||
begin
|
begin
|
||||||
if copy(hs,2,3)=uppercond2str[icond] then
|
if copy(hs,2,length(hs)-1)=uppercond2str[icond] then
|
||||||
begin
|
begin
|
||||||
actopcode:=A_J;
|
actopcode:=A_Bcc;
|
||||||
actasmtoken:=AS_OPCODE;
|
actasmtoken:=AS_OPCODE;
|
||||||
actcondition:=icond;
|
actcondition:=icond;
|
||||||
is_asmopcode:=true;
|
is_asmopcode:=true;
|
||||||
@ -856,7 +856,7 @@ Unit racpugas;
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
maxlen:=min(length(hs),6);
|
maxlen:=min(length(hs),7);
|
||||||
actopcode:=A_NONE;
|
actopcode:=A_NONE;
|
||||||
j2:=maxlen;
|
j2:=maxlen;
|
||||||
hs2:=hs;
|
hs2:=hs;
|
||||||
|
Loading…
Reference in New Issue
Block a user