* Compiling with optimization
@ 2000-12-04 7:04 Jens-Christian Lache
0 siblings, 0 replies; only message in thread
From: Jens-Christian Lache @ 2000-12-04 7:04 UTC (permalink / raw)
To: crossgcc
Hi! I still have problems with the compiler-switches.
I have written a program, which should measure how many clock-ticks
a multiply&acc. (mla) operation takes on my arm7tdmi-cpu. If I do not
use -O2, I get a big measure-overhead and three clock-ticks
for a "mla", which is the correct value. If I use optimization, I get a
small overhead, but an average of 4.5 clock-ticks:
without -O2
Breakpoint 2, main () at multiplikation.mla.mess0bis32.c:75
# mla and Timer-Ticks: 0 15
# mla and Timer-Ticks: 1 17
# mla and Timer-Ticks: 4 27
# mla and Timer-Ticks: 8 38
# mla and Timer-Ticks: 16 66
# mla and Timer-Ticks: 32 110
summe: 6
with -O2
Breakpoint 2, main () at multiplikation.mla.mess0bis32.c:77
# mla and Timer-Ticks: 0 2
# mla and Timer-Ticks: 1 6
# mla and Timer-Ticks: 4 20
# mla and Timer-Ticks: 8 38
# mla and Timer-Ticks: 16 78
# mla and Timer-Ticks: 32 146
summe: 6
I compile with:
arm-elf-gcc -mapcs-32 -mapcs-frame -mcpu=arm7tdmi -DAT91M40400 -DDEBUG\
-I/home/hiwi/lache/c/Include -O2 -o multiplikation.mla.mess0bis32.arm\
-Wl,-T/home/hiwi/lache/c/linker/linker.script.sc \
multiplikation.mla.mess0bis32.c
arm-elf-gcc -mapcs-32 -mapcs-frame -mcpu=arm7tdmi -DAT91M40400\
-DDEBUG -I/home/hiwi/lache/c/Include -S -O2
multiplikation.mla.mess0bis32.c
The funny thing is, that the assembler looks allright...
What can that be?
Jens-Christian
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-04 7:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-04 7:04 Compiling with optimization Jens-Christian Lache
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).