|
@@ -53,7 +53,7 @@ unit cpupi;
|
|
|
cpubase,
|
|
|
aasmtai,
|
|
|
tgobj,
|
|
|
- symsym,paramgr;
|
|
|
+ symconst, symsym,paramgr;
|
|
|
|
|
|
constructor tppcprocinfo.create;
|
|
|
|
|
@@ -98,35 +98,37 @@ unit cpupi;
|
|
|
var
|
|
|
ofs : aword;
|
|
|
begin
|
|
|
- ofs:=align(maxpushedparasize+LinkageAreaSize,16);
|
|
|
- inc(procdef.parast.address_fixup,ofs);
|
|
|
- inc(procinfo.return_offset,ofs);
|
|
|
- inc(procinfo.framepointer_offset,ofs);
|
|
|
- inc(procinfo.selfpointer_offset,ofs);
|
|
|
- inc(procdef.localst.address_fixup,ofs);
|
|
|
- if cs_asm_source in aktglobalswitches then
|
|
|
- aktproccode.insert(Tai_comment.Create(strpnew('Parameter copies start at: r1+'+tostr(procdef.parast.address_fixup))));
|
|
|
+ if not(po_assembler in procdef.procoptions) then
|
|
|
+ begin
|
|
|
+ ofs:=align(maxpushedparasize+LinkageAreaSize,16);
|
|
|
+ inc(procdef.parast.address_fixup,ofs);
|
|
|
+ inc(procinfo.return_offset,ofs);
|
|
|
+ inc(procinfo.framepointer_offset,ofs);
|
|
|
+ inc(procinfo.selfpointer_offset,ofs);
|
|
|
+ if cs_asm_source in aktglobalswitches then
|
|
|
+ aktproccode.insert(Tai_comment.Create(strpnew('Parameter copies start at: r1+'+tostr(procdef.parast.address_fixup))));
|
|
|
|
|
|
-{
|
|
|
- Already done with an "inc" above now, not sure if it's correct (JM)
|
|
|
- procdef.localst.address_fixup:=procdef.parast.address_fixup+procdef.parast.datasize;
|
|
|
+// Already done with an "inc" above now, not sure if it's correct (JM)
|
|
|
+ procdef.localst.address_fixup:=procdef.parast.address_fixup+procdef.parast.datasize;
|
|
|
|
|
|
- Already done with an "inc" above, should be correct (JM)
|
|
|
- if assigned(procdef.funcretsym) and
|
|
|
- not(paramanager.ret_in_param(procdef.rettype.def,procdef.proccalloption)) then
|
|
|
- procinfo.return_offset:=tg.direction*tfuncretsym(procdef.funcretsym).address+procdef.localst.address_fixup;
|
|
|
+{
|
|
|
+ Already done with an "inc" above, should be correct (JM)
|
|
|
+ if assigned(procdef.funcretsym) and
|
|
|
+ not(paramanager.ret_in_param(procdef.rettype.def,procdef.proccalloption)) then
|
|
|
+ procinfo.return_offset:=tg.direction*tfuncretsym(procdef.funcretsym).address+procdef.localst.address_fixup;
|
|
|
}
|
|
|
|
|
|
- if cs_asm_source in aktglobalswitches then
|
|
|
- aktproccode.insert(Tai_comment.Create(strpnew('Locals start at: r1+'+tostr(procdef.localst.address_fixup))));
|
|
|
+ if cs_asm_source in aktglobalswitches then
|
|
|
+ aktproccode.insert(Tai_comment.Create(strpnew('Locals start at: r1+'+tostr(procdef.localst.address_fixup))));
|
|
|
|
|
|
- procinfo.firsttemp_offset:=align(procdef.localst.address_fixup+procdef.localst.datasize,16);
|
|
|
- if cs_asm_source in aktglobalswitches then
|
|
|
- aktproccode.insert(Tai_comment.Create(strpnew('Temp. space start: r1+'+tostr(procinfo.firsttemp_offset))));
|
|
|
+ procinfo.firsttemp_offset:=align(procdef.localst.address_fixup+procdef.localst.datasize,16);
|
|
|
+ if cs_asm_source in aktglobalswitches then
|
|
|
+ aktproccode.insert(Tai_comment.Create(strpnew('Temp. space start: r1+'+tostr(procinfo.firsttemp_offset))));
|
|
|
|
|
|
- //!!!! tg.setfirsttemp(procinfo.firsttemp_offset);
|
|
|
- tg.firsttemp:=procinfo.firsttemp_offset;
|
|
|
- tg.lasttemp:=procinfo.firsttemp_offset;
|
|
|
+ //!!!! tg.setfirsttemp(procinfo.firsttemp_offset);
|
|
|
+ tg.firsttemp:=procinfo.firsttemp_offset;
|
|
|
+ tg.lasttemp:=procinfo.firsttemp_offset;
|
|
|
+ end;
|
|
|
end;
|
|
|
|
|
|
begin
|
|
@@ -134,7 +136,10 @@ begin
|
|
|
end.
|
|
|
{
|
|
|
$Log$
|
|
|
- Revision 1.7 2003-04-05 21:09:32 jonas
|
|
|
+ Revision 1.8 2003-04-06 16:39:11 jonas
|
|
|
+ * don't generate entry/exit code for assembler procedures
|
|
|
+
|
|
|
+ Revision 1.7 2003/04/05 21:09:32 jonas
|
|
|
* several ppc/generic result offset related fixes. The "normal" result
|
|
|
offset seems now to be calculated correctly and a lot of duplicate
|
|
|
calculations have been removed. Nested functions accessing the parent's
|