mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 04:06:18 +08:00
internal/subtle: try s390x vector
This commit is contained in:
parent
6925a64c6c
commit
b6821a6853
@ -14,15 +14,26 @@ TEXT ·xorBytes(SB),NOSPLIT,$0-32
|
|||||||
MOVD n+24(FP), R4
|
MOVD n+24(FP), R4
|
||||||
|
|
||||||
MOVD $0, R5
|
MOVD $0, R5
|
||||||
|
CMPBLT R4, $16, less_than16
|
||||||
|
|
||||||
|
loop16b:
|
||||||
|
VL 0(R2)(R5*1), V0
|
||||||
|
VL 0(R3)(R5*1), V1
|
||||||
|
VX V0, V1, V2
|
||||||
|
VST V2, 0(R1)(R5*1)
|
||||||
|
LAY 16(R5), R5
|
||||||
|
SUB $16, R4
|
||||||
|
CMPBGE R4, $16, loop16b
|
||||||
|
|
||||||
|
less_than16:
|
||||||
CMPBLT R4, $8, tail
|
CMPBLT R4, $8, tail
|
||||||
loop:
|
|
||||||
MOVD 0(R2)(R5*1), R7
|
MOVD 0(R2)(R5*1), R7
|
||||||
MOVD 0(R3)(R5*1), R8
|
MOVD 0(R3)(R5*1), R8
|
||||||
XOR R7, R8
|
XOR R7, R8
|
||||||
MOVD R8, 0(R1)(R5*1)
|
MOVD R8, 0(R1)(R5*1)
|
||||||
LAY 8(R5), R5
|
LAY 8(R5), R5
|
||||||
SUB $8, R4
|
SUB $8, R4
|
||||||
CMPBGE R4, $8, loop
|
|
||||||
tail:
|
tail:
|
||||||
CMPBEQ R4, $0, done
|
CMPBEQ R4, $0, done
|
||||||
MOVB 0(R2)(R5*1), R7
|
MOVB 0(R2)(R5*1), R7
|
||||||
@ -32,5 +43,6 @@ tail:
|
|||||||
LAY 1(R5), R5
|
LAY 1(R5), R5
|
||||||
SUB $1, R4
|
SUB $1, R4
|
||||||
BR tail
|
BR tail
|
||||||
|
|
||||||
done:
|
done:
|
||||||
RET
|
RET
|
||||||
|
Loading…
x
Reference in New Issue
Block a user