ppc.h: use mftb on ppc
authorSergey Fedorov <vital.had@gmail.com>
Fri, 5 Jan 2024 10:44:18 +0000 (18:44 +0800)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 24 Jan 2024 20:42:06 +0000 (15:42 -0500)
Older versions of GNU as do not support mftbl. The issue affects Darwin
PowerPC, as well as some older versions of NetBSD and Linux. Since mftb
is equivalent and universally understood, just use that.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I098b70fa8bb077143d2d658835586b6b059b879f

include/urcu/arch/ppc.h

index 791529ebb1a08ff3db124103474522b77bf0ad15..56fb82b431c79ccd50074a0e39c88ed6f021fb25 100644 (file)
@@ -63,7 +63,7 @@ extern "C" {
        __extension__                                   \
        ({                                              \
                unsigned long rval;                     \
-               __asm__ __volatile__ ("mftbl %0" : "=r" (rval));        \
+               __asm__ __volatile__ ("mftb %0" : "=r" (rval)); \
                rval;                                   \
        })
 
This page took 0.025581 seconds and 4 git commands to generate.