OSDN Git Service

powerpc/uaccess: Use asm goto for get_user when compiler supports it
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 10 Mar 2021 17:46:54 +0000 (17:46 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 3 Apr 2021 10:22:16 +0000 (21:22 +1100)
commit5cd29b1fd3e8f2b45fe6d011588d832417defe31
tree2532d762449a30b92c776c424d10c6eb39e176d3
parent035785ab2826beb43cfa65a2df37d60074915a4d
powerpc/uaccess: Use asm goto for get_user when compiler supports it

clang 11 and future GCC are supporting asm goto with outputs.

Use it to implement get_user in order to get better generated code.

Note that clang requires to set x in the default branch of
__get_user_size_goto() otherwise is compliant about x not being
initialised :puzzled:

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/403745b5aaa1b315bb4e8e46c1ba949e77eecec0.1615398265.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/uaccess.h