1 # Copyright (c) 2011-2012, Andy Polyakov <appro@openssl.org>
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
8 # * Redistributions of source code must retain copyright notices,
9 # this list of conditions and the following disclaimer.
11 # * Redistributions in binary form must reproduce the above
12 # copyright notice, this list of conditions and the following
13 # disclaimer in the documentation and/or other materials
14 # provided with the distribution.
16 # * Neither the name of the Andy Polyakov nor the names of its
17 # copyright holder and contributors may be used to endorse or
18 # promote products derived from this software without specific
19 # prior written permission.
21 # ALTERNATIVELY, provided that this notice is retained in full, this
22 # product may be distributed under the terms of the GNU General Public
23 # License (GPL), in which case the provisions of the GPL apply INSTEAD OF
26 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
27 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 # *** This file is auto-generated ***
41 .globl _padlock_capability
71 .globl _padlock_key_bswap
86 .globl _padlock_verify_context
89 _padlock_verify_context:
92 leaq L$padlock_saved_context(%rip),%rax
93 call _padlock_verify_ctx
113 .globl _padlock_reload_key
122 .globl _padlock_aes_block
130 .byte 0xf3,0x0f,0xa7,0xc8
135 .globl _padlock_xstore
144 .globl _padlock_sha1_oneshot
147 _padlock_sha1_oneshot:
157 .byte 0xf3,0x0f,0xa6,0xc8
166 .globl _padlock_sha1_blocks
169 _padlock_sha1_blocks:
179 .byte 0xf3,0x0f,0xa6,0xc8
188 .globl _padlock_sha256_oneshot
191 _padlock_sha256_oneshot:
196 movups 16(%rdi),%xmm1
199 movaps %xmm1,16(%rsp)
201 .byte 0xf3,0x0f,0xa6,0xd0
203 movaps 16(%rsp),%xmm1
206 movups %xmm1,16(%rdx)
210 .globl _padlock_sha256_blocks
213 _padlock_sha256_blocks:
218 movups 16(%rdi),%xmm1
221 movaps %xmm1,16(%rsp)
223 .byte 0xf3,0x0f,0xa6,0xd0
225 movaps 16(%rsp),%xmm1
228 movups %xmm1,16(%rdx)
232 .globl _padlock_sha512_blocks
235 _padlock_sha512_blocks:
240 movups 16(%rdi),%xmm1
241 movups 32(%rdi),%xmm2
242 movups 48(%rdi),%xmm3
245 movaps %xmm1,16(%rsp)
246 movaps %xmm2,32(%rsp)
247 movaps %xmm3,48(%rsp)
248 .byte 0xf3,0x0f,0xa6,0xe0
250 movaps 16(%rsp),%xmm1
251 movaps 32(%rsp),%xmm2
252 movaps 48(%rsp),%xmm3
255 movups %xmm1,16(%rdx)
256 movups %xmm2,32(%rdx)
257 movups %xmm3,48(%rdx)
260 .globl _padlock_ecb_encrypt
263 _padlock_ecb_encrypt:
272 leaq L$padlock_saved_context(%rip),%rax
275 call _padlock_verify_ctx
297 leaq (%rax,%rbp,1),%rsp
312 jz L$ecb_unaligned_tail
336 .byte 0xf3,0x0f,0xa7,200
356 L$ecb_unaligned_tail:
389 leaq (%rsi,%rcx,1),%rbp
398 jz L$ecb_aligned_tail
402 .byte 0xf3,0x0f,0xa7,200
427 .globl _padlock_cbc_encrypt
430 _padlock_cbc_encrypt:
439 leaq L$padlock_saved_context(%rip),%rax
442 call _padlock_verify_ctx
464 leaq (%rax,%rbp,1),%rsp
479 jz L$cbc_unaligned_tail
503 .byte 0xf3,0x0f,0xa7,208
505 movdqa %xmm0,-16(%rdx)
525 L$cbc_unaligned_tail:
558 leaq (%rsi,%rcx,1),%rbp
567 jz L$cbc_aligned_tail
571 .byte 0xf3,0x0f,0xa7,208
573 movdqa %xmm0,-16(%rdx)
598 .byte 86,73,65,32,80,97,100,108,111,99,107,32,120,56,54,95,54,52,32,109,111,100,117,108,101,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
602 L$padlock_saved_context: