https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64895
Iain Sandoe <iains at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |iains at gcc dot gnu.org --- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> --- (IIUC the thread here) It looks to me that the codegen is now DTRT for both pic and non pic. Darwin is doing pic by default, so sees XPASSes There is no Linux pic test (so the change was not noticed there): (I will produce a patch for the tests on the basis that this is now fixed). Linux x86-64 (r271505): Running target unix/-fpic/-m32 Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/iains/gcc-trunk/src-local/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/iains/gcc-trunk/src-local/gcc/testsuite/gcc.target/i386/i386.exp ... XPASS: gcc.target/i386/fuse-caller-save-rec.c scan-assembler-not push XPASS: gcc.target/i386/fuse-caller-save-rec.c scan-assembler-not pop XPASS: gcc.target/i386/fuse-caller-save-rec.c scan-assembler-times addl\t%[re]?dx, %[re]?ax 1 FAIL: gcc.target/i386/fuse-caller-save-xmm.c scan-assembler-times addpd\t\\.?LC0.*, %xmm0 1 XPASS: gcc.target/i386/fuse-caller-save-xmm.c scan-assembler-times addpd\t%xmm1, %xmm0 1 XPASS: gcc.target/i386/fuse-caller-save.c scan-assembler-not push XPASS: gcc.target/i386/fuse-caller-save.c scan-assembler-not pop XPASS: gcc.target/i386/fuse-caller-save.c scan-assembler-times addl\t%[re]?d[ix], %[re]?ax 1 === gcc Summary for unix/-fpic/-m64 === # of expected passes 18 ===== code output below - Darwin produces the same (or equivalent, for m32/pic). ===== (extraneous lines snipped for clarity) fuse-caller-save-rec.c -O2 -fipa-ra -fomit-frame-pointer -fno-optimize-sibling-calls -mregparm=1 -m32 -S {,-fpic} bar: cmpl $4, %eax jg .L9 xorl %eax, %eax ret .L9: subl $12, %esp subl $3, %eax call bar addl $12, %esp ret foo: subl $12, %esp movl %eax, %edx call bar addl $12, %esp addl %edx, %eax ret ===== fuse-caller-save.c -O2 -fipa-ra -fomit-frame-pointer -mregparm=1 -m32 -S {,-fpic} bar: addl $3, %eax ret foo: movl %eax, %edx call bar addl %edx, %eax ret ===== fuse-caller-save-xmm.c -O2 -fipa-ra -fomit-frame-pointer -msse2 -mno-avx -m32 -S bar: addpd .LC0, %xmm0 ret foo: subl $12, %esp movapd %xmm0, %xmm1 call bar addl $12, %esp addpd %xmm1, %xmm0 ret fuse-caller-save-xmm.c -O2 -fipa-ra -fomit-frame-pointer -msse2 -mno-avx -m32 -S -fpic bar: call __x86.get_pc_thunk.ax addl $_GLOBAL_OFFSET_TABLE_, %eax movapd .LC0@GOTOFF(%eax), %xmm1 addpd %xmm1, %xmm0 ret foo: subl $12, %esp movapd %xmm0, %xmm2 call bar addl $12, %esp addpd %xmm2, %xmm0 ret