operand sizes and clock cicle.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

operand sizes and clock cicle.

Post by digo_rp »

hi guys, i would like to know where can I find some docs "intel/amd" about operand size and how much clock cicle that operand takes.

as my english is so poor I´m trying to have a help with this forum

my question is something like that:

wich is better?

mov eax, _xxx_handler
call eax

----- or -----

call _xxx_handler

?

I saw, don´t know where that call addr takes about 20 cicles os clock

and call reg, takes only 2-4 bytes

is that right ?
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

The second, in about any case, since it's a fixed jump. The first might be seen as an unpredictable jump and in worst-case could cause a pipeline flush, making for about 30 cycles of delay on a NetBurst-cpu.

Instructions don't have a cycle count anymore on current machines, they have, at best, a cycle latency. They're too unpredictable and unreliable to use for any sort of instruction ordering. Why do you care about sub-nanosecond offsets by the way?
User avatar
kataklinger
Member
Member
Posts: 381
Joined: Fri Nov 04, 2005 12:00 am
Location: Serbia

Post by kataklinger »

You may want to look at "Intel Architectecture Optimization Reference Manual". I don't know if AMD has simular manual.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

For AMD: the top two hits at google: http://www.google.nl/search?client=fire ... gle+zoeken
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

tnx so much

Post by digo_rp »

tnx so much
Post Reply