]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc64: Select POWER9 machine for the scv instruction
authorFlorian Weimer <fweimer@redhat.com>
Thu, 21 Jan 2021 17:16:49 +0000 (18:16 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 22 Jan 2021 09:45:27 +0000 (10:45 +0100)
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>
sysdeps/powerpc/powerpc64/sysdep.h
sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
sysdeps/unix/sysv/linux/powerpc/sysdep.h

index cea05c8e1765213bad8682ad787301c69a725ae9..c57bb1c05d02f6636689532526fa11beaeaff5ae 100644 (file)
@@ -333,7 +333,10 @@ LT_LABELSUFFIX(name,_name_end): ; \
     mflr r9; \
     std r9,FRAME_LR_SAVE(r1); \
     cfi_offset(lr,FRAME_LR_SAVE); \
+    .machine "push"; \
+    .machine "power9"; \
     scv 0; \
+    .machine "pop"; \
     ld r9,FRAME_LR_SAVE(r1); \
     mtlr r9; \
     cfi_restore(lr);
index b59837b071f09fa0e2a2810e5c82d6f84b81206f..e9bd8cb96018986660a59bac39b50b7160c148bc 100644 (file)
@@ -76,7 +76,10 @@ ENTRY (__clone)
        because it uses CFI directives and we just called cfi_endproc.  */
        mflr    r9
        std     r9,FRAME_LR_SAVE(r1)
+       .machine "push"
+       .machine "power9"
        scv     0
+       .machine "pop"
        ld      r9,FRAME_LR_SAVE(r1)
        mtlr    r9
 
index d3605d562d2747a83bf25979573feef6149c9ca7..6b99464e61b8d4e4670ff647c44019c7ab31535d 100644 (file)
 #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),    \