|
@@ -26,10 +26,11 @@ unit ncpucall;
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
- ncgcal;
|
|
|
+ node, ncgcal;
|
|
|
|
|
|
type
|
|
|
tMIPSELcallnode = class(tcgcallnode)
|
|
|
+ function pass_1 : tnode; override;
|
|
|
procedure extra_call_code; override;
|
|
|
procedure extra_post_call_code; override;
|
|
|
end;
|
|
@@ -38,11 +39,20 @@ type
|
|
|
implementation
|
|
|
|
|
|
uses
|
|
|
- cpubase,
|
|
|
+ globtype,cpubase,procinfo,
|
|
|
aasmtai,aasmcpu,aasmdata,
|
|
|
paramgr,
|
|
|
ncal;
|
|
|
|
|
|
+function TMIPSELcallnode.pass_1 : tnode;
|
|
|
+begin
|
|
|
+ pass_1 := inherited pass_1;
|
|
|
+ if assigned(current_procinfo) and
|
|
|
+ assigned(procdefinition) and
|
|
|
+ (procdefinition.proccalloption=pocall_cdecl) then
|
|
|
+ include(current_procinfo.flags,pi_needs_got);
|
|
|
+end;
|
|
|
+
|
|
|
procedure tMIPSELcallnode.extra_call_code;
|
|
|
begin
|
|
|
{ MIPS functions should never modify the stack pointer
|