[PATCH][RFC] Fix __alignof__ of global variables on SystemZ

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Tue Apr 21 10:29:58 PDT 2015


Checked in as rev. 235395.

Thanks for the review!


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand | Phone: +49-7031/16-3727
  STSM, GNU/Linux compilers and toolchain
  IBM Deutschland Research & Development GmbH
  Vorsitzende des Aufsichtsrats: Martina Koederitz | Geschäftsführung: Dirk
Wittkopp
  Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
Stuttgart, HRB 243294



From:	Richard Smith <richard at metafoo.co.uk>
To:	Ulrich Weigand/Germany/IBM at IBMDE
Cc:	llvm cfe <cfe-commits at cs.uiuc.edu>
Date:	21.04.2015 00:02
Subject:	Re: [PATCH][RFC] Fix __alignof__ of global variables on SystemZ
Sent by:	metafoo at gmail.com



LGTM

On Mon, Mar 30, 2015 at 11:21 AM, Ulrich Weigand <Ulrich.Weigand at de.ibm.com
> wrote:


  Hello,

  SystemZ prefers to align all global variables to two bytes, which is
  implemented by setting the TargetInfo member MinGlobalAlign.

  However, for compatibility with existing compilers this should *not*
  change the ABI alignment value as retrieved via __alignof__, which
  it currently does.

  This patch fixes the issue by having ASTContext::getDeclAlign ignore
  the MinGlobalAlign setting in the ForAlignof case.

  Since SystemZ is the only platform setting MinGlobalAlign, this should
  cause no change for any other target.

  (See attached file: clang-align-global)


  Mit freundlichen Gruessen / Best Regards

  Ulrich Weigand

  --
    Dr. Ulrich Weigand | Phone: +49-7031/16-3727
    STSM, GNU/Linux compilers and toolchain
    IBM Deutschland Research & Development GmbH
    Vorsitzende des Aufsichtsrats: Martina Koederitz | Geschäftsführung:
  Dirk
  Wittkopp
    Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
  Stuttgart, HRB 243294
  _______________________________________________
  cfe-commits mailing list
  cfe-commits at cs.uiuc.edu
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits








More information about the cfe-commits mailing list