Replace BYTE.. encodings with asm. This is possible due to asm
implementing more instructions and removal of
MOV $0, reg -> XOR reg, reg transformation from asm.
Change-Id: I011749ab6b3f64403ab6e746f3760c5841548b57
Reviewed-on: https://go-review.googlesource.com/97936
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
ADCQ mul0, acc2
ADCQ $0, mul1
MOVQ mul1, acc3
- BYTE $0x48; BYTE $0xc7; BYTE $0xc5; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00 // MOVQ $0, BP
+ MOVQ $0, BP
// Add bits [511:256] of the result
ADCQ acc0, acc4
ADCQ acc1, acc5
ADCQ mul0, acc2
ADCQ $0, mul1
MOVQ mul1, acc3
- BYTE $0x48; BYTE $0xc7; BYTE $0xc5; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00 // MOVQ $0, BP
+ MOVQ $0, BP
// Add bits [511:256] of the result
ADCQ acc0, t0
ADCQ acc1, t1
BTQ $1, BX
JNC align_4
- // CRC32W (SI), AX
- BYTE $0x66; BYTE $0xf2; BYTE $0x0f; BYTE $0x38; BYTE $0xf1; BYTE $0x06
+ CRC32W (SI), AX
SUBQ $2, CX
ADDQ $2, SI
BTQ $2, BX
JNC aligned
- // CRC32L (SI), AX
- BYTE $0xf2; BYTE $0x0f; BYTE $0x38; BYTE $0xf1; BYTE $0x06
+ CRC32L (SI), AX
SUBQ $4, CX
ADDQ $4, SI
BTQ $2, CX
JNC less_than_4
- // CRC32L (SI), AX
- BYTE $0xf2; BYTE $0x0f; BYTE $0x38; BYTE $0xf1; BYTE $0x06
+ CRC32L (SI), AX
ADDQ $4, SI
less_than_4:
BTQ $1, CX
JNC less_than_2
- // CRC32W (SI), AX
- BYTE $0x66; BYTE $0xf2; BYTE $0x0f; BYTE $0x38; BYTE $0xf1; BYTE $0x06
+ CRC32W (SI), AX
ADDQ $2, SI
less_than_2: