libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.12k stars 1.71k forks source link

Remaining intrinsics work: #7512

Open sezero opened 1 year ago

sezero commented 1 year ago

Left over stuff after https://github.com/libsdl-org/SDL/pull/7490 :

sezero commented 1 year ago

@madebr: About rdtsc:

As of gcc-4.5.x, __rdtsc() is available from x86intrin.h (which includes ia32intrin.h), and _rdtsc() has always been defined as __rdtsc. See: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/i386/ia32intrin.h;hb=HEAD#l313

As of clang-3.5: same behavior as gcc. Clang as of 4.0, however, made __rdtsc() simply a builtin function, ia32intrin.h (included by x86intrin.h as usual) still defines _rdtsc as __rdtsc as it used to.

I.e.: Neither of gcc or clang actually need immintrin.h for rdtsc but only x86intrin.h, as of above-mentioned versions which go much older than what we expect in current SDL_intrin.h.

icculus commented 3 months ago

Handling ARM / NEON intrinsics similarly: Don't know how to handle. Handling PowerPC ALTIVEC similarly: Don't know how to handle.

Does this just need something like SDL_TARGETING("altivec") or is it more complicated than that?

sezero commented 3 months ago

Handling ARM / NEON intrinsics similarly: Don't know how to handle. Handling PowerPC ALTIVEC similarly: Don't know how to handle.

Does this just need something like SDL_TARGETING("altivec") or is it more complicated than that?

Don't really know whether the target attributes work for those targets, hence the "don't know how to handle" notes