public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* new_ia32_branch: awkward sequence
@ 1999-07-16 16:31 Toshiyasu Morita
0 siblings, 0 replies; only message in thread
From: Toshiyasu Morita @ 1999-07-16 16:31 UTC (permalink / raw)
To: egcs-bugs
Here's a sequence from adler32.i compiled with -O2.
GCC generates an add to memory, followed by a read from the
memory location back into a register. This is rather awkward.
1051:adler32.i **** buf += 16;
1052:adler32.i **** k -= 16;
107 .LM10:
108 0053 83EE10 subl $16, %esi
110 .LM11:
111 0056 0145FC addl %eax, -4(%ebp) <- here
112 0059 8B45FC movl -4(%ebp), %eax <- here
113 005c 01C1 addl %eax, %ecx
114 005e 0FB64301 movzbl 1(%ebx), %eax
115 0062 0145FC addl %eax, -4(%ebp) <- here
116 0065 8B45FC movl -4(%ebp), %eax <- here
117 0068 01C1 addl %eax, %ecx
118 006a 0FB64302 movzbl 2(%ebx), %eax
119 006e 0145FC addl %eax, -4(%ebp) <- here
120 0071 8B45FC movl -4(%ebp), %eax <- here
121 0074 01C1 addl %eax, %ecx
122 0076 0FB64303 movzbl 3(%ebx), %eax
123 007a 0145FC addl %eax, -4(%ebp) <- here
124 007d 8B45FC movl -4(%ebp), %eax <- here ... etc
125 0080 01C1 addl %eax, %ecx
126 0082 0FB64304 movzbl 4(%ebx), %eax
127 0086 0145FC addl %eax, -4(%ebp)
128 0089 8B45FC movl -4(%ebp), %eax
129 008c 01C1 addl %eax, %ecx
130 008e 0FB64305 movzbl 5(%ebx), %eax
131 0092 0145FC addl %eax, -4(%ebp)
132 0095 8B45FC movl -4(%ebp), %eax
133 0098 01C1 addl %eax, %ecx
134 009a 0FB64306 movzbl 6(%ebx), %eax
135 009e 0145FC addl %eax, -4(%ebp)
136 00a1 8B45FC movl -4(%ebp), %eax
^LGAS LISTING adler32.s page 21
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-07-16 16:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-16 16:31 new_ia32_branch: awkward sequence Toshiyasu Morita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).