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