[Bug rtl-optimization/119171] [15 Regression] error: ‘asm’ operand has impossible constraints or there are not enough registers
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 11 12:31:18 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119171
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:06440e726acfa9c9695a07dc524a832a53057ad6
commit r15-7957-g06440e726acfa9c9695a07dc524a832a53057ad6
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Mar 9 07:00:23 2025 -0700
i386: Verify that argument registers are spilled properly
While working on a local x86 patch, which passed the GCC testsuite, I got
a compiler error:
In function âparavirt_read_msrâ,
inlined from âperf_ibs_handle_irqâ at
arch/x86/events/amd/ibs.c:1055:2:
./arch/x86/include/asm/paravirt_types.h:397:17: error: âasmâ operand
has impossible constraints or there are not enough registers
397 | asm volatile(ALTERNATIVE(PARAVIRT_CALL,
ALT_CALL_INSTR, \
| ^~~
when building x86-64 Linux kernel. RDI, RSI, RDX and RCX registers are
used to pass arguments in 64-bit mode. EAX, EDX and ECX registers are
used to pass arguments in 32-bit mode. But there is no coverage in the
GCC testsuite. Add tests to verify that argument registers are spilled
properly.
PR target/119171
* gcc.target/i386/pr119171-1.c: New test.
* gcc.target/i386/pr119171-2.c: Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
More information about the Gcc-bugs
mailing list