]> git.proxmox.com Git - ceph.git/blame - ceph/src/isa-l/igzip/data_struct2.asm
update sources to v12.1.1
[ceph.git] / ceph / src / isa-l / igzip / data_struct2.asm
CommitLineData
7c673cae
FG
1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2; Copyright(c) 2011-2016 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;; START_FIELDS
31%macro START_FIELDS 0
32%assign _FIELD_OFFSET 0
33%assign _STRUCT_ALIGN 0
34%endm
35
36;; FIELD name size align
37%macro FIELD 3
38%define %%name %1
39%define %%size %2
40%define %%align %3
41
42%assign _FIELD_OFFSET (_FIELD_OFFSET + (%%align) - 1) & (~ ((%%align)-1))
43%%name equ _FIELD_OFFSET
44%assign _FIELD_OFFSET _FIELD_OFFSET + (%%size)
45%if (%%align > _STRUCT_ALIGN)
46%assign _STRUCT_ALIGN %%align
47%endif
48%endm
49
50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
53
54START_FIELDS ;; BitBuf2
55
56;; name size align
57FIELD _m_bits, 8, 8
58FIELD _m_bit_count, 4, 4
59FIELD _m_out_buf, 8, 8
60FIELD _m_out_end, 8, 8
61FIELD _m_out_start, 8, 8
62
63%assign _BitBuf2_size _FIELD_OFFSET
64%assign _BitBuf2_align _STRUCT_ALIGN
65
224ce89b
WB
66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
69%define HIST_ELEM_SIZE 4
70
71START_FIELDS ;; isal_mod_hist
72
73;; name size align
74FIELD _d_hist, 30*HIST_ELEM_SIZE, HIST_ELEM_SIZE
75FIELD _ll_hist, 513*HIST_ELEM_SIZE, HIST_ELEM_SIZE
76
77%assign _isal_mod_hist_size _FIELD_OFFSET
78%assign _isal_mod_hist_align _STRUCT_ALIGN
79
80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
83
84%define HUFF_CODE_SIZE 4
85
86START_FIELDS ;; hufftables_icf
87
88;; name size align
89FIELD _dist_table, 31 * HUFF_CODE_SIZE, HUFF_CODE_SIZE
90FIELD _lit_len_table, 513 * HUFF_CODE_SIZE, HUFF_CODE_SIZE
91
92%assign _hufftables_icf_size _FIELD_OFFSET
93%assign _hufftables_icf_align _STRUCT_ALIGN
94
95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
96;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
97;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
98
99%define DEF_MAX_HDR_SIZE 328
100START_FIELDS ;; level_2_buf
101
102;; name size align
103FIELD _encode_tables, _hufftables_icf_size, _hufftables_icf_align
104FIELD _deflate_hdr_buf_used, 8, 8
105FIELD _deflate_hdr_buf, DEF_MAX_HDR_SIZE, 1
106FIELD _icf_buf_next, 8, 8
107FIELD _icf_buf_avail_out, 8, 8
108FIELD _icf_buf_start, 0, 0
109
110%assign _level_2_buf_size _FIELD_OFFSET
111%assign _level_2_buf_align _STRUCT_ALIGN
112
7c673cae
FG
113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
116
117START_FIELDS ;; isal_zstate
118
119;; name size align
120FIELD _b_bytes_valid, 4, 4
121FIELD _b_bytes_processed, 4, 4
122FIELD _file_start, 8, 8
224ce89b 123FIELD _crc, 4, 4
7c673cae
FG
124FIELD _bitbuf, _BitBuf2_size, _BitBuf2_align
125FIELD _state, 4, 4
126FIELD _count, 4, 4
127FIELD _tmp_out_buff, 16, 1
128FIELD _tmp_out_start, 4, 4
129FIELD _tmp_out_end, 4, 4
7c673cae
FG
130FIELD _has_eob, 4, 4
131FIELD _has_eob_hdr, 4, 4
224ce89b
WB
132FIELD _has_hist, 4, 4
133FIELD _hist, _isal_mod_hist_size, _isal_mod_hist_align
134FIELD _buffer, BSIZE, 32
135FIELD _head, IGZIP_HASH_SIZE*2, 16
7c673cae
FG
136
137%assign _isal_zstate_size _FIELD_OFFSET
138%assign _isal_zstate_align _STRUCT_ALIGN
139
140_bitbuf_m_bits equ _bitbuf+_m_bits
141_bitbuf_m_bit_count equ _bitbuf+_m_bit_count
142_bitbuf_m_out_buf equ _bitbuf+_m_out_buf
143_bitbuf_m_out_end equ _bitbuf+_m_out_end
144_bitbuf_m_out_start equ _bitbuf+_m_out_start
145
224ce89b
WB
146_hist_lit_len equ _hist+_ll_hist
147_hist_dist equ _hist+_d_hist
7c673cae
FG
148;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
149;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
150;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
151
152START_FIELDS ;; isal_zstream
153
154;; name size align
155FIELD _next_in, 8, 8
156FIELD _avail_in, 4, 4
157FIELD _total_in, 4, 4
158FIELD _next_out, 8, 8
159FIELD _avail_out, 4, 4
160FIELD _total_out, 4, 4
161FIELD _hufftables, 8, 8
224ce89b
WB
162FIELD _level, 4, 4
163FIELD _level_buf_size, 4, 4
164FIELD _level_buf, 8, 8
7c673cae
FG
165FIELD _end_of_stream, 4, 4
166FIELD _flush, 4, 4
224ce89b 167FIELD _gzip_flag, 4, 4
7c673cae
FG
168FIELD _internal_state, _isal_zstate_size, _isal_zstate_align
169
170%assign _isal_zstream_size _FIELD_OFFSET
171%assign _isal_zstream_align _STRUCT_ALIGN
172
173_internal_state_b_bytes_valid equ _internal_state+_b_bytes_valid
174_internal_state_b_bytes_processed equ _internal_state+_b_bytes_processed
175_internal_state_file_start equ _internal_state+_file_start
176_internal_state_crc equ _internal_state+_crc
177_internal_state_bitbuf equ _internal_state+_bitbuf
178_internal_state_state equ _internal_state+_state
179_internal_state_count equ _internal_state+_count
180_internal_state_tmp_out_buff equ _internal_state+_tmp_out_buff
181_internal_state_tmp_out_start equ _internal_state+_tmp_out_start
182_internal_state_tmp_out_end equ _internal_state+_tmp_out_end
7c673cae
FG
183_internal_state_has_eob equ _internal_state+_has_eob
184_internal_state_has_eob_hdr equ _internal_state+_has_eob_hdr
224ce89b 185_internal_state_has_hist equ _internal_state+_has_hist
7c673cae
FG
186_internal_state_buffer equ _internal_state+_buffer
187_internal_state_head equ _internal_state+_head
188_internal_state_bitbuf_m_bits equ _internal_state+_bitbuf_m_bits
189_internal_state_bitbuf_m_bit_count equ _internal_state+_bitbuf_m_bit_count
190_internal_state_bitbuf_m_out_buf equ _internal_state+_bitbuf_m_out_buf
191_internal_state_bitbuf_m_out_end equ _internal_state+_bitbuf_m_out_end
192_internal_state_bitbuf_m_out_start equ _internal_state+_bitbuf_m_out_start
224ce89b
WB
193_internal_state_hist_lit_len equ _internal_state+_hist_lit_len
194_internal_state_hist_dist equ _internal_state+_hist_dist
7c673cae
FG
195
196;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
197;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
198;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
224ce89b
WB
199;; Internal States
200ZSTATE_NEW_HDR equ 0
201ZSTATE_HDR equ (ZSTATE_NEW_HDR + 1)
202ZSTATE_CREATE_HDR equ (ZSTATE_HDR + 1)
203ZSTATE_BODY equ (ZSTATE_CREATE_HDR + 1)
204ZSTATE_FLUSH_READ_BUFFER equ (ZSTATE_BODY + 1)
205ZSTATE_FLUSH_ICF_BUFFER equ (ZSTATE_FLUSH_READ_BUFFER + 1)
206ZSTATE_SYNC_FLUSH equ (ZSTATE_FLUSH_ICF_BUFFER + 1)
207ZSTATE_FLUSH_WRITE_BUFFER equ (ZSTATE_SYNC_FLUSH + 1)
208ZSTATE_TRL equ (ZSTATE_FLUSH_WRITE_BUFFER + 1)
7c673cae
FG
209
210;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
211;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
212;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
213_NO_FLUSH equ 0
214_SYNC_FLUSH equ 1
215_FULL_FLUSH equ 2
216_STORED_BLK equ 0
217%assign _STORED_BLK_END 65535
218;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
219;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
220;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
221