Pedro wrote: > From the Intel's manual (253666.pdf): > "Branch hint prefixes (2EH, 3EH) allow a program to give a hint to the > processor about the most likely code path for a branch. Use these prefixes > only with conditional branch instructions (Jcc)." > > 1) Are they generated by any C compiler? > 2) How to give the hint to the compiler? > 3) Are they present in AMD's CPUs?
Probably found in those compilers that support what is known as "Instrumentation". Most of the latest incarnations of C/C++ compilers have this feature. I know Visual Studio 2008 Professional has the feature. Essentially, you instrument a build, run it a number of times down the most common code paths people will take, then you recompile the program using the instrumentation information during the build to generate a build optimized for those code paths. I suspect during the second build, things such as those branch hints are added. AMD probably supports the prefixes. They make "Intel-compatible" CPUs with very minor deviations in the instruction set - after all, they ARE the underdog and have to be able to run Windows ;) -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
