Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: x86/x64 JIT...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 7 Topic 4637 of 4729
Post > Topic >>

Re: x86/x64 JIT assembler for C++

by "Wolfgang Kern" <spamtrap@[EMAIL PROTECTED] > May 1, 2008 at 10:46 AM

Phil Carmody asked:

beside [...]

> On that note - does anyone know at what point an unconditional
> short jmp forward becomes faster than a sequence of NOPs for
> various popular arch's?

It depends on the CPU's code-prefetch size and decoder capability.

AMD K7/K8 skips up to three NOPS in zero time and run up to 15 Nops
within one cycle if they are within one code-fetch (after any jmp/call/..)
and if this code-fetch wont cross cache bounds.

An 'EB/E9' jump, may take just one cycle or less, but at the jump
target we have to add a full fetch cycle including pre-decode then,
means 2..5 clock-cycles depending on type, size and count of
instructions found there.

During code evaluation, I always have NOPs in the trailing end
of cache-lines and it doesn't affect timing if I jump over half
a line (32 nops), but it speeds things up if I jump over a full
cache-line (usually to the next 64-byte bound).

Don't know how Intel-CPUs behave on this.

__
wolfgang
 




 7 Posts in Topic:
x86/x64 JIT assembler for C++
herumi <spamtrap@[EMAI  2008-04-29 18:27:11 
Re: x86/x64 JIT assembler for C++
"Alexei A. Frounze&q  2008-04-29 22:58:05 
Re: x86/x64 JIT assembler for C++
herumi <spamtrap@[EMAI  2008-04-30 01:11:48 
Re: x86/x64 JIT assembler for C++
Phil Carmody <thefatph  2008-04-30 13:13:00 
Re: x86/x64 JIT assembler for C++
"Wolfgang Kern"  2008-05-01 10:46:05 
Re: x86/x64 JIT assembler for C++
herumi <spamtrap@[EMA  2008-04-30 18:16:58 
Re: x86/x64 JIT assembler for C++
"Alexei A. Frounze&q  2008-04-30 20:16:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 14:57:34 CDT 2008.