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 ***
40 .file "devel/perlasm/e_padlock-x86.s"
42 .globl _padlock_capability
43 .def _padlock_capability; .scl 2; .type 32; .endef
46 .L_padlock_capability_begin:
92 .globl _padlock_key_bswap
93 .def _padlock_key_bswap; .scl 2; .type 32; .endef
96 .L_padlock_key_bswap_begin:
107 .globl _padlock_verify_context
108 .def _padlock_verify_context; .scl 2; .type 32; .endef
110 _padlock_verify_context
:
111 .L_padlock_verify_context_begin:
113 leal
.Lpadlock_saved_context,%eax
115 call __padlock_verify_ctx
116 .L002verify_pic_point:
119 .def __padlock_verify_ctx; .scl 3; .type 32; .endef
121 __padlock_verify_ctx
:
131 .globl _padlock_reload_key
132 .def _padlock_reload_key; .scl 2; .type 32; .endef
135 .L_padlock_reload_key_begin:
139 .globl _padlock_aes_block
140 .def _padlock_aes_block; .scl 2; .type 32; .endef
143 .L_padlock_aes_block_begin:
158 .globl _padlock_ecb_encrypt
159 .def _padlock_ecb_encrypt; .scl 2; .type 32; .endef
161 _padlock_ecb_encrypt
:
162 .L_padlock_ecb_encrypt_begin:
175 leal
.Lpadlock_saved_context,%eax
178 call __padlock_verify_ctx
201 leal
(%eax
,%ebp
,1),%esp
220 jz
.L008ecb_unaligned_tail
232 jz
.L009ecb_inp_aligned
238 .L009ecb_inp_aligned:
246 jz
.L010ecb_out_aligned
252 .L010ecb_out_aligned:
262 .L008ecb_unaligned_tail:
293 leal
(%esi
,%ecx
,1),%ebp
302 jz
.L015ecb_aligned_tail
309 .L015ecb_aligned_tail:
336 .globl _padlock_cbc_encrypt
337 .def _padlock_cbc_encrypt; .scl 2; .type 32; .endef
339 _padlock_cbc_encrypt
:
340 .L_padlock_cbc_encrypt_begin:
353 leal
.Lpadlock_saved_context,%eax
356 call __padlock_verify_ctx
379 leal
(%eax
,%ebp
,1),%esp
398 jz
.L020cbc_unaligned_tail
410 jz
.L021cbc_inp_aligned
416 .L021cbc_inp_aligned:
422 movaps
%xmm0
,-16(%edx
)
426 jz
.L022cbc_out_aligned
432 .L022cbc_out_aligned:
442 .L020cbc_unaligned_tail:
473 leal
(%esi
,%ecx
,1),%ebp
482 jz
.L027cbc_aligned_tail
488 movaps
%xmm0
,-16(%edx
)
491 .L027cbc_aligned_tail:
518 .globl _padlock_xstore
519 .def _padlock_xstore; .scl 2; .type 32; .endef
522 .L_padlock_xstore_begin:
529 .def __win32_segv_handler; .scl 3; .type 32; .endef
531 __win32_segv_handler
:
535 cmpl $
3221225477,(%edx
)
541 .globl _padlock_sha1_oneshot
542 .def _padlock_sha1_oneshot; .scl 2; .type 32; .endef
544 _padlock_sha1_oneshot
:
545 .L_padlock_sha1_oneshot_begin:
552 pushl __win32_segv_handler
568 .byte 100,143,5,0,0,0,0
576 .globl _padlock_sha1_blocks
577 .def _padlock_sha1_blocks; .scl 2; .type 32; .endef
579 _padlock_sha1_blocks
:
580 .L_padlock_sha1_blocks_begin:
605 .globl _padlock_sha256_oneshot
606 .def _padlock_sha256_oneshot; .scl 2; .type 32; .endef
608 _padlock_sha256_oneshot
:
609 .L_padlock_sha256_oneshot_begin:
616 pushl __win32_segv_handler
623 movups
16(%edi
),%xmm1
626 movaps
%xmm1
,16(%esp
)
630 movaps
16(%esp
),%xmm1
632 .byte 100,143,5,0,0,0,0
636 movups
%xmm1
,16(%edi
)
640 .globl _padlock_sha256_blocks
641 .def _padlock_sha256_blocks; .scl 2; .type 32; .endef
643 _padlock_sha256_blocks
:
644 .L_padlock_sha256_blocks_begin:
654 movups
16(%edi
),%xmm1
657 movaps
%xmm1
,16(%esp
)
661 movaps
16(%esp
),%xmm1
665 movups
%xmm1
,16(%edi
)
669 .globl _padlock_sha512_blocks
670 .def _padlock_sha512_blocks; .scl 2; .type 32; .endef
672 _padlock_sha512_blocks
:
673 .L_padlock_sha512_blocks_begin:
683 movups
16(%edi
),%xmm1
684 movups
32(%edi
),%xmm2
685 movups
48(%edi
),%xmm3
688 movaps
%xmm1
,16(%esp
)
689 movaps
%xmm2
,32(%esp
)
690 movaps
%xmm3
,48(%esp
)
693 movaps
16(%esp
),%xmm1
694 movaps
32(%esp
),%xmm2
695 movaps
48(%esp
),%xmm3
699 movups
%xmm1
,16(%edi
)
700 movups
%xmm2
,32(%edi
)
701 movups
%xmm3
,48(%edi
)
705 .byte 86,73,65,32,80,97,100,108,111,99,107,32,120,56,54,32
706 .byte 109,111,100,117,108,101,44,32,67,82,89,80,84,79,71,65
707 .byte 77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101
708 .byte 110,115,115,108,46,111,114,103,62,0
712 .Lpadlock_saved_context: