Based on Stefan's ChatGPT result that matched what Andrew found in the source at "https://github.com/xerpi/SDL-3DS/blob/master/src/render/mmx.h", I checked this patch "0001-Use-m-constrain-instead-of-X-in-libzmpeg3-video-mmx..patch" into GIT. I compared that source mmx.h with ours at libzmpeg3/video/mmx.h and am convinced that no other relevant changes would interfere with the mod changing X to m. Did some testing not using ffmpeg, but probably not even applicable.
Can you try:
CFLAGS="-march=native -O3" CXXFLAGS="-march=native -O3"
./configure
gcc (Gentoo 15.2.1_p20251122 p4) 15.2.1 20251122
Both systems tested are AMD Ryzen 5, and older Athlon X4.
Of course you are right that it errs out with O3 (O2 obviously works). Do you have a recommended fix? -- I can not code in C/C+
but
I can test. I tried looking online for a code solution that I could understand and found nothing that made sense to me.
ChatGPT suggested something very simple just replace the =X with =m
#define mmx_r2m(op, reg, mem) \ __asm__ __volatile__ ( \ #op " %%" #reg ", %0" \ : "=m" (mem) \ : \ : "memory")
May be, I think I moved some of it to =X because it was failing on i586 build
https://github.com/xerpi/SDL-3DS/blob/master/src/render/mmx.h
this one uses "m" in those functions but I am not sure it was always correct.