1
0
mirror of https://github.com/fumiama/blake2b-simd.git synced 2026-06-11 21:50:30 +08:00

Added AVX2 support (#6)

* Added AVX2 support
This commit is contained in:
Frank
2016-07-03 20:54:51 +02:00
committed by Harshavardhana
parent f0521e8972
commit 00562011ad
8 changed files with 808 additions and 19 deletions

View File

@@ -13,10 +13,21 @@ TEXT ·cpuid(SB), 7, $0
MOVL DX, edx+16(FP)
RET
// func cpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
TEXT ·cpuidex(SB), 7, $0
MOVL op+0(FP), AX
MOVL op2+4(FP), CX
CPUID
MOVL AX, eax+8(FP)
MOVL BX, ebx+12(FP)
MOVL CX, ecx+16(FP)
MOVL DX, edx+20(FP)
RET
// func xgetbv(index uint32) (eax, edx uint32)
TEXT ·xgetbv(SB), 7, $0
MOVL index+0(FP), CX
BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV
MOVL AX, eax+4(FP)
MOVL DX, edx+8(FP)
RET
MOVL index+0(FP), CX
BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV
MOVL AX, eax+4(FP)
MOVL DX, edx+8(FP)
RET