diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-03-17 10:14:46 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-03-17 10:14:46 +0000 |
commit | e67c6710bdb2b7495d6fb72e23b6be3b2475feb9 (patch) | |
tree | a727e5cae5bd116a8c6a1b7cee99edce5e0a1e06 /sys/arch/powerpc | |
parent | ccda57b11deba92d7abd955e43fb341d1d9bd07d (diff) |
Fix inline assembly in ppc_mftb(); using %L0 instead of %0+1 makes this work
for both gcc and clang. From NetBSD. Thanks to some serious detective work
by ghoehler@.
ok deraadt@, gkeohler@
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/include/cpu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index c44c3877ae3..65d3625d692 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.65 2019/03/23 05:27:53 visa Exp $ */ +/* $OpenBSD: cpu.h,v 1.66 2020/03/17 10:14:45 kettenis Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -336,7 +336,7 @@ ppc_mftb(void) u_long scratch; u_int64_t tb; - __asm volatile ("1: mftbu %0; mftb %0+1; mftbu %1;" + __asm volatile ("1: mftbu %0; mftb %L0; mftbu %1;" " cmpw 0,%0,%1; bne 1b" : "=r"(tb), "=r"(scratch)); return tb; } |