1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ; Copyright(c) 2011-2015 Intel Corporation All rights reserved.
4 ; Redistribution and use in source and binary forms, with or without
5 ; modification, are permitted provided that the following conditions
7 ; * Redistributions of source code must retain the above copyright
8 ; notice, this list of conditions and the following disclaimer.
9 ; * Redistributions in binary form must reproduce the above copyright
10 ; notice, this list of conditions and the following disclaimer in
11 ; the documentation and/or other materials provided with the
13 ; * Neither the name of Intel Corporation nor the names of its
14 ; contributors may be used to endorse or promote products derived
15 ; from this software without specific prior written permission.
17 ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 %ifidn __OUTPUT_FORMAT__, elf64
31 %define WRT_OPT wrt ..plt
36 %include "reg_sizes.asm"
37 %include "multibinary.asm"
57 %ifdef HAVE_AS_KNOWS_AVX512
62 mbin_interface xor_gen
65 %ifdef HAVE_AS_KNOWS_AVX512
66 mbin_dispatch_init6 xor_gen, xor_gen_base, xor_gen_sse, xor_gen_avx, xor_gen_avx, xor_gen_avx512
67 mbin_dispatch_init6 pq_gen, pq_gen_base, pq_gen_sse, pq_gen_avx, pq_gen_avx2, pq_gen_avx512
69 mbin_dispatch_init5 xor_gen, xor_gen_base, xor_gen_sse, xor_gen_avx, xor_gen_avx
70 mbin_dispatch_init5 pq_gen, pq_gen_base, pq_gen_sse, pq_gen_avx, pq_gen_avx2
83 ; pq_check multibinary function
85 global pq_check:function
87 call pq_check_dispatch_init
89 jmp qword [pq_check_dispatched]
91 pq_check_dispatch_init:
97 lea rsi, [pq_check_base WRT_OPT] ; Default
101 test ecx, FLAG_CPUID1_ECX_SSE4_1
102 lea rbx, [pq_check_sse WRT_OPT]
105 mov [pq_check_dispatched], rsi
115 ; xor_check multibinary function
117 global xor_check:function
119 call xor_check_dispatch_init
121 jmp qword [xor_check_dispatched]
123 xor_check_dispatch_init:
129 lea rsi, [xor_check_base WRT_OPT] ; Default
133 test ecx, FLAG_CPUID1_ECX_SSE4_1
134 lea rbx, [xor_check_sse WRT_OPT]
137 mov [xor_check_dispatched], rsi
145 ;;; func core, ver, snum
146 slversion xor_gen, 00, 03, 0126
147 slversion xor_check, 00, 03, 0127
148 slversion pq_gen, 00, 03, 0128
149 slversion pq_check, 00, 03, 0129