xref: /isa-l/erasure_code/ec_multibinary.asm (revision 5f23c0341535035b80f8ef071ac3d5e41b246807)
1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2;  Copyright(c) 2011-2015 Intel Corporation All rights reserved.
3;
4;  Redistribution and use in source and binary forms, with or without
5;  modification, are permitted provided that the following conditions
6;  are met:
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
12;      distribution.
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.
16;
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
30%include "reg_sizes.asm"
31%include "multibinary.asm"
32
33%ifidn __OUTPUT_FORMAT__, elf32
34 [bits 32]
35%else
36 default rel
37 [bits 64]
38
39 extern ec_encode_data_update_sse
40 extern ec_encode_data_update_avx
41 extern ec_encode_data_update_avx2
42%ifdef HAVE_AS_KNOWS_AVX512
43 extern ec_encode_data_avx512
44 extern gf_vect_dot_prod_avx512
45 extern ec_encode_data_update_avx512
46 extern gf_vect_mad_avx512
47%endif
48 extern gf_vect_mul_sse
49 extern gf_vect_mul_avx
50
51 extern gf_vect_mad_sse
52 extern gf_vect_mad_avx
53 extern gf_vect_mad_avx2
54%endif
55
56%if (AS_FEATURE_LEVEL) >= 10
57 extern ec_init_tables_gfni
58 extern ec_encode_data_avx512_gfni
59 extern ec_encode_data_avx2_gfni
60 extern ec_encode_data_update_avx512_gfni
61 extern ec_encode_data_update_avx2_gfni
62%endif
63
64extern ec_init_tables_base
65
66extern gf_vect_mul_base
67extern ec_encode_data_base
68extern ec_encode_data_update_base
69extern gf_vect_dot_prod_base
70extern gf_vect_mad_base
71
72extern gf_vect_dot_prod_sse
73extern gf_vect_dot_prod_avx
74extern gf_vect_dot_prod_avx2
75extern ec_encode_data_sse
76extern ec_encode_data_avx
77extern ec_encode_data_avx2
78
79mbin_interface ec_encode_data
80mbin_interface gf_vect_dot_prod
81mbin_interface gf_vect_mul
82mbin_interface ec_encode_data_update
83mbin_interface gf_vect_mad
84mbin_interface ec_init_tables
85
86%ifidn __OUTPUT_FORMAT__, elf32
87 mbin_dispatch_init5 ec_encode_data, ec_encode_data_base, ec_encode_data_sse, ec_encode_data_avx, ec_encode_data_avx2
88 mbin_dispatch_init5 gf_vect_dot_prod, gf_vect_dot_prod_base, gf_vect_dot_prod_sse, gf_vect_dot_prod_avx, gf_vect_dot_prod_avx2
89 mbin_dispatch_init2 gf_vect_mul, gf_vect_mul_base
90 mbin_dispatch_init2 ec_encode_data_update, ec_encode_data_update_base
91 mbin_dispatch_init2 gf_vect_mad, gf_vect_mad_base
92 mbin_dispatch_init2 ec_init_tables, ec_init_tables_base
93%else
94
95 mbin_dispatch_init5 gf_vect_mul, gf_vect_mul_base, gf_vect_mul_sse, gf_vect_mul_avx, gf_vect_mul_avx
96 mbin_dispatch_init8 ec_encode_data, ec_encode_data_base, ec_encode_data_sse, ec_encode_data_avx, ec_encode_data_avx2, ec_encode_data_avx512, ec_encode_data_avx2_gfni, ec_encode_data_avx512_gfni
97 mbin_dispatch_init8 ec_encode_data_update, ec_encode_data_update_base, ec_encode_data_update_sse, ec_encode_data_update_avx, ec_encode_data_update_avx2, ec_encode_data_update_avx512, ec_encode_data_update_avx2_gfni, ec_encode_data_update_avx512_gfni
98 mbin_dispatch_init6 gf_vect_mad, gf_vect_mad_base, gf_vect_mad_sse, gf_vect_mad_avx, gf_vect_mad_avx2, gf_vect_mad_avx512
99 mbin_dispatch_init6 gf_vect_dot_prod, gf_vect_dot_prod_base, gf_vect_dot_prod_sse, gf_vect_dot_prod_avx, gf_vect_dot_prod_avx2, gf_vect_dot_prod_avx512
100 mbin_dispatch_init8 ec_init_tables, ec_init_tables_base, ec_init_tables_base, ec_init_tables_base, ec_init_tables_base, ec_init_tables_base, ec_init_tables_gfni, ec_init_tables_gfni
101%endif
102