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] S/390: Hardware transactional memory support


On Mon, 2013-07-15 at 21:32 +0200, Jakub Jelinek wrote:
> 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?

Now that you mention this, my Power HTM patch enabled other ISA flags too,
if you used -mhtm.  Like so:

   /* For the newer switches (vsx, dfp, etc.) set some of the older options,
      unless the user explicitly used the -mno-<option> to disable the code.  */
-  if (TARGET_P8_VECTOR || TARGET_DIRECT_MOVE || TARGET_CRYPTO)
+  if (TARGET_P8_VECTOR || TARGET_DIRECT_MOVE || TARGET_CRYPTO || TARGET_HTM)
     rs6000_isa_flags |= (ISA_2_7_MASKS_SERVER & ~rs6000_isa_flags_explicit);

I think I agree with you that we shouldn't do that, since adding in
those extra flags with -mhtm basically means libitm can only really
run on a power8 system instead of the default -mcpu system.

David, do you prefer reverting the above hunk from the Power HTM
patch or should I add the associated -mno-* options to the building
of libitm?

Peter



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