r369147 - [ARM] push LR before __gnu_mcount_nc

Jian Cai via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 16 13:21:08 PDT 2019


Author: jcai19
Date: Fri Aug 16 13:21:08 2019
New Revision: 369147

URL: http://llvm.org/viewvc/llvm-project?rev=369147&view=rev
Log:
[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

Modified:
    cfe/trunk/lib/Basic/Targets/ARM.cpp

Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/ARM.cpp?rev=369147&r1=369146&r2=369147&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/ARM.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/ARM.cpp Fri Aug 16 13:21:08 2019
@@ -322,7 +322,7 @@ ARMTargetInfo::ARMTargetInfo(const llvm:
   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");




More information about the cfe-commits mailing list