Having the -mfused-madd option honored
Michael Meissner
michael.meissner@amd.com
Fri Nov 9 03:55:00 GMT 2007
On Wed, Nov 07, 2007 at 03:05:17PM +0100, Serge Torres wrote:
> Hi,
>
> I'm using gcc 4.1.2 on an openPower 720 (Power5 processors) box running
> Linux OpenSUSE 10.2.
>
> I would like to compile a C program with the fused multiply-add and
> multiply-sub instructions enabled. I can't figure out the right set of
> options.
>
> I've been trying many combinations of -mcpu=power5, -mhard-float,
> -mfused-madd, -m64 but none has worked yet.
>
> An idea any one? Or even better: a personnal successful experience.
>
> Cheers,
>
> Serge Torres
>
> PS : IBM XL V 9 works (as matter of fact, with no particular option)
Just to be sure, have you compiled the program with optimization (such as -O,
-O2, or -O3)? The GCC combiner that builds up complex insns like multiply and
add is only run when optimizing. I happen to have a PowerPC cross compiler
built from a few weeks ago, and it generates fmadd and fmadds instructions if I
use -mcpu=power5 and -mfused-madd.
--
Michael Meissner, AMD
90 Central Street, MS 83-29, Boxborough, MA, 01719, USA
michael.meissner@amd.com
More information about the Gcc-help
mailing list