I'm using CodeSourcery G++ Lite 2009q1 version4.3.3.
I have been examining the assembly output of a program which makes
heavy use of the Neon floating point instructions. The program uses
the Neon intrinsics.
Although the compiler G++ utilizes most of the available register set,
it only seems to save/restore registers d8 to d14.
The below code segment is extracted from the entry point of a function
that is declared as external.
3076 0000 F04F2DE9 stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
@,
3077 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3078 .LCFI0:
3079 0004 0E8B2DED fstmfdd sp!, {d8, d9, d10, d11, d12, d13, d14}
@,
3080 .vsave {d8, d9, d10, d11, d12, d13, d14}
. . .
4605 07a8 140BC8ED vstr d16, [r8, #80] @, acceleration
4606 07ac 161BC8ED vstr d17, [r8, #88] @, acceleration
4607 .loc 1 675 0
4608 07b0 306B82ED vstr d6, [r2, #192] @, accel_calibration
4609 07b4 327B82ED vstr d7, [r2, #200] @, accel_calibration
As you can see, the compiler is using registers both above and below
the ones that it decided to save.
I have seen some reports of registers being corrupted after neon code
is executed. I suspect that this is the reason.
Is anyone aware of a fix or work around for this apparent bug?
Regards,
Bob