[all-commits] [llvm/llvm-project] 5061eb: [Sparc] Don't define __sparcv9 and __sparcv9__ whe...

John Paul Adrian Glaubitz via All-commits all-commits at lists.llvm.org
Fri Jan 21 09:57:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5061eb6b0121af11a784d92e2dee5996858d04cd
      https://github.com/llvm/llvm-project/commit/5061eb6b0121af11a784d92e2dee5996858d04cd
  Author: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M clang/lib/Basic/Targets/Sparc.cpp
    M clang/test/Preprocessor/predefined-arch-macros.c

  Log Message:
  -----------
  [Sparc] Don't define __sparcv9 and __sparcv9__ when targeting V8+

Currently, clang defines the three macros __sparcv9, __sparcv9__
and __sparc_v9__ when targeting the V8+ baseline, i.e. using the
V9 instruction set on a 32-bit target.

Since neither gcc nor SolarisStudio define __sparcv9 and __sparcv9__
when targeting V8+, some existing code such as the glibc breaks when
defining either of these two macros on a 32-bit target as they are
used to detect a 64-bit target. Update the tests accordingly.

Fixes PR49562.

Reviewed By: jrtc27, MaskRay, hvdijk

Differential Revision: https://reviews.llvm.org/D98574




More information about the All-commits mailing list