File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
contents/huffman_encoding/code/asm-x64 Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -226,23 +226,20 @@ decode_done:
226226# rsi - Huffman - tree root (ptr)
227227generate_codebook:
228228 push r12
229- push r13
230- sub rsp , bitstr_size + 8 # 8 extra bytes for alignment
231- mov r12 , rdi
232- mov r13 , rsi
229+ sub rsp , bitstr_size + 16 # 16 extra bytes for alignment
230+ mov r12 , rsi
233231 xorps xmm0 , xmm0 # Create a 0 - initialized bitstring. This will be
234232 movaps XMMWORD PTR [ rsp ], xmm0 # used in the recursive function calls
235233 movaps XMMWORD PTR [ rsp + 16 ], xmm0
236234 mov QWORD PTR [ rsp + 32 ], 0
237235 xor rsi , rsi
238236 mov rdx , codebook_size
239237 call memset
240- mov rdi , r12
241- mov rsi , r13
238+ mov rdi , rax
239+ mov rsi , r12
242240 mov rdx , rsp
243241 call generate_codebook_recurse
244- add rsp , bitstr_size + 8
245- pop r13
242+ add rsp , bitstr_size + 16
246243 pop r12
247244 ret
248245
You can’t perform that action at this time.
0 commit comments