This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[arm] possible bug in G++ 3.4.x
- From: Vladimir Ivanov <vladitx at nucleusys dot com>
- To: gcc at gcc dot gnu dot org
- Cc: pbrook at codesourcery dot com, rearnsha at gcc dot gnu dot org, petkan at nucleusys dot com
- Date: Mon, 28 Feb 2005 14:51:46 +0200 (EET)
- Subject: [arm] possible bug in G++ 3.4.x
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.
Best regards,
-- Vladimir