1

From the Intel Manual:

The processor attempts to commit the HLE execution, when [...].

If execution cannot commit atomically, then execution transitions to a non-transactional execution without elision as if the first instruction did not have an XAQUIRE prefix.

Did I read that correctly? Basically "try to do it transactionally, but if you can't, I don't care if you do it anyway"?

If so, what's the point in having the HLE extension at all if it may randomly decide to behave as if it didn't exist?

Community
  • 1
  • 1
User1291
  • 7,664
  • 8
  • 51
  • 108
  • The manual emphasizes that this extension is _only_ for performance reasons, there is no functional difference if it is used or not. – Ctx Nov 06 '17 at 14:18
  • @Ctx I had not caught that. Thank you. Want to make an answer out of it? – User1291 Nov 06 '17 at 14:32
  • 1
    If it fails to commit, it rolls everything back and re-runs the code, ignoring the `XAQUIRE` prefix the 2nd time. If you use RTM instead of HLE, abort results in a jump to the address given to `xbegin`, where you can choose what happens. (see https://stackoverflow.com/questions/36898325/does-an-aborted-xbegin-transaction-restore-the-stack-context-that-existed-at-the for a trivial example that retries) – Peter Cordes Nov 06 '17 at 14:57

0 Answers0