3DNow should be disabled by default in the configure script

Somehow 3DNow is enabled by default in the configure script, and this passes -m3dnow to the compiler which might cause it to emit a 3DNow instruction.

Most machines these days don’t support this extension, so it should be disabled by default.

The current official build for Fedora Linux builds SDL with -m3dnow, and it apparently doesn’t cause a problem yet (build log). Probably, major compilers won’t care to do backend optimization targeting a somewhat obscure extension, but there’s no reason to leave a potential problem.

1 Like

Interesting - both that SDL seems to set -m3dnow by default, and that apparently it never caused problems (after all, Intel CPUs never supported it).
I guess when SSE and SSE2 are available there’s no reason for the compiler to use 3DNow instructions

I’m pretty sure the ‘-msomething’ only means the compiler is allowed to use 3dnow when available. It’s not going to emit 3dnow instructions unless (all) the target cpu arch supports it (-march=k6* or -march=athlon* and a few others), so it’s a bit of a non-issues from a compatibility standpoint.

Inline assembly use is a different issue, since it’s going to be cpuid guarded anyway.

I do think it would make sense to disable and even remove 3dnow support for the next major version just to clean things up.