[Bug target/68910] New: SPARC/cypress: Poor code generation, huge stack frame
sebastian.huber@embedded-brains.de
gcc-bugzilla@gcc.gnu.org
Tue Dec 15 09:56:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68910
Bug ID: 68910
Summary: SPARC/cypress: Poor code generation, huge stack frame
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sebastian.huber@embedded-brains.de
Target Milestone: ---
Created attachment 37036
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37036&action=edit
Test case.
The code for the SHA512_Transform() function is very poor for the SPARC cypress
target.
sparc-rtems4.12-gcc -c -O2 sha512c.i -mcpu=cypress
sha512c.o: file format elf32-sparc
Disassembly of section .text:
00000000 <SHA512_Transform>:
0: 9d e3 b0 58 save %sp, -4008, %sp
4: 94 10 20 80 mov 0x80, %o2
8: 92 10 00 19 mov %i1, %o1
c: 90 07 bd 80 add %fp, -640, %o0
[...]
10c: 40 00 00 00 call 10c <SHA512_Transform+0x10c>
110: 90 07 bd 40 add %fp, -704, %o0
114: c0 27 bd 20 clr [ %fp + -736 ]
118: c0 27 bd 24 clr [ %fp + -732 ]
11c: c0 27 bd 10 clr [ %fp + -752 ]
120: c0 27 bd 14 clr [ %fp + -748 ]
124: c0 27 bd 08 clr [ %fp + -760 ]
128: c0 27 bd 0c clr [ %fp + -756 ]
12c: c0 27 bd 00 clr [ %fp + -768 ]
130: c0 27 bd 04 clr [ %fp + -764 ]
134: c0 27 bc f8 clr [ %fp + -776 ]
138: c0 27 bc fc clr [ %fp + -772 ]
[...]
Compared to v8:
sparc-rtems4.12-gcc -c -O2 sha512c.i -mcpu=v8
00000000 <SHA512_Transform>:
0: 9d e3 bc b8 save %sp, -840, %sp
4: 94 10 20 80 mov 0x80, %o2
8: 92 10 00 19 mov %i1, %o1
c: 90 07 bd 80 add %fp, -640, %o0
10: 40 00 00 00 call 10 <SHA512_Transform+0x10>
14: f0 27 a0 44 st %i0, [ %fp + 0x44 ]
[...]
No massive clr instructions.
More information about the Gcc-bugs
mailing list