https://sourceware.org/bugzilla/show_bug.cgi?id=30578
Bug ID: 30578 Summary: libavcodec/x86/mathops.h:125: Error: operand type mismatch for ` shr' Product: binutils Version: 2.41 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: mh-sourceware at glandium dot org Target Milestone: --- Created attachment 14942 --> https://sourceware.org/bugzilla/attachment.cgi?id=14942&action=edit Generated assembly This is a "regression" from: commit c34d1cc9200ae24dc7572aaf77d80276c0490e9b Author: Jan Beulich <jbeul...@suse.com> Date: Fri Feb 24 13:56:57 2023 +0100 x86: restrict insn templates accepting negative 8-bit immediates The code that fails to assemble comes from inline assembly from ffmpeg, and compiled with GCC. I'm going to attach both the preprocessed C source, and the generated assembly. The failing instructions look like: shrl $-8, %eax which, considering the commit, it not too surprising. The corresponding code in C looks like: static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ __asm__ ("shrl %1, %0\n\t" : "+r" (a) : "ic" ((uint8_t)(-s)) ); return a; } The question is open whether this is a problem in GCC, GAS, or ffmpeg. One could argue in any direction, I guess. I'm starting with GAS, since it's a change there that started this. -- You are receiving this mail because: You are on the CC list for the bug.