Branch Hint Prefix (x86)

b3nny
2010-03-17
2013-06-04
  • b3nny
    b3nny
    2010-03-17

    How do i prefix branch hints 2EH/3EH before a conditional jump ?

    and secondary:

    It seems to be a mystery whether AMD makes use of these branch hints or not,
    does anyone know the facts ?

     
  • Frank Kotler
    Frank Kotler
    2010-03-18

    "cs jc foo" and "ds jc foo", I guess. There was considerable discussion about what these things should be named. My conclusion was that the reason Intel didn't give us names for 'em is that they already had names : cs and ds! You can, of course, "%define" 'em as something else, if it suits you.

    As to who supports them… I can't help you there. My guess is that if a specific processor manual doesn't mention them, it doesn't support them. Maybe some info at http://www.sandpile.org ? My understanding is that if you fail to outsmart the CPU, you can make things considerably worse, so I don't mess with them.

    Best,
    Frank

    hint: everyone's gone to http://forum.nasm.us