[arch-dev-public] Create guidelines regarding SIMD instructions/x86 extensions

Allan McRae allan at archlinux.org
Sat May 25 11:23:27 UTC 2019

On 25/5/19 5:22 pm, Lukas Jirkovsky via arch-dev-public wrote:
> On Sat, 25 May 2019 at 04:27, Filipe Laíns via arch-dev-public
> <arch-dev-public at archlinux.org> wrote:
>> Setting `-mtune` to generic won't add any additional instruction sets
>> by itself, but it does not prevent instruction sets from being added.
>> Looks like GCC enables MMX, SSE and SSE2 by default, it isn't related
>> at all to `-march` like I stated in the email but it still presents the
>> same issue.
> As far as I know, MMX, SSE and SSE2 are mandatory part of the AMD64
> instruction set, so they are not enabled randomly just because someone
> felt like it, but because they are be present on every x86_64 cpu.
> .

Correct.  Using the command I gave in my first reply:

$ gcc -march=x86-64 -Q --help=target | grep sse
  -mfpmath=                   		sse
  -mno-sse4                   		[enabled]
  -msse                       		[enabled]
  -msse2                      		[enabled]
  -msse2avx                   		[disabled]
  -msse3                      		[disabled]
  -msse4                      		[disabled]

$ gcc -march=x86-64 -Q --help=target | grep mmx
  -mmmx                       		[enabled]

-mtune just tunes instructions for a "representative" set of "current"
CPUs that run as x86-64.


More information about the arch-dev-public mailing list