* fix for "ldr label" support in AArch64 assembler reader (r42988)

git-svn-id: trunk@43016 -
This commit is contained in:
Jonas Maebe 2019-09-15 17:26:25 +00:00
parent 13902c1c7a
commit 4deb62ad87
3 changed files with 8 additions and 7 deletions

View File

@ -578,16 +578,17 @@ implementation
begin
result:=sr_complex;
if not assigned(ref.symboldata) and
not(ref.refaddr in [addr_gotpageoffset,addr_gotpage,addr_pageoffset,addr_page]) then
not(ref.refaddr in [addr_pic,addr_gotpageoffset,addr_gotpage,addr_pageoffset,addr_page]) then
exit;
{ can't use pre-/post-indexed mode here (makes no sense either) }
if ref.addressmode<>AM_OFFSET then
exit;
{ "ldr literal" must be a 32/64 bit LDR and have a symbol }
if assigned(ref.symboldata) and
if (ref.refaddr=addr_pic) and
((op<>A_LDR) or
not(oppostfix in [PF_NONE,PF_W,PF_SW]) or
not assigned(ref.symbol)) then
(not assigned(ref.symbol) and
not assigned(ref.symboldata))) then
exit;
{ if this is a (got) page offset load, we must have a base register and a
symbol }

View File

@ -119,9 +119,11 @@ unit agcpugas;
result:=ref.symbol.name+darwin_addrpage2str[ref.refaddr]
else
result:=linux_addrpage2str[ref.refaddr]+ref.symbol.name
end
end;
addr_pic:
result:=ref.symbol.name;
else
internalerror(2015022301);
internalerror(2015022302);
end
end
else

View File

@ -732,8 +732,6 @@ Unit racpugas;
CreateLocalLabel(actasmpattern,hl,false);
Consume(AS_ID);
AddLabelOperand(hl);
if oper.opr.ref.refaddr=addr_pic then
oper.opr.ref.refaddr:=addr_page;
end
else
{ Check for label }