mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 19:43:15 +01:00
* set calling convention before assembler block is parsed
This commit is contained in:
parent
f7b08b21f8
commit
5fb06316f1
@ -45,7 +45,7 @@ implementation
|
||||
globtype,globals,verbose,
|
||||
systems,cpuinfo,
|
||||
{ aasm }
|
||||
cpubase,aasmbase,aasmtai,aasmcpu,
|
||||
cpubase,aasmbase,aasmtai,
|
||||
{ symtable }
|
||||
symconst,symbase,symtype,symdef,symsym,symtable,defutil,defcmp,
|
||||
paramgr,
|
||||
@ -56,8 +56,7 @@ implementation
|
||||
scanner,
|
||||
pbase,pexpr,
|
||||
{ codegen }
|
||||
procinfo,tgobj,rgobj,cgbase
|
||||
,ncgutil
|
||||
procinfo,rgobj,cgbase
|
||||
,radirect
|
||||
{$ifdef i386}
|
||||
{$ifndef NoRa386Int}
|
||||
@ -1067,12 +1066,6 @@ implementation
|
||||
if not is_void(current_procinfo.procdef.rettype.def) then
|
||||
symtablestack.rename(current_procinfo.procdef.resultname,'$hiddenresult');
|
||||
|
||||
{ force the asm statement }
|
||||
if token<>_ASM then
|
||||
consume(_ASM);
|
||||
include(current_procinfo.flags,pi_is_assembler);
|
||||
p:=_asm_statement;
|
||||
|
||||
{ assembler routines use stdcall instead of register }
|
||||
{$warning Temporary hack for force stdcall for assembler}
|
||||
if (po_assembler in current_procinfo.procdef.procoptions) and
|
||||
@ -1085,6 +1078,12 @@ implementation
|
||||
not(po_hascallingconvention in current_procinfo.procdef.procoptions) then
|
||||
current_procinfo.procdef.proccalloption:=pocall_register;
|
||||
|
||||
{ force the asm statement }
|
||||
if token<>_ASM then
|
||||
consume(_ASM);
|
||||
include(current_procinfo.flags,pi_is_assembler);
|
||||
p:=_asm_statement;
|
||||
|
||||
{$ifndef sparc}
|
||||
if (po_assembler in current_procinfo.procdef.procoptions) then
|
||||
begin
|
||||
@ -1129,7 +1128,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.112 2003-10-02 21:15:59 peter
|
||||
Revision 1.113 2003-10-07 20:06:37 peter
|
||||
* set calling convention before assembler block is parsed
|
||||
|
||||
Revision 1.112 2003/10/02 21:15:59 peter
|
||||
* delphi mode uses register calling by default for assembler
|
||||
|
||||
Revision 1.111 2003/10/01 20:34:49 peter
|
||||
|
||||
Loading…
Reference in New Issue
Block a user