[Bug target/19571] floating point registers not preserved during function call
rearnsha at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Jan 22 10:36:00 GMT 2005
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-01-22 10:36 -------
The code generated looks correct to me.
The generated assembler that you've give for __cos is clearly saving and
restoring f4-f7.
__cos:
// Saves the integer registers
ca4c: e92d4070 stmdb sp!, {r4, r5, r6, lr}
// Does some processing that does not involve floating point
ca50: e3c02102 bic r2, r0, #-2147483648 ; 0x80000000
ca54: e35205f9 cmp r2, #1044381696 ; 0x3e400000
ca58: e1a05001 mov r5, r1
ca5c: e1a04000 mov r4, r0
// Sets f0: OK, since f0 is call-clobbered.
ca60: be008189 mvfltd f0, #1.0
// This instruction saves 4 floating point registers, starting with f4 on the stack
ca64: ed2d420c sfm f4, 4, [sp, #-48]!
... // Rest of function
// And this instruction loads them back again.
ccec: ecbd420c lfm f4, 4, [sp], #48
ccf0: e8bd8070 ldmia sp!, {r4, r5, r6, pc}
As far as I can see this is the only exit point from the generated code.
I think you need to check that the floating point emulator in your kernel is
functioning correctly. Particularly for lfm/sfm.
R.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19571
More information about the Gcc-bugs
mailing list