On 2016-09-25, at 4:09 AM, Niko Tyni wrote: > - building with gcc-5 or at -O0 makes it go away > - I've bisected with gcc #pragmas that disabling optimization for just > Perl_custom_op_register() in op.c makes it go away > - I haven't managed to find which specific optimization causes it
Attached is the diff in assembly output for Perl_custom_op_register compiled with gcc-5 and gcc-6, respectively. This is with 5.22.2 which I happened to have handy. The differences are just label changes and I don't see any functional difference in the assembly. Dave -- John David Anglin dave.ang...@bell.net
--- op.s-5-op_reg 2016-09-25 15:09:24.274823706 -0400 +++ op.s-6-op_reg 2016-09-25 15:06:37.273864748 -0400 @@ -7,7 +7,7 @@ .PROC .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=7 .ENTRY -.LVL1221: +.LVL1222: stw %r2,-20(%r30) .loc 1 14168 0 ldi 0,%r23 @@ -21,7 +21,7 @@ copy %r24,%r6 .loc 1 14168 0 copy %r25,%r24 -.LVL1222: +.LVL1223: .loc 1 14162 0 stw %r4,-116(%r30) stw %r3,-112(%r30) @@ -32,23 +32,23 @@ .loc 1 14168 0 bl Perl_newSViv,%r2 copy %r26,%r3 -.LVL1223: +.LVL1224: copy %r3,%r26 bl Perl_sv_2mortal,%r2 copy %r28,%r25 -.LVL1224: +.LVL1225: .loc 1 14170 0 ldw 2024(%r3),%r4 -.LVL1225: - comib,= 0,%r4,.L2023 +.LVL1226: + comib,= 0,%r4,.L2026 copy %r28,%r7 -.L2021: +.L2024: .loc 1 14173 0 ldi 0,%r23 copy %r6,%r24 bl Perl_newSViv,%r2 copy %r3,%r26 -.LVL1226: +.LVL1227: stw %r0,-68(%r30) ldi 4,%r19 stw %r28,-64(%r30) @@ -60,44 +60,44 @@ copy %r3,%r26 bl Perl_hv_common,%r2 stw %r0,-52(%r30) -.LVL1227: - comib,= 0,%r28,.L2024 +.LVL1228: + comib,= 0,%r28,.L2027 ldw -148(%r30),%r2 .loc 1 14175 0 ldw -124(%r30),%r6 -.LVL1228: +.LVL1229: ldw -120(%r30),%r5 ldw -116(%r30),%r4 ldw -112(%r30),%r3 -.LVL1229: .LVL1230: +.LVL1231: bv %r0(%r2) ldwm -128(%r30),%r7 -.LVL1231: -.L2023: -.LBB2498: +.LVL1232: +.L2026: +.LBB2505: .loc 1 14171 0 ldi 12,%r25 bl Perl_newSV_type,%r2 copy %r3,%r26 -.LVL1232: -.LBE2498: +.LVL1233: +.LBE2505: stw %r28,2024(%r3) - b .L2021 + b .L2024 copy %r28,%r4 -.LVL1233: -.L2024: -.LBB2499: -.LBB2500: +.LVL1234: +.L2027: +.LBB2506: +.LBB2507: .loc 1 14174 0 ldil LR'.LC61,%r25 ldw 4(%r6),%r24 ldo RR'.LC61(%r25),%r25 bl Perl_croak,%r2 copy %r3,%r26 -.LVL1234: -.LBE2500: -.LBE2499: +.LVL1235: +.LBE2507: +.LBE2506: nop .EXIT .PROCEND