1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

powerpc64: Select POWER9 machine for the scv instruction

It is not available with the baseline ISA.

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

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
This commit is contained in:
Florian Weimer
2021-01-21 18:16:49 +01:00
parent 7a5ab88e21
commit 527c89cd32
3 changed files with 10 additions and 1 deletions

View File

@ -333,7 +333,10 @@ LT_LABELSUFFIX(name,_name_end): ; \
mflr r9; \ mflr r9; \
std r9,FRAME_LR_SAVE(r1); \ std r9,FRAME_LR_SAVE(r1); \
cfi_offset(lr,FRAME_LR_SAVE); \ cfi_offset(lr,FRAME_LR_SAVE); \
.machine "push"; \
.machine "power9"; \
scv 0; \ scv 0; \
.machine "pop"; \
ld r9,FRAME_LR_SAVE(r1); \ ld r9,FRAME_LR_SAVE(r1); \
mtlr r9; \ mtlr r9; \
cfi_restore(lr); cfi_restore(lr);

View File

@ -76,7 +76,10 @@ ENTRY (__clone)
because it uses CFI directives and we just called cfi_endproc. */ because it uses CFI directives and we just called cfi_endproc. */
mflr r9 mflr r9
std r9,FRAME_LR_SAVE(r1) std r9,FRAME_LR_SAVE(r1)
.machine "push"
.machine "power9"
scv 0 scv 0
.machine "pop"
ld r9,FRAME_LR_SAVE(r1) ld r9,FRAME_LR_SAVE(r1)
mtlr r9 mtlr r9

View File

@ -76,7 +76,10 @@
#define SYSCALL_SCV(nr) \ #define SYSCALL_SCV(nr) \
({ \ ({ \
__asm__ __volatile__ \ __asm__ __volatile__ \
("scv 0\n\t" \ (".machine \"push\"\n\t" \
".machine \"power9\"\n\t" \
"scv 0\n\t" \
".machine \"pop\"\n\t" \
"0:" \ "0:" \
: "=&r" (r0), \ : "=&r" (r0), \
"=&r" (r3), "=&r" (r4), "=&r" (r5), \ "=&r" (r3), "=&r" (r4), "=&r" (r5), \