]> granicus.if.org Git - clang/commitdiff
Reland "[ARM] push LR before __gnu_mcount_nc"
authorJian Cai <caij2003@gmail.com>
Fri, 16 Aug 2019 23:30:16 +0000 (23:30 +0000)
committerJian Cai <caij2003@gmail.com>
Fri, 16 Aug 2019 23:30:16 +0000 (23:30 +0000)
This relands r369147 with fixes to unit tests.

https://reviews.llvm.org/D65019

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369173 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets/ARM.cpp
test/Frontend/gnu-mcount.c

index 3ae2091f4a0f8274793f17eed0a580a8bdf2b531..b234f013485dd607d37d7b147a0070bcc1881e4c 100644 (file)
@@ -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");
index baac555d13947f512e1915131254ba0bd1652ee7..6e89dfefb7503939d0a73c287cff40c976090a1e 100644 (file)
@@ -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"{{.*}} }