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:41:52 +0000 (15:41 -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 80462c6e6dcb68ae6a15084fa96e43a067d69550..be9d15857a8bf4d14027f783a38accfe7892621b 100644 (file)
@@ -51,7 +51,7 @@ extern "C" {
        __extension__                                   \
        ({                                              \
                unsigned long rval;                     \
-               __asm__ __volatile__ ("mftbl %0" : "=r" (rval));        \
+               __asm__ __volatile__ ("mftb %0" : "=r" (rval)); \
                rval;                                   \
        })
 
This page took 0.025955 seconds and 4 git commands to generate.