aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.cc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-03-09 07:00:23 -0700
committerH.J. Lu <hjl.tools@gmail.com>2025-03-11 05:30:57 -0700
commit06440e726acfa9c9695a07dc524a832a53057ad6 (patch)
tree5c888ce929b08f81d883136a8ea1012754ca6568 /gcc/c/c-parser.cc
parent86eb3fb520b2a2026f6816ab51b88180b85d6882 (diff)
downloadgcc-06440e726acfa9c9695a07dc524a832a53057ad6.zip
gcc-06440e726acfa9c9695a07dc524a832a53057ad6.tar.gz
gcc-06440e726acfa9c9695a07dc524a832a53057ad6.tar.bz2
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>
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions