hint?

Henio Paszczak <[email protected]>
Newsgroups gmane.linux.assembly
Message-ID <[email protected]>
Hi.
I've read hint in some magazine that if you are not
using the same registers in following lines new
procesor ( my is quite old PIII(coppermine)600Mhz )
can make commands syumyltaniously ie:

mov %eax,%ebx
mov %ecx,%edx

can be does allmost in the same time. i've check it by
using extremly simple example:

movl $3,%ebx
movl $3,%edx
movl $0b111111111111111111111111111,%ecx

loop:
sall $2,%eax
orl  %ebx,%eax
sall $2,%edi
orl  %edx,%edi
   loop loop

it works ( agains theorem from magazine ) faster then

movl $3,%ebx
movl $3,%edx
movl $0b111111111111111111111111111,%ecx

loop:
sall $2,%eax
sall $2,%edi
orl  %ebx,%eax
orl  %edx,%edi
   loop loop

so what is real answer ?
Secund i'he allways trying not to use moemory becouse
its extremly slow .

nut again if i exchange walue between registers with
using temporary memory:

movl %eax,temp
movl %ebx,%eax,
movl temp,%ebx

it works faster than:

movl %eax,%edx
movl %ebx,%eax,
movl %edx,%ebx

WHY? maybe linux is doing something in the mean time
... ?

amaizing hink is that 

xchgl %eax,%ebx

works slowest :) WHY ?

I realy need time in my programs thats why i'm looking
for any optimalization...

Lukas
 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.