r369173 - Reland "[ARM] push LR before __gnu_mcount_nc"

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


Author: jcai19
Date: Fri Aug 16 16:30:16 2019
New Revision: 369173

URL: http://llvm.org/viewvc/llvm-project?rev=369173&view=rev
Log:
Reland "[ARM] push LR before __gnu_mcount_nc"

This relands r369147 with fixes to unit tests.

https://reviews.llvm.org/D65019

Modified:
    cfe/trunk/lib/Basic/Targets/ARM.cpp
    cfe/trunk/test/Frontend/gnu-mcount.c

Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/ARM.cpp?rev=369173&r1=369172&r2=369173&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/ARM.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/ARM.cpp Fri Aug 16 16:30:16 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");

Modified: cfe/trunk/test/Frontend/gnu-mcount.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/gnu-mcount.c?rev=369173&r1=369172&r2=369173&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/gnu-mcount.c (original)
+++ cfe/trunk/test/Frontend/gnu-mcount.c Fri Aug 16 16:30:16 2019
@@ -66,7 +66,7 @@ int f() {
 // CHECK-ARM64-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="__mcount"{{.*}} }
 // CHECK-ARM64-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
 // CHECK-ARM-EABI-MEABI-GNU-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
-// CHECK-ARM-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="llvm.arm.gnu.eabi.mcount"{{.*}} }
 // CHECK-ARM-EABI-RTEMS: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
 // CHECK-ARM-EABI-RTEMS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
 // CHECK-ARM64-EABI-RTEMS: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }




More information about the cfe-commits mailing list