aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStan Shebs <stanshebs@google.com>2018-09-27 11:14:32 -0700
committerStan Shebs <stanshebs@google.com>2018-09-27 11:14:32 -0700
commit74932cc8f5466e460c4b3d6d5996defabc72a84d (patch)
treea9301a83684281c8797323ddba9a54955b410382
parent464da9128b8f74750d0d1dbbf63db74738bf69ec (diff)
downloadtermbaud-google/grte/v5-2.27/master.tar.gz
termbaud-google/grte/v5-2.27/master.tar.xz
termbaud-google/grte/v5-2.27/master.zip
Work around lack of mfppr in clanggoogle/grte/v5-2.27/master
-rw-r--r--sysdeps/powerpc/tst-set_ppr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/powerpc/tst-set_ppr.c b/sysdeps/powerpc/tst-set_ppr.c
index c4f8096bf8c..02eb619113e 100644
--- a/sysdeps/powerpc/tst-set_ppr.c
+++ b/sysdeps/powerpc/tst-set_ppr.c
@@ -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);
}