On Fri, May 17, 2013 at 9:39 PM, Ryan Hill <dirtye...@gentoo.org> wrote:
> On Wed, 15 May 2013 16:59:57 +0200
> yac <y...@gentoo.org> wrote:
>
>> Hi,
>>
>> I was recently investigating what cpu flags do I have and how does it
>> work. I have put what I have so far at [1].
>>
>> So I thought I let you know in case someone wants to chip in.
>>
>> [1] https://github.com/yaccz/cufd
>
> I've seen gcc -Q --help=target giving false results before due to the way that
> options are parsed and some flags that set other flags not getting processed 
> on
> the --help code path.  The second option you list is better.
>
> -native doesn't set 3dnow, mmx, sse, sse2, sse3, ssse3 or sse4a.  I'm guessing
> they're just handed through the -march setting.

Yes, they are.

> sys-apps/cpuid is awesome.
>
> MMX2/MMXEXT still confuses me.

SSE1 and /Enhanced/ 3DNow! added some extra MMX instructions. Some
(pshufw and pmulhuw particularly) turn out to be rather useful in
software compositing. I use them in the pixman MMX code.

See http://mattst88.com/programming/asmref/ (Sorry about the broken
search box. It works, you just don't see what you type)

Set Requires = Enhanced 3DNow!. The instructions that are listed as
'Enhanced 3DNow! or SSE1' are what are known as MMX2 or MMXEXT.

The particularly annoying thing about using them is that there's no
-mmmx2 or -mmmxext, but turning on -msse causes illegal instructions
to be generated for old AMD or Geode CPUs, while -m3dnow causes the
same problems for Intel CPUs. And, there's not actually even an
-m3dnowext flag (anymore?) anyway, so it's kind of a mess.

Reply via email to