diff options
author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2024-06-19 00:00:00 +0000 |
---|---|---|
committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2024-06-19 15:32:41 +0500 |
commit | a7a1d4a241492e81f659a920f7379c193593ebc6 (patch) | |
tree | 2ff203d3b43b3f6d18abaac21923f729fdb93e43 /Asm/x86/LzFindOpt.asm | |
parent | 89a73b901229c8550c172c9556ff8442ae7ac4b8 (diff) | |
download | 7zip-24.07.tar.gz 7zip-24.07.tar.bz2 7zip-24.07.zip |
24.0724.07
Diffstat (limited to '')
-rw-r--r-- | Asm/x86/LzFindOpt.asm | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/Asm/x86/LzFindOpt.asm b/Asm/x86/LzFindOpt.asm index 42e10bd..94c5c76 100644 --- a/Asm/x86/LzFindOpt.asm +++ b/Asm/x86/LzFindOpt.asm | |||
@@ -1,5 +1,5 @@ | |||
1 | ; LzFindOpt.asm -- ASM version of GetMatchesSpecN_2() function | 1 | ; LzFindOpt.asm -- ASM version of GetMatchesSpecN_2() function |
2 | ; 2021-07-21: Igor Pavlov : Public domain | 2 | ; 2024-06-18: Igor Pavlov : Public domain |
3 | ; | 3 | ; |
4 | 4 | ||
5 | ifndef x64 | 5 | ifndef x64 |
@@ -11,10 +11,31 @@ include 7zAsm.asm | |||
11 | 11 | ||
12 | MY_ASM_START | 12 | MY_ASM_START |
13 | 13 | ||
14 | _TEXT$LZFINDOPT SEGMENT ALIGN(64) 'CODE' | 14 | ifndef Z7_LZ_FIND_OPT_ASM_USE_SEGMENT |
15 | if (IS_LINUX gt 0) | ||
16 | Z7_LZ_FIND_OPT_ASM_USE_SEGMENT equ 1 | ||
17 | else | ||
18 | Z7_LZ_FIND_OPT_ASM_USE_SEGMENT equ 1 | ||
19 | endif | ||
20 | endif | ||
15 | 21 | ||
22 | ifdef Z7_LZ_FIND_OPT_ASM_USE_SEGMENT | ||
23 | _TEXT$LZFINDOPT SEGMENT ALIGN(64) 'CODE' | ||
16 | MY_ALIGN macro num:req | 24 | MY_ALIGN macro num:req |
17 | align num | 25 | align num |
26 | ; align 16 | ||
27 | endm | ||
28 | else | ||
29 | MY_ALIGN macro num:req | ||
30 | ; We expect that ".text" is aligned for 16-bytes. | ||
31 | ; So we don't need large alignment inside our function. | ||
32 | align 16 | ||
33 | endm | ||
34 | endif | ||
35 | |||
36 | |||
37 | MY_ALIGN_16 macro | ||
38 | MY_ALIGN 16 | ||
18 | endm | 39 | endm |
19 | 40 | ||
20 | MY_ALIGN_32 macro | 41 | MY_ALIGN_32 macro |
@@ -136,7 +157,11 @@ COPY_VAR_64 macro dest_var, src_var | |||
136 | endm | 157 | endm |
137 | 158 | ||
138 | 159 | ||
160 | ifdef Z7_LZ_FIND_OPT_ASM_USE_SEGMENT | ||
139 | ; MY_ALIGN_64 | 161 | ; MY_ALIGN_64 |
162 | else | ||
163 | MY_ALIGN_16 | ||
164 | endif | ||
140 | MY_PROC GetMatchesSpecN_2, 13 | 165 | MY_PROC GetMatchesSpecN_2, 13 |
141 | MY_PUSH_PRESERVED_ABI_REGS | 166 | MY_PUSH_PRESERVED_ABI_REGS |
142 | mov r0, RSP | 167 | mov r0, RSP |
@@ -508,6 +533,8 @@ fin: | |||
508 | MY_POP_PRESERVED_ABI_REGS | 533 | MY_POP_PRESERVED_ABI_REGS |
509 | MY_ENDP | 534 | MY_ENDP |
510 | 535 | ||
536 | ifdef Z7_LZ_FIND_OPT_ASM_USE_SEGMENT | ||
511 | _TEXT$LZFINDOPT ENDS | 537 | _TEXT$LZFINDOPT ENDS |
538 | endif | ||
512 | 539 | ||
513 | end | 540 | end |