This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [arm] possible bug in G++ 3.4.x


On Mon, 2005-02-28 at 12:51, Vladimir Ivanov wrote:
> Hello all,
> 
> While compiling this:
>  	http://sourceforge.net/projects/raytracer/
> 
> I think I've spotted a bug in ARM port of G++.
> 
> The problem is that many method functions tend to save all callee-saved FP 
> registers, while they use few or none of them.
> 
> Here's a small snippet from "base3d.cpp" file:
> 
> 00000528 <_ZN6Base3d8rotateV1Ed>:
>       528:       e1a0c00d        mov     ip, sp
>       52c:       e92ddff0        stmdb   sp!, {r4, r5, r6, r7, r8, r9, sl, fp, ip, lr, pc}
>       530:       ed2d420c        sfm     f4, 4, [sp, #-48]!
>       534:       e24cb004        sub     fp, ip, #4      ; 0x4
>       538:       e24dd0cc        sub     sp, sp, #204    ; 0xcc
>       53c:       e59f3288        ldr     r3, [pc, #648]  ; 7cc <.text+0x7cc>
>       ...
> 
> Function uses only F0 register, although F4-F7 are saved/restored. This 
> leads to great speed penalty, especially when coprocessors like Crunch 
> have many registers.
> 
> PowerPC port shows no such problem, so I think it's something in ARM port.
> 
> Sorry I cannot provide small enough example, C++ is not my area of 
> expertise.

[I tried to reply to this yesterday, but the response has failed to show
up here.  I suspect it was mailer problems at my end, but if you get
this twice I apologise.]

I think this is most likely a consequence of SJLJ exceptions.  It should
be fixed when we move to the EABI unwinding tables.

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]