touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #78059
[Bug 1320292] Re: ABI incompatibility between POWER and Z HTM builtins and intrinsics
Hello Peter, or anyone else affected,
Accepted gcc-4.8 into trusty-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/gcc-4.8/4.8.4-2ubuntu1~14.04 in a
few hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed. Your feedback will aid us getting this update
out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, and change the tag
from verification-needed to verification-done. If it does not fix the
bug for you, please add a comment stating that, and change the tag to
verification-failed. In either case, details of your testing will help
us make a better decision.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance!
** Changed in: gcc-4.8 (Ubuntu Trusty)
Status: New => Fix Committed
** Tags added: verification-needed
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gcc-4.8 in Ubuntu.
https://bugs.launchpad.net/bugs/1320292
Title:
ABI incompatibility between POWER and Z HTM builtins and intrinsics
Status in gcc-4.8 package in Ubuntu:
Fix Released
Status in gcc-4.9 package in Ubuntu:
Fix Released
Status in gccgo-4.9 package in Ubuntu:
Invalid
Status in gcc-4.8 source package in Trusty:
Fix Committed
Status in gcc-4.9 source package in Trusty:
Invalid
Status in gccgo-4.9 source package in Trusty:
Fix Released
Status in gcc-4.8 source package in Utopic:
Fix Released
Status in gcc-4.9 source package in Utopic:
Fix Released
Status in gccgo-4.9 source package in Utopic:
Invalid
Bug description:
The IBM XL team defined a set of HTM intrinsic functions that were supposed
to be API compatible across the XL and GCC compilers on both Power and S390.
PR61193 describes an issue where the functions that begin a transaction
are incompatible. The Power intrinsics return non-zero on success, while
the S390 intrinsics return zero on success.
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 "successful"
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. */
...
}
David approved this offline, so I'm committing this to GCC mainline as
revision 210486, as well as the 4.9 (210487) and 4.8 (210488)
branches.
Peter
PR target/61193
* config/rs6000/htmxlintrin.h (_HTM_TBEGIN_STARTED): New define.
(__TM_simple_begin): Use it.
(__TM_begin): Likewise.
Index: gcc/config/rs6000/htmxlintrin.h
===================================================================
--- gcc/config/rs6000/htmxlintrin.h (revision 210485)
+++ gcc/config/rs6000/htmxlintrin.h (working copy)
@@ -46,12 +46,17 @@ extern "C" {
typedef char TM_buff_type[16];
+/* Compatibility macro with s390. This macro can be used to determine
+ whether a transaction was successfully started from the __TM_begin()
+ and __TM_simple_begin() intrinsic functions below. */
+#define _HTM_TBEGIN_STARTED 1
+
extern __inline long
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
__TM_simple_begin (void)
{
if (__builtin_expect (__builtin_tbegin (0), 1))
- return 1;
+ return _HTM_TBEGIN_STARTED;
return 0;
}
@@ -61,7 +66,7 @@ __TM_begin (void* const TM_buff)
{
*_TEXASRL_PTR (TM_buff) = 0;
if (__builtin_expect (__builtin_tbegin (0), 1))
- return 1;
+ return _HTM_TBEGIN_STARTED;
#ifdef __powerpc64__
*_TEXASR_PTR (TM_buff) = __builtin_get_texasr ();
#else
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1320292/+subscriptions