about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/sysdep.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-01-21 18:16:49 +0100
committerFlorian Weimer <fweimer@redhat.com>2021-01-22 10:45:27 +0100
commit527c89cd32f8522859f58343be3d3dc8f754b783 (patch)
treedd24593b79512e853a05240c33e2f3418813c7f6 /sysdeps/unix/sysv/linux/powerpc/sysdep.h
parent7a5ab88e218d2091e876a9779a4acae426afb85c (diff)
downloadglibc-527c89cd32f8522859f58343be3d3dc8f754b783.tar.gz
glibc-527c89cd32f8522859f58343be3d3dc8f754b783.tar.xz
glibc-527c89cd32f8522859f58343be3d3dc8f754b783.zip
powerpc64: Select POWER9 machine for the scv instruction
It is not available with the baseline ISA.

Fixes commit 68ab82f56690ada86ac1e0c46bad06ba189a10ef
("powerpc: Runtime selection between sc and scv for syscalls").

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/sysdep.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/sysdep.h
index d3605d562d..6b99464e61 100644
--- a/sysdeps/unix/sysv/linux/powerpc/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.h
@@ -76,7 +76,10 @@
 #define SYSCALL_SCV(nr)				\
   ({						\
     __asm__ __volatile__			\
-      ("scv 0\n\t"				\
+      (".machine \"push\"\n\t"			\
+       ".machine \"power9\"\n\t"		\
+       "scv 0\n\t"				\
+       ".machine \"pop\"\n\t"			\
        "0:"					\
        : "=&r" (r0),				\
 	 "=&r" (r3), "=&r" (r4), "=&r" (r5),	\