public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bergner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/61193] ABI incompatibility between POWER and Z HTM builtins and intrinsics
Date: Fri, 16 May 2014 03:51:00 -0000	[thread overview]
Message-ID: <bug-61193-4-l4Q4uipShe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61193-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61193

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-05-16
           Assignee|unassigned at gcc dot gnu.org      |bergner at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #4 from Peter Bergner <bergner at gcc dot gnu.org> ---
After discussing this with the XL compiler team, the S390 GCC team and
the Power GCC team, we have decided to leave the incompatibility between
Power and S390.  However, the XL and GCC compilers will be compatible
with each other when targeting the same processor target.  To mitigate
the incompatibility somewhat, we have decided to add a macro to the
powerpc*-linux's htmintrin.h file that defines what the "sucessful"
return status value of the __TM_simple_begin() and __TM_begin() intrinsic
function is.  This macro is already defined in the S390's htmintrin.h
header file and is used by the S390 to determine whether the transaction
was successfully started or not.  By adding the same macro on Power, we
allow users to write common code between Power and S390, even though our
successful return status values are different.

For example, the following code can be used on Power and S390, even
though the actual value returned by __TM_simple_begin() is different.

  if ((tx_state = __TM_simple_begin ()) == _HTM_TBEGIN_STARTED)
    {
      /* Transaction State Initiated.  */
      ...
    }
  else
    {
      /* Transaction State Failed.  */
      ...
    }


  parent reply	other threads:[~2014-05-16  3:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 12:01 [Bug target/61193] New: " bergner at gcc dot gnu.org
2014-05-15 12:03 ` [Bug target/61193] " bergner at gcc dot gnu.org
2014-05-15 12:08 ` bergner at gcc dot gnu.org
2014-05-16  3:44 ` bergner at gcc dot gnu.org
2014-05-16  3:46 ` bergner at gcc dot gnu.org
2014-05-16  3:51 ` bergner at gcc dot gnu.org [this message]
2014-05-16  3:59 ` bergner at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-61193-4-l4Q4uipShe@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).