Skip to content

Commit

Permalink
internal/subtle: s390x, use VLM/VSTM in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
emmansun authored Aug 28, 2024
1 parent 4ad4fb4 commit 40bd384
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions internal/subtle/xor_s390x.s
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,13 @@ TEXT ·xorBytes(SB),NOSPLIT,$0-32
CMPBLT R4, $64, tail

loop_64:
VL 0(R2)(R5*1), V0
VL 16(R2)(R5*1), V1
VL 32(R2)(R5*1), V2
VL 48(R2)(R5*1), V3
VL 0(R3)(R5*1), V4
VL 16(R3)(R5*1), V5
VL 32(R3)(R5*1), V6
VL 48(R3)(R5*1), V7
VLM 0(R2)(R5*1), V0, V3
VLM 0(R3)(R5*1), V4, V7
VX V0, V4, V4
VX V1, V5, V5
VX V2, V6, V6
VX V3, V7, V7
VST V4, 0(R1)(R5*1)
VST V5, 16(R1)(R5*1)
VST V6, 32(R1)(R5*1)
VST V7, 48(R1)(R5*1)
VSTM V4, V7, 0(R1)(R5*1)
LAY 64(R5), R5
SUB $64, R4
CMPBGE R4, $64, loop_64
Expand Down

0 comments on commit 40bd384

Please sign in to comment.