This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] S/390: Hardware transactional memory support
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 15 Jul 2013 21:32:31 +0200
- Subject: Re: [PATCH] S/390: Hardware transactional memory support
- References: <20130621102314 dot GA753 at bart>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jun 21, 2013 at 12:23:14PM +0200, Andreas Krebbel wrote:
> the attached patch implements support for hardware transactional
> memory in the S/390 backend.
> The transactional execution facility has been made available with IBM
> Enterprise EC12. Documentation can be found in the Principles of
> Operation manual:
> The patch implements a set of GCC style builtins as well as the
> builtins provided with the IBM XL compiler for compatibility reasons.
> The GCC builtins are used to implement HTM support in libitm. All
> libitm testcases succeed with this patch applied (and some libitm
> bugfixes from Torvald Riegel).
> The builtins are enabled by default when compiling with -march=zEC12.
> They can be disabled with the -mno-htm switch.
> Bootstrapped and regtested on s390 and s390x (configured with
> Any comments?
Have you considered trying it to work even when libitm itself isn't built
for zEC12 or later only? I mean, both the i?86/x86_64 and powerpc* libitm
HTM don't define htm_available as unconditional true, they check in some way
whether the CPU supports HTM and return true if yes, and as needed some
parts or whole of libitm is compiled with some compiler option that
allows the HTM instructions to be generated.
I see your patch will currently error out if you have HTM builtins
insode of code, -mtx and don't enable -march=zEC12, could that be changed,
so that -mtx is essentially independent on the chosen CPU?