* Loop unrolling Problem !!
@ 2002-07-24 20:24 Aladdin Chang
0 siblings, 0 replies; only message in thread
From: Aladdin Chang @ 2002-07-24 20:24 UTC (permalink / raw)
To: gcc-help
hi,
I compiler the source main.c with m68k-elf-gcc(gcc-3.0.4 and binutils-2.12)
and dissemble the binary file, we can find that the code inside the
infinte
loop while(1) j = 10 and i = 10 have two copy in binary file.
Is there any option to avoid this kind of duplication and
where to find the source related with.
thanks,
By the way, I compiled the source with following command
m68k-elf-gcc -m68000 -nostartfiles -gstabs+ -nostdlib -fno-unroll-loops -c
main.c
SOURCE: main.c
================================
main ()
{
int j = 10;
int i = 10;
while(1)
{
j = 10;
i = 10;
}
}
Disassemble:
========================================
main ()
{
400: 4e56 fff8 linkw %fp,#-8
int j = 10;
404: 700a moveq #10,%d0
406: 2d40 fffc movel %d0,%fp@(-4)
int i = 10;
40a: 2d40 fff8 movel %d0,%fp@(-8)
while(1)
{
j = 10;
40e: 2d40 fffc movel %d0,%fp@(-4)
i = 10;
412: 2d40 fff8 movel %d0,%fp@(-8)
416: 700a moveq #10,%d0
418: 2d40 fffc movel %d0,%fp@(-4)
41c: 2d40 fff8 movel %d0,%fp@(-8)
420: 60f4 bras 416 <main+0x16>
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-25 3:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-24 20:24 Loop unrolling Problem !! Aladdin Chang
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).