From 5a326467dcec154dae3664ed8d1a742153c9248c Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 18 Oct 2011 09:22:04 +0000 Subject: [PATCH] bsaes-x86_64.pl: make it work with ml64. --- crypto/aes/asm/bsaes-x86_64.pl | 53 ++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/crypto/aes/asm/bsaes-x86_64.pl b/crypto/aes/asm/bsaes-x86_64.pl index bbc86add36..34ea2f818d 100644 --- a/crypto/aes/asm/bsaes-x86_64.pl +++ b/crypto/aes/asm/bsaes-x86_64.pl @@ -1152,27 +1152,44 @@ ___ } $code.=<<___; .align 64 -.LBS0: .quad 0x5555555555555555, 0x5555555555555555 -.LBS1: .quad 0x3333333333333333, 0x3333333333333333 -.LBS2: .quad 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f -.LSR: .quad 0x0504070600030201, 0x0f0e0d0c0a09080b -.LSRM0: .quad 0x0304090e00050a0f, 0x01060b0c0207080d -.LM0: .quad 0x02060a0e03070b0f, 0x0004080c0105090d -.LM0SR: .quad 0x0a0e02060f03070b, 0x0004080c05090d01 -.LNOT: .quad 0xffffffffffffffff, 0xffffffffffffffff -.L63: .quad 0x6363636363636363, 0x6363636363636363 -.LSWPUP: +.LBS0: # bit-slice constants + .quad 0x5555555555555555, 0x5555555555555555 +.LBS1: + .quad 0x3333333333333333, 0x3333333333333333 +.LBS2: + .quad 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f +.LSR: # shiftrows constants + .quad 0x0504070600030201, 0x0f0e0d0c0a09080b +.LSRM0: + .quad 0x0304090e00050a0f, 0x01060b0c0207080d +.LM0: + .quad 0x02060a0e03070b0f, 0x0004080c0105090d +.LM0SR: + .quad 0x0a0e02060f03070b, 0x0004080c05090d01 +.LNOT: # magic constants + .quad 0xffffffffffffffff, 0xffffffffffffffff +.L63: + .quad 0x6363636363636363, 0x6363636363636363 +.LSWPUP: # byte-swap upper dword .quad 0x0706050403020100, 0x0c0d0e0f0b0a0908 .LSWPUPM0SR: .quad 0x0a0d02060c03070b, 0x0004080f05090e01 -.LADD1: .quad 0x0000000000000000, 0x0000000100000000 -.LADD2: .quad 0x0000000000000000, 0x0000000200000000 -.LADD3: .quad 0x0000000000000000, 0x0000000300000000 -.LADD4: .quad 0x0000000000000000, 0x0000000400000000 -.LADD5: .quad 0x0000000000000000, 0x0000000500000000 -.LADD6: .quad 0x0000000000000000, 0x0000000600000000 -.LADD7: .quad 0x0000000000000000, 0x0000000700000000 -.LADD8: .quad 0x0000000000000000, 0x0000000800000000 +.LADD1: # counter increment constants + .quad 0x0000000000000000, 0x0000000100000000 +.LADD2: + .quad 0x0000000000000000, 0x0000000200000000 +.LADD3: + .quad 0x0000000000000000, 0x0000000300000000 +.LADD4: + .quad 0x0000000000000000, 0x0000000400000000 +.LADD5: + .quad 0x0000000000000000, 0x0000000500000000 +.LADD6: + .quad 0x0000000000000000, 0x0000000600000000 +.LADD7: + .quad 0x0000000000000000, 0x0000000700000000 +.LADD8: + .quad 0x0000000000000000, 0x0000000800000000 .asciz "Bit-sliced AES for x86_64/SSSE3, Emilia Käsper and Peter Schwabe" .align 64 ___ -- 2.25.1