[all-commits] [llvm/llvm-project] efdd0a: [clang][Sparc] Fix __builtin_extract_return_addr etc.

rorth via All-commits all-commits at lists.llvm.org
Wed Feb 2 10:20:51 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: efdd0a29b7eb6f3b6ca3fe9182a6c1085806c73a
      https://github.com/llvm/llvm-project/commit/efdd0a29b7eb6f3b6ca3fe9182a6c1085806c73a
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M clang/lib/CodeGen/TargetInfo.cpp
    M clang/test/CodeGen/builtins-sparc.c

  Log Message:
  -----------
  [clang][Sparc] Fix __builtin_extract_return_addr etc.

While investigating the failures of `symbolize_pc.cpp` and
`symbolize_pc_inline.cpp` on SPARC (both Solaris and Linux), I noticed that
`__builtin_extract_return_addr` is a no-op in `clang` on all targets, while
`gcc` has non-default implementations for arm, mips, s390, and sparc.

This patch provides the SPARC implementation.  For background see
`SparcISelLowering.cpp` (`SparcTargetLowering::LowerReturn_32`), the SPARC
psABI p.3-12, `%i7` and p.3-16/17, and SCD 2.4.1, p.3P-10, `%i7` and
p.3P-15.

Tested (after enabling the `sanitizer_common` tests on SPARC) on
`sparcv9-sun-solaris2.11`.

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




More information about the All-commits mailing list