* make local variables in assembler blocks working again after r44933

* test for #37218

git-svn-id: trunk@45667 -
This commit is contained in:
florian 2020-06-20 20:17:53 +00:00
parent 4e1e35aef5
commit 80111a0a60
4 changed files with 25 additions and 2 deletions

1
.gitattributes vendored
View File

@ -18331,6 +18331,7 @@ tests/webtbs/tw37136.pp svneol=native#text/pascal
tests/webtbs/tw37154.pp svneol=native#text/pascal
tests/webtbs/tw3719.pp svneol=native#text/plain
tests/webtbs/tw3721.pp svneol=native#text/plain
tests/webtbs/tw37218.pp svneol=native#text/pascal
tests/webtbs/tw3742.pp svneol=native#text/plain
tests/webtbs/tw3751.pp svneol=native#text/plain
tests/webtbs/tw3758.pp svneol=native#text/plain

View File

@ -838,7 +838,7 @@ Unit racpugas;
else
Message1(sym_e_unknown_id,expr);
end
else
else if oper.opr.typ<>OPR_LOCAL then
begin
oper.InitRef;
MaybeAddGotAddrMode;

View File

@ -1098,7 +1098,7 @@ end;
procedure TOperand.InitRef;
{*********************************************************************}
{ Description: This routine first check if the opcode is of }
{ Description: This routine first check if the opcode is of }
{ type OPR_NONE, or OPR_REFERENCE , if not it gives out an error. }
{ If the operandtype = OPR_NONE or <> OPR_REFERENCE then it sets up }
{ the operand type to OPR_REFERENCE, as well as setting up the ref }

22
tests/webtbs/tw37218.pp Normal file
View File

@ -0,0 +1,22 @@
{ %CPU=aarch64 }
program project1;
uses crt;
procedure test;
var a:uint64;
begin
a:=1;
asm
mov x4,# 0
mov x12,# 1
add x4,x4,x12,lsl # 2
str x4, a
end;
writeln(a);
if a<>4 then
halt(1);
end;
begin
test;
end.