[fpc-devel] question about parameter loading code

2012-06-09 Thread Fuxin Zhang
Dear sirs, When trying to generate code debuggable by GDB, I meet a problem: * it seems mips C code will expect a frame pointer = sp after stack adjustment * but in cpupara.pas, when we create para info, we don't know yet the whole stack size, thus the reference offset cannot be set correctly

Re: [fpc-devel] question about parameter loading code

2012-06-10 Thread Fuxin Zhang
> Dear sirs, > > >C code is something like: > > addiu sp,sp,-LocalSize > swfp, 4(sp) > move fp, sp > > in this way, I don't know how to generate parameter references since no > usable base register to get fixed offset for parameters in > create_paraloc_info_intern. Can we use a spec

Re: [fpc-devel] question about parameter loading code

2012-06-10 Thread Florian Klämpfl
Am 10.06.2012 08:15, schrieb Fuxin Zhang: > Dear sirs, > > When trying to generate code debuggable by GDB, I meet a problem: > > * it seems mips C code will expect a frame pointer = sp after stack > adjustment > * but in cpupara.pas, when we create para info, we don't know yet the > whole stack

Re: [fpc-devel] question about parameter loading code

2012-06-10 Thread Sergei Gorelkin
10.06.2012 20:26, Florian Klämpfl пишет: Am 10.06.2012 08:15, schrieb Fuxin Zhang: Dear sirs, When trying to generate code debuggable by GDB, I meet a problem: * it seems mips C code will expect a frame pointer = sp after stack adjustment * but in cpupara.pas, when we create para info, we d

Re: [fpc-devel] question about parameter loading code

2012-06-10 Thread Jonas Maebe
On 10 Jun 2012, at 18:50, Sergei Gorelkin wrote: > - after final frame size becomes known, fixup these instructions to reference > a real FP with adjusted offset. Or maybe not keep a separate list of > instructions, but instead just iterate the entire procedure asmlist (because > about every s

Re: [fpc-devel] question about parameter loading code

2012-06-10 Thread Florian Klämpfl
Am 10.06.2012 19:18, schrieb Jonas Maebe: > > On 10 Jun 2012, at 18:50, Sergei Gorelkin wrote: > >> - after final frame size becomes known, fixup these instructions to >> reference a real FP with adjusted offset. Or maybe not keep a >> separate list of instructions, but instead just iterate the e