http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51835

--- Comment #6 from amker.cheng <amker.cheng at gmail dot com> 2012-02-06 
05:51:25 UTC ---
(In reply to comment #5)
> (In reply to comment #2)
> > This is only applicable to the 4.6 branch and trunk since support for the
> > Cortex M4 wasn't added till 4.6. 
> > 
> > cheers
> > Ramana
> 
> Maybe the Cortex M4 wasn't added until 4.6, but the other options are 
> permitted
> by 4.5 and I can easily get 4.5 to produce wrong-looking code.  With -O2
> -mfloat-abi=hard -mfpu=fpv4-sp-d16 -march=armv7-a -marm I see the following
> code generation difference between 4.5 and 4.6:
> 
> @@ -22,8 +22,9 @@
>         @ frame_needed = 0, uses_anonymous_args = 0
>         stmfd   sp!, {r3, lr}
>         bl      __aeabi_f2d
> +       fmrrd   r0, r1, d0
>         bl      __aeabi_d2iz
>         ldmfd   sp!, {r3, pc}
>         .size   func, .-func
> -       .ident  "GCC: (GNU) 4.5.4 20120126 (prerelease)"
> +       .ident  "GCC: (GNU) 4.6.3 20120203 (prerelease)"
>         .section        .note.GNU-stack,"",%progbits
> 
> Backporting r183734 from 4.6 to 4.5 makes 4.5 generate the same code as 4.6,
> i.e., with the fmrrd between the two calls.

beside this patch, Julian Brown's patch r174803 is necessary too.

For now,
1, arguments for both __aeabi_f2d and __aeabi_d2iz are wrong in 4.5;
2, arguments for __aeabi_f2d is wrong in 4.6
To solve this, have to:
1, backport r183734 and r174803 to 4.5;
2, backport r174803 to 4.6;

Reply via email to