Re: [fpc-devel] Scalar value is accepted as an argument for an openarray parameter

2012-06-10 Thread Skybuck Flying
-Original Message- From: Marc Weustink Sent: Friday, June 08, 2012 9:08 To: FPC developers' list Subject: Re: [fpc-devel] Scalar value is accepted as an argument for an openarray parameter On 8-6-2012 8:18, Alexander Klenin wrote: The following code compiles both with : procedure

[fpc-devel] strange behavior of mips stabs

2012-06-10 Thread Fuxin Zhang
for a function like this: int i(int b) { int i1,i2,i3; return i1 + i2; } in x86, compile with gcc -fno-pic -fomit-frame-pointer -gstabs -O0 -S the output is: Lscope1: .stabs "i:F(0,1)",36,0,0,i .stabs "b:p(0,1)",160,0,0,-20 .globl i .type i, @function

Re: [fpc-devel] strange behavior of mips stabs

2012-06-10 Thread Fuxin Zhang
After looking into the gcc code, it is really so uncommon:( Lots of pain to get full support. gcc-4.4.6/gcc/config/mips/mips.c line 7484: /* The MIPS debug format wants all automatic variables and arguments to be in terms of the virtual frame pointer (stack pointer before any adjustment i

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] Scalar value is accepted as an argument for an openarray parameter

2012-06-10 Thread Sven Barth
On 10.06.2012 00:22, Skybuck Flying wrote: > > > -Original Message- From: Marc Weustink > Sent: Friday, June 08, 2012 9:08 > To: FPC developers' list > Subject: Re: [fpc-devel] Scalar value is accepted as an argument for an > openarray parameter > > On 8-6-2012 8:18, Alexander Klenin wr

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