On Sun, Sep 30, 2018 at 6:18 PM Peter Bergner <berg...@linux.ibm.com> wrote: > > On 9/30/18 7:57 PM, H.J. Lu wrote: > > This caused: > > > > FAIL: gcc.target/i386/pr63527.c scan-assembler-not movl[ \t]%[^,]+, %ebx > > FAIL: gcc.target/i386/pr63534.c scan-assembler-not movl[ \t]%[^,]+, %ebx > > FAIL: gcc.target/i386/pr64317.c scan-assembler addl[ > > \\t]+[$]_GLOBAL_OFFSET_TABLE_, %ebx > > FAIL: gcc.target/i386/pr64317.c scan-assembler movl[ \\t]+c@GOTOFF[(]%ebx[)] > > Can you check whether the new generated code is at least as good > as the old generated code? I'm assuming the code we generate now isn't > wrong, just different and maybe we just need to change what we expect > to see.
I checked gcc.target/i386/pr63527.c and it has a regression. Before: 00000000 <foo>: 0: 53 push %ebx 1: e8 fc ff ff ff call 2 <foo+0x2> 6: 81 c3 02 00 00 00 add $0x2,%ebx c: 83 ec 08 sub $0x8,%esp f: e8 fc ff ff ff call 10 <foo+0x10> 14: e8 fc ff ff ff call 15 <foo+0x15> 19: 83 c4 08 add $0x8,%esp 1c: 5b pop %ebx 1d: c3 ret Disassembly of section .text.__x86.get_pc_thunk.bx: 00000000 <__x86.get_pc_thunk.bx>: 0: 8b 1c 24 mov (%esp),%ebx 3: c3 ret After: 00000000 <foo>: 0: 56 push %esi 1: e8 fc ff ff ff call 2 <foo+0x2> 6: 81 c6 02 00 00 00 add $0x2,%esi c: 53 push %ebx d: 83 ec 04 sub $0x4,%esp 10: 89 f3 mov %esi,%ebx 12: e8 fc ff ff ff call 13 <foo+0x13> 17: e8 fc ff ff ff call 18 <foo+0x18> 1c: 83 c4 04 add $0x4,%esp 1f: 5b pop %ebx 20: 5e pop %esi 21: c3 ret Disassembly of section .text.__x86.get_pc_thunk.si: 00000000 <__x86.get_pc_thunk.si>: 0: 8b 34 24 mov (%esp),%esi 3: c3 ret -- H.J.