This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386] RTM support


On Mon, Feb 20, 2012 at 07:27:48PM +0100, Uros Bizjak wrote:
> IIUC the documentation, the fallback label is a parameter to xbegin
> insn, but the insn itself doesn't jump anywhere - it just records the
> parameter as a fallback address. However, there is no guarantee that
> the fallback code is exactly at (pc)+6, so we have to use asm labels
> here.

6 bytes is the length of the xbegin instruction, so xbegin .+6
says that it has the fallback address at the immediately next insn
after xbegin.  Which is the _xbegin () semantics.
One would use it as
if (_xbegin () != 0xffffffff)
  {
    fallback_txn_aborted;
  }
else
  {
    txn_code;
    _xend ();
  }

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]