1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #define NOSPLIT 4
- #define RODATA 8
- TEXT ·castagnoliSSE42(SB), NOSPLIT, $0
- MOVL crc+0(FP), AX
- MOVL p+4(FP), SI
- MOVL p_len+8(FP), CX
- NOTL AX
-
- CMPQ CX, $8
- JL cleanup
-
- startup:
- MOVQ SI, BX
- ANDQ $7, BX
- JZ aligned
- CRC32B (SI), AX
- DECQ CX
- INCQ SI
- JMP startup
- aligned:
-
- CMPQ CX, $8
- JL cleanup
- CRC32Q (SI), AX
- ADDQ $8, SI
- SUBQ $8, CX
- JMP aligned
- cleanup:
-
- CMPQ CX, $0
- JE done
- CRC32B (SI), AX
- INCQ SI
- DECQ CX
- JMP cleanup
- done:
- NOTL AX
- MOVL AX, ret+16(FP)
- RET
- TEXT ·haveSSE42(SB), NOSPLIT, $0
- XORQ AX, AX
- INCL AX
- CPUID
- SHRQ $20, CX
- ANDQ $1, CX
- MOVB CX, ret+0(FP)
- RET
|