mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 09:59:25 +02:00
* allow call dword ptr eax in delphi, resolves #18225
git-svn-id: trunk@35572 -
This commit is contained in:
parent
5de5fa9b7b
commit
ad557a1da6
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -13706,6 +13706,7 @@ tests/webtbf/tw18058b.pp svneol=native#text/plain
|
||||
tests/webtbf/tw18058c.pp svneol=native#text/plain
|
||||
tests/webtbf/tw18096.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw18096c.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw18225b.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw18267.pp svneol=native#text/plain
|
||||
tests/webtbf/tw1827.pp svneol=native#text/plain
|
||||
tests/webtbf/tw1830.pp svneol=native#text/plain
|
||||
@ -14619,6 +14620,7 @@ tests/webtbs/tw18127.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw18131.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw1820.pp svneol=native#text/plain
|
||||
tests/webtbs/tw18222.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw18225.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw1825.pp svneol=native#text/plain
|
||||
tests/webtbs/tw18266.pp svneol=native#text/plain
|
||||
tests/webtbs/tw18334.pp svneol=native#text/plain
|
||||
|
@ -1842,7 +1842,10 @@ Unit Rax86int;
|
||||
Message(asmr_e_syn_operand);
|
||||
end;
|
||||
Consume(AS_PTR);
|
||||
oper.InitRef;
|
||||
{ in delphi mode, allow e.g. call dword ptr eax,
|
||||
see also webtbs/tw18225.pp }
|
||||
if not(m_delphi in current_settings.modeswitches) then
|
||||
oper.InitRef;
|
||||
{ if the operand subscripts a record, the typesize will be
|
||||
rest -> save it here and restore it afterwards }
|
||||
l:=oper.typesize;
|
||||
|
10
tests/webtbf/tw18225b.pp
Normal file
10
tests/webtbf/tw18225b.pp
Normal file
@ -0,0 +1,10 @@
|
||||
{ %fail }
|
||||
{ %cpu=i386,x86_64 }
|
||||
{$asmmode intel}
|
||||
procedure CallProc(p: pointer); assembler;
|
||||
asm
|
||||
call dword ptr p
|
||||
call dword ptr CallProc
|
||||
end; { CallProc }
|
||||
begin
|
||||
end.
|
10
tests/webtbs/tw18225.pp
Normal file
10
tests/webtbs/tw18225.pp
Normal file
@ -0,0 +1,10 @@
|
||||
{ %cpu=i386,x86_64 }
|
||||
{$mode delphi}
|
||||
{$asmmode intel}
|
||||
procedure CallProc(p: pointer); assembler;
|
||||
asm
|
||||
call dword ptr p
|
||||
call dword ptr CallProc
|
||||
end; { CallProc }
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user