mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 16:29:24 +02:00
* inline asm fix for accessing record variables when using the unitname (e.g.
'mov ax, unitname.varname.fieldname') git-svn-id: trunk@38755 -
This commit is contained in:
parent
6060f474ed
commit
bbc364b245
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12577,6 +12577,7 @@ tests/test/tasm25ss0.pp svneol=native#text/plain
|
|||||||
tests/test/tasm25ss1.pp svneol=native#text/plain
|
tests/test/tasm25ss1.pp svneol=native#text/plain
|
||||||
tests/test/tasm25ss2.pp svneol=native#text/plain
|
tests/test/tasm25ss2.pp svneol=native#text/plain
|
||||||
tests/test/tasm25ss3.pp svneol=native#text/plain
|
tests/test/tasm25ss3.pp svneol=native#text/plain
|
||||||
|
tests/test/tasm26.pp svneol=native#text/plain
|
||||||
tests/test/tasm2a.pp svneol=native#text/plain
|
tests/test/tasm2a.pp svneol=native#text/plain
|
||||||
tests/test/tasm3.pp svneol=native#text/plain
|
tests/test/tasm3.pp svneol=native#text/plain
|
||||||
tests/test/tasm4.pp svneol=native#text/plain
|
tests/test/tasm4.pp svneol=native#text/plain
|
||||||
|
@ -1509,6 +1509,16 @@ Begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
asmsearchsym(base,sym,srsymtable);
|
asmsearchsym(base,sym,srsymtable);
|
||||||
|
{ allow unitname.identifier }
|
||||||
|
if assigned(sym) and (sym.typ=unitsym) then
|
||||||
|
begin
|
||||||
|
i:=pos('.',s);
|
||||||
|
if i=0 then
|
||||||
|
i:=255;
|
||||||
|
base:=base+'.'+Copy(s,1,i-1);
|
||||||
|
delete(s,1,i);
|
||||||
|
asmsearchsym(base,sym,srsymtable);
|
||||||
|
end;
|
||||||
st:=nil;
|
st:=nil;
|
||||||
{ we can start with a var,type,typedconst }
|
{ we can start with a var,type,typedconst }
|
||||||
if assigned(sym) then
|
if assigned(sym) then
|
||||||
|
25
tests/test/tasm26.pp
Normal file
25
tests/test/tasm26.pp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ %CPU=i8086,i386,x86_64 }
|
||||||
|
|
||||||
|
{$IFDEF FPC}
|
||||||
|
{$MODE TP}
|
||||||
|
{$ASMMODE INTEL}
|
||||||
|
{$PIC OFF}
|
||||||
|
{$ENDIF FPC}
|
||||||
|
|
||||||
|
program tasm26;
|
||||||
|
|
||||||
|
type
|
||||||
|
t = record
|
||||||
|
a: word;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
v: t;
|
||||||
|
|
||||||
|
procedure x; assembler;
|
||||||
|
asm
|
||||||
|
mov ax, tasm26.v.a;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user