When compiling on AMD64 with -O3 -march=native I get on two systems using GCC 15 the following error. In file included from video/slice.C:9: video/slice.C: In member function 'int zmpeg3_t::slice_decoder_t::add_block(int, int, int, int, int)': video/mmx.h:384:9: error: invalid 'asm': invalid constraints for operand 384 | __asm__ __volatile__ (#op " %%" #reg ", %0" \ | ^~~~~~~ video/mmx.h:406:33: note: in expansion of macro 'mmx_r2m' 406 | #define movq_r2m(reg, var) mmx_r2m(movq, reg, var) | ^~~~~~~ video/slice.C:208:7: note: in expansion of macro 'movq_r2m' 208 | movq_r2m(mm3,m_(rfp)); /* store rfp[0..7] */ | ^~~~~~~~ Stefan
вс, 15 февр. 2026 г., 22:23 Stefan de Konink via Cin < [email protected]>:
When compiling on AMD64 with -O3 -march=native I get on two systems using GCC 15 the following error.
In file included from video/slice.C:9: video/slice.C: In member function 'int zmpeg3_t::slice_decoder_t::add_block(int, int, int, int, int)': video/mmx.h:384:9: error: invalid 'asm': invalid constraints for operand 384 | __asm__ __volatile__ (#op " %%" #reg ", %0" \ | ^~~~~~~ video/mmx.h:406:33: note: in expansion of macro 'mmx_r2m' 406 | #define movq_r2m(reg, var) mmx_r2m(movq, reg, var) | ^~~~~~~ video/slice.C:208:7: note: in expansion of macro 'movq_r2m' 208 | movq_r2m(mm3,m_(rfp)); /* store rfp[0..7] */ | ^~~~~~~~
Stefan
Sorry, no idea what goes wrong here. Does it compile with -O2, -march=native ? May be aggressive optimizations broke some old calling conventions between asm and C? _______________________________________________
Cin mailing list -- [email protected] To unsubscribe send an email to [email protected]
Op 15-02-2026 om 8:34 p.m. schreef Andrew Randrianasulu:
Sorry, no idea what goes wrong here.
Does it compile with -O2, -march=native ?
May be aggressive optimizations broke some old calling conventions between asm and C?
No, I think it is GCC 15 which is more strict on register usage. The compile fix is rather trivial. But I need a way to check this codepath. -- Stefan
Does it compile with -O2, -march=native ?
May be aggressive optimizations broke some old calling conventions between asm and C?
No, I think it is GCC 15 which is more strict on register usage. The compile fix is rather trivial. But I need a way to check this codepath.
Just FYI, compiling with whatever the default optimization level (used in CinGG) with gcc version 15.2.1 on Fedora 42 does not report this error. Although I do not know how to check the codepath to make sure slice/mmx is utilized, it could just be loading/playing/rendering not using ffmpeg, but rather "use ffmpeg last" for loading and rendering "generic mpeg2".
Op 19-02-2026 om 1:19 a.m. schreef Phyllis Smith via Cin:
Just FYI, compiling with whatever the default optimization level (used in CinGG) with gcc version 15.2.1 on Fedora 42 does not report this error. Although I do not know how to check the codepath to make sure slice/mmx is utilized, it could just be loading/playing/rendering not using ffmpeg, but rather "use ffmpeg last" for loading and rendering "generic mpeg2".
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. -- Stefan
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. Just as an experiment and for fun I tried compiling --without-libzmpeg (either O2 or O3), it fails in cinelerra/Makefile with this error:
timebar.h:110:20: note: by ‘static int OutPointGUI::get_y(MWindow*, TimeBar*)’ 110 | static int get_y(MWindow *mwindow, TimeBar *timebar); | ^~~~~ make[2]: Leaving directory '/mnt0/cinelerra-5.1/cinelerra' make[1]: *** [Makefile:600: all-recursive] Error 1 make[1]: Leaving directory '/mnt0/cinelerra-5.1' make: *** [Makefile:547: all] Error 2
чт, 19 февр. 2026 г., 22:21 Phyllis Smith via Cin < [email protected]>:
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. Just as an experiment and for fun I tried compiling --without-libzmpeg (either O2 or O3), it fails in cinelerra/Makefile with this error:
timebar.h:110:20: note: by ‘static int OutPointGUI::get_y(MWindow*, TimeBar*)’ 110 | static int get_y(MWindow *mwindow, TimeBar *timebar); | ^~~~~ make[2]: Leaving directory '/mnt0/cinelerra-5.1/cinelerra' make[1]: *** [Makefile:600: all-recursive] Error 1 make[1]: Leaving directory '/mnt0/cinelerra-5.1' make: *** [Makefile:547: all] Error 2
I think you cut out real error earlier .... I usually disable all dvb/v4l2/libzmpeg together but this is a bit drastic because I think dvb part still useful for you.
_______________________________________________ Cin mailing list -- [email protected] To unsubscribe send an email to [email protected]
Op 19-02-2026 om 8:42 p.m. schreef Andrew Randrianasulu via Cin:
чт, 19 февр. 2026 г., 22:21 Phyllis Smith via Cin <[email protected] gg.org <mailto:[email protected]>>:
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") The failing part without-zmpeg I found too. ...does the Cinelerra git work for any of you? Stefan
чт, 19 февр. 2026 г., 23:03 Stefan de Konink via Cin < [email protected]>:
Op 19-02-2026 om 8:42 p.m. schreef Andrew Randrianasulu via Cin:
чт, 19 февр. 2026 г., 22:21 Phyllis Smith via Cin <[email protected] gg.org <mailto:[email protected]>>:
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")
The failing part without-zmpeg I found too.
...does the Cinelerra git work for any of you?
On termux/aarch64 and i586 Slackware, where I was working on Vulkan patch. Where it fail?
Stefan _______________________________________________ Cin mailing list -- [email protected] To unsubscribe send an email to [email protected]
...does the Cinelerra git work for any of you?
Yes, are you using the new url?
https://git.cinelerra-gg.org/?a=project_list;pf=goodguy [root@keystone jjjj]# git clone --depth 1
https://git.cinelerra-gg.org/goodguy/cinelerra.git cinelerra Cloning into 'cinelerra'... remote: Enumerating objects: 12008, done. remote: Counting objects: 100% (12008/12008), done. remote: Compressing objects: 100% (9042/9042), done. remote: Total 12008 (delta 3432), reused 10138 (delta 2750), pack-reused 0 Receiving objects: 100% (12008/12008), 172.40 MiB | 2.78 MiB/s, done. Resolving deltas: 100% (3432/3432), done.
Op 19-02-2026 om 9:18 p.m. schreef Phyllis Smith:
https://git.cinelerra-gg.org/?a=project_list;pf=goodguy <https:// git.cinelerra-gg.org/?a=project_list;pf=goodguy>
[root@keystone jjjj]# git clone --depth 1 https://git.cinelerra- gg.org/goodguy/cinelerra.git <https://git.cinelerra-gg.org/goodguy/ cinelerra.git> cinelerra
Thanks! Works for me. -- Stefan
чт, 19 февр. 2026 г., 23:03 Stefan de Konink via Cin < [email protected]>:
Op 19-02-2026 om 8:42 p.m. schreef Andrew Randrianasulu via Cin:
чт, 19 февр. 2026 г., 22:21 Phyllis Smith via Cin <[email protected] gg.org <mailto:[email protected]>>:
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. Another suggestion I found on x264 mail list is to disable -fPIC but not sure if it really good idea. https://x264-devel.videolan.narkive.com/ILCZiFoz/bug-asm-operand-has-impossi...
The failing part without-zmpeg I found too.
...does the Cinelerra git work for any of you?
Stefan _______________________________________________ Cin mailing list -- [email protected] To unsubscribe send an email to [email protected]
чт, 19 февр. 2026 г., 23:33 Andrew Randrianasulu <[email protected]>:
чт, 19 февр. 2026 г., 23:03 Stefan de Konink via Cin < [email protected]>:
Op 19-02-2026 om 8:42 p.m. schreef Andrew Randrianasulu via Cin:
чт, 19 февр. 2026 г., 22:21 Phyllis Smith via Cin <[email protected] gg.org <mailto:[email protected]>>:
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.
Another suggestion I found on x264 mail list is to disable -fPIC but not sure if it really good idea.
https://x264-devel.videolan.narkive.com/ILCZiFoz/bug-asm-operand-has-impossi...
Also https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html in theory it seems m is stricter than X But this is assembly, so I am not sure how it all interacts ....
The failing part without-zmpeg I found too.
...does the Cinelerra git work for any of you?
Stefan _______________________________________________ Cin mailing list -- [email protected] To unsubscribe send an email to [email protected]
Can you test attached patch on your gcc 15.x system with -O3 -march native ? I only changed m2r and r2m cases (considering their names) чт, 19 февр. 2026 г., 23:55 Andrew Randrianasulu <[email protected]>:
чт, 19 февр. 2026 г., 23:33 Andrew Randrianasulu <[email protected]
:
чт, 19 февр. 2026 г., 23:03 Stefan de Konink via Cin < [email protected]>:
Op 19-02-2026 om 8:42 p.m. schreef Andrew Randrianasulu via Cin:
чт, 19 февр. 2026 г., 22:21 Phyllis Smith via Cin <[email protected] gg.org <mailto:[email protected]>>:
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.
Another suggestion I found on x264 mail list is to disable -fPIC but not sure if it really good idea.
https://x264-devel.videolan.narkive.com/ILCZiFoz/bug-asm-operand-has-impossi...
Also
https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html
in theory it seems m is stricter than X
But this is assembly, so I am not sure how it all interacts ....
The failing part without-zmpeg I found too.
...does the Cinelerra git work for any of you?
Stefan _______________________________________________ Cin mailing list -- [email protected] To unsubscribe send an email to [email protected]
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.
participants (3)
-
Andrew Randrianasulu -
Phyllis Smith -
Stefan de Konink