s390/fpu: provide and use vlm and vstm inline assemblies
authorHeiko Carstens <hca@linux.ibm.com>
Sat, 3 Feb 2024 10:45:07 +0000 (11:45 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 16 Feb 2024 13:30:15 +0000 (14:30 +0100)
commit3a5866a001e83e1aa143fc0aeba0248247483962
tree9439898f3b6e59c909d28315e5af297b4817bc13
parentf4e3de75d0c4ebe9bbbfef19d7845ee70cb017bd
s390/fpu: provide and use vlm and vstm inline assemblies

Instead of open-coding vlm and vstm inline assemblies at several locations,
provide an fpu_* function for each instruction, and use them in the new
save_vx_regs() and load_vx_regs() helper functions.

Note that "O" and "R" inline assembly operand modifiers are used in order
to pass the displacement and base register of the memory operands to the
existing VLM and VSTM macros. The two operand modifiers are not available
for clang. Therefore provide two variants of each inline assembly.

The clang variant always uses and clobbers general purpose register 1, like
in the previous inline assemblies, so it can be used as base register with
a zero displacement. This generates slightly less efficient code, but can
be removed as soon as clang has support for the used operand modifiers.

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/fpu-insn.h
arch/s390/include/asm/fpu.h
arch/s390/kernel/fpu.c