Re: some questions about GCC's options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ohav chochmah <philomath868@xxxxxxxxx> writes:

> On 6/1/12, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
>
>> When optimizing on x86 or x86_64, -fomit-frame-pointer is the default
>> anyhow.  -fomit-frame-pointer essentially implies
>> -momit-leaf-frame-pointer.
>>
>
> I was sure that's the answer, but then is GCC lying to me?
> ~ $ gcc -S tst.c -O2 -march=native -Q --help=optimizers | grep omit
>   -fomit-frame-pointer        		[disabled]

Basically, it's a bug.  When you use the --help=optimizers option, GCC
doesn't actually compile the file.  That means that it doesn't run
through the target specific code that causes -O2 to turn on
-fomit-frame-pointer.  And that means that the display is invalid.

Please file a bug report at http://gcc.gnu.org/bugzilla if there isn't
one open already.  Thanks.


>> For x86_64 -mfpmath=sse is the default.
>>
> here again:
> ~ $ gcc -S tst.c -O2 -march=native -Q --help=target | grep 'mfpmath='
>   -mfpmath=                   		387

Same answer.  The -mfpmath setting is done in target specific code that
is not run when using --help.


>>> why is msse disabled by default even after march=native, while
>>> msse[234], msse4.[12] and mssse3 are all enabled?
>>
>> Not sure--what makes you think this is the case?
>>
> sorry, 's/msse/mmmx/'.
> ~ $ gcc -S tst.c -O2 -march=native -Q --help=target | grep mmx
>   -mmmx                       		[disabled]
>
> ~ $ sudo x86info -a -v | grep -i mmx
>  mmx     	MMX support
>
>>> isn't the CRC32 instruction part of sse4.2?, why is mcrc32 disabled by
>>> default even when sse4.2 is enabled?

Same answer.  Target specific code turns on -mmmx if -msse is on.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux