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 mbin_interface xor_gen
60 mbin_dispatch_init5 xor_gen, xor_gen_base, xor_gen_sse, xor_gen_avx, xor_gen_avx
61 mbin_dispatch_init5 pq_gen, pq_gen_base, pq_gen_sse, pq_gen_avx, pq_gen_avx2
74 ; pq_check multibinary function
76 global pq_check:function
78 call pq_check_dispatch_init
80 jmp qword [pq_check_dispatched]
82 pq_check_dispatch_init:
88 lea rsi, [pq_check_base WRT_OPT] ; Default
92 test ecx, FLAG_CPUID1_ECX_SSE4_1
93 lea rbx, [pq_check_sse WRT_OPT]
96 mov [pq_check_dispatched], rsi
106 ; xor_check multibinary function
108 global xor_check:function
110 call xor_check_dispatch_init
112 jmp qword [xor_check_dispatched]
114 xor_check_dispatch_init:
120 lea rsi, [xor_check_base WRT_OPT] ; Default
124 test ecx, FLAG_CPUID1_ECX_SSE4_1
125 lea rbx, [xor_check_sse WRT_OPT]
128 mov [xor_check_dispatched], rsi
136 ;;; func core, ver, snum
137 slversion xor_gen, 00, 03, 0126
138 slversion xor_check, 00, 03, 0127
139 slversion pq_gen, 00, 03, 0128
140 slversion pq_check, 00, 03, 0129