]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Work around lack of mfppr in clang
authorStan Shebs <stanshebs@google.com>
Thu, 27 Sep 2018 18:14:32 +0000 (11:14 -0700)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:23:14 +0000 (17:23 -0700)
sysdeps/powerpc/tst-set_ppr.c

index c4f8096bf8ca30412ff0fbec841e54bf36c73c8a..02eb619113e90bed2d13b701cea0e4b58460d120 100644 (file)
@@ -44,7 +44,12 @@ get_thread_priority (void)
 {
   /* Read the PPR.  */
   ppr_t ppr;
+#if defined __clang__
+  /* Temporary until clang knows about mfppr.  */
+  asm volatile ("mfspr %0,896" : "=r"(ppr));
+#else
   asm volatile (MFPPR" %0" : "=r"(ppr));
+#endif
   /* Return the thread priority value.  */
   return EXTRACT_THREAD_PRIORITY (ppr);
 }