diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2024-02-03 13:45:22 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2024-02-16 16:30:17 +0300 |
commit | cb2a1dd589a0ce97429bf2beeb560e5b030c2ccc (patch) | |
tree | cb2ffaa05e7442ba1f4dfb305dcdb7bfef87d463 /arch/s390/include/asm/fpu-insn-asm.h | |
parent | 3a74f44de2c901e1536d227d29257cae1a6ed18f (diff) | |
download | linux-cb2a1dd589a0ce97429bf2beeb560e5b030c2ccc.tar.xz |
s390/checksum: provide vector register variant of csum_partial()
Provide a faster variant of csum_partial() which uses vector registers
instead of the cksm instruction.
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/fpu-insn-asm.h')
-rw-r--r-- | arch/s390/include/asm/fpu-insn-asm.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/s390/include/asm/fpu-insn-asm.h b/arch/s390/include/asm/fpu-insn-asm.h index 789d626599ee..aaf42c513a21 100644 --- a/arch/s390/include/asm/fpu-insn-asm.h +++ b/arch/s390/include/asm/fpu-insn-asm.h @@ -521,6 +521,15 @@ VMRL \vr1, \vr2, \vr3, 3 .endm +/* VECTOR LOAD WITH LENGTH */ +.macro VLL v, gr, disp, base + VX_NUM v1, \v + GR_NUM b2, \base + GR_NUM r3, \gr + .word 0xE700 | ((v1&15) << 4) | r3 + .word (b2 << 12) | (\disp) + MRXBOPC 0, 0x37, v1 +.endm /* Vector integer instructions */ @@ -534,6 +543,16 @@ MRXBOPC 0, 0x68, v1, v2, v3 .endm +/* VECTOR CHECKSUM */ +.macro VCKSM vr1, vr2, vr3 + VX_NUM v1, \vr1 + VX_NUM v2, \vr2 + VX_NUM v3, \vr3 + .word 0xE700 | ((v1&15) << 4) | (v2&15) + .word ((v3&15) << 12) + MRXBOPC 0, 0x66, v1, v2, v3 +.endm + /* VECTOR EXCLUSIVE OR */ .macro VX vr1, vr2, vr3 VX_NUM v1, \vr1 |