This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/70359] [6 Regression] Code size increase for ARM compared to gcc-5.3.0


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70359

--- Comment #15 from Fredrik Hederstierna <fredrik.hederstierna@securitas-direct.com> ---
Created attachment 38185
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38185&action=edit
tok.c

I took another example for CSiBE and stripped it down. I'm not 100% sure it is
the exact same issue, but looks similar so I attached it.

This gives bigger code for -Os -mcpu=arm966e-s -marm, and also for
-mcpu=cortex-m3, though arm7tdmi and cortex-m0 resulted in small code.

gcc 5.3.0:

00000000 <test>:
   0:   e92d4010        push    {r4, lr}
   4:   e1a04000        mov     r4, r0
   8:   ebfffffe        bl      0 <next>
   c:   e3500000        cmp     r0, #0
  10:   0a000003        beq     24 <test+0x24>
  14:   e59f002c        ldr     r0, [pc, #44]   ; 48 <test+0x48>
  18:   ebfffffe        bl      0 <dump>
  1c:   e1a00004        mov     r0, r4
  20:   eafffff8        b       8 <test+0x8>
  24:   e1a00004        mov     r0, r4
  28:   ebfffffe        bl      0 <next>
  2c:   e3500000        cmp     r0, #0
  30:   0a000002        beq     40 <test+0x40>
  34:   e59f000c        ldr     r0, [pc, #12]   ; 48 <test+0x48>
  38:   ebfffffe        bl      0 <dump>
  3c:   eafffff8        b       24 <test+0x24>
  40:   e1a00004        mov     r0, r4
  44:   e8bd8010        pop     {r4, pc}
  48:   00000000        andeq   r0, r0, r0

master:

00000000 <test>:
   0:   e92d4070        push    {r4, r5, r6, lr}
   4:   e1a04000        mov     r4, r0
   8:   ebfffffe        bl      0 <next>
   c:   e59f5048        ldr     r5, [pc, #72]   ; 5c <test+0x5c>
  10:   e3500000        cmp     r0, #0
  14:   1a000006        bne     34 <test+0x34>
  18:   e1a00004        mov     r0, r4
  1c:   ebfffffe        bl      0 <next>
  20:   e59f5034        ldr     r5, [pc, #52]   ; 5c <test+0x5c>
  24:   e3500000        cmp     r0, #0
  28:   1a000006        bne     48 <test+0x48>
  2c:   e1a00004        mov     r0, r4
  30:   e8bd8070        pop     {r4, r5, r6, pc}
  34:   e1a00005        mov     r0, r5
  38:   ebfffffe        bl      0 <dump>
  3c:   e1a00004        mov     r0, r4
  40:   ebfffffe        bl      0 <next>
  44:   eafffff1        b       10 <test+0x10>
  48:   e1a00005        mov     r0, r5
  4c:   ebfffffe        bl      0 <dump>
  50:   e1a00004        mov     r0, r4
  54:   ebfffffe        bl      0 <next>
  58:   eafffff1        b       24 <test+0x24>
  5c:   00000000        andeq   r0, r0, r0

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]