Jelajahi Sumber

[ARM] push LR before __gnu_mcount_nc

Push LR register before calling __gnu_mcount_nc as it expects the value of LR register to be the top value of
the stack on ARM32.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369147 91177308-0d34-0410-b5e6-96231b3b80d8
Jian Cai 6 tahun lalu
induk
melakukan
b6c8b7a25a
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      lib/Basic/Targets/ARM.cpp

+ 1 - 1
lib/Basic/Targets/ARM.cpp

@@ -322,7 +322,7 @@ ARMTargetInfo::ARMTargetInfo(const llvm::Triple &Triple,
   if (Triple.getOS() == llvm::Triple::Linux ||
       Triple.getOS() == llvm::Triple::UnknownOS)
     this->MCountName = Opts.EABIVersion == llvm::EABI::GNU
-                           ? "\01__gnu_mcount_nc"
+                           ? "llvm.arm.gnu.eabi.mcount"
                            : "\01mcount";
 
   SoftFloatABI = llvm::is_contained(Opts.FeaturesAsWritten, "+soft-float-abi");