igzip: Avoid some nested multibinary calls in deflate_body

Change-Id: I2b433f63664ffa27fc125a6a859a1b8053212d7f
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
This commit is contained in:
Roy Oursler 2018-02-08 14:59:36 -07:00 committed by Greg Tucker
parent 47e914f98f
commit 4b45beff4f
3 changed files with 14 additions and 48 deletions

View File

@ -34,9 +34,9 @@
void isal_deflate_body_base(struct isal_zstream *stream);
void isal_deflate_finish_base(struct isal_zstream *stream);
void isal_deflate_icf_body_base(struct isal_zstream *stream);
void isal_deflate_icf_body_hash8k_base(struct isal_zstream *stream);
void isal_deflate_icf_body_hash_hist_base(struct isal_zstream *stream);
void icf_body_hash1_fillgreedy_lazy(struct isal_zstream *stream);
void isal_deflate_icf_finish_hash8k_base(struct isal_zstream *stream);
void isal_deflate_icf_finish_hash_hist_base(struct isal_zstream *stream);
void isal_deflate_icf_finish_hash_map_base(struct isal_zstream *stream);
@ -66,11 +66,6 @@ void isal_deflate_finish(struct isal_zstream *stream)
isal_deflate_finish_base(stream);
}
void isal_deflate_icf_body(struct isal_zstream *stream)
{
isal_deflate_icf_body_base(stream);
}
void isal_deflate_icf_body_lvl1(struct isal_zstream *stream)
{
isal_deflate_icf_body_hash8k_base(stream);
@ -81,6 +76,11 @@ void isal_deflate_icf_body_lvl2(struct isal_zstream *stream)
isal_deflate_icf_body_hash_hist_base(stream);
}
void isal_deflate_icf_body_lvl3(struct isal_zstream *stream)
{
icf_body_hash1_fillgreedy_lazy(stream);
}
void isal_deflate_icf_finish_lvl1(struct isal_zstream *stream)
{
isal_deflate_icf_finish_hash8k_base(stream);

View File

@ -7,6 +7,7 @@ extern void gen_icf_map_lh1(struct isal_zstream *, struct deflate_icf *, uint32_
extern void set_long_icf_fg(uint8_t *, uint8_t *, struct deflate_icf *, struct level_buf *);
extern void isal_deflate_icf_body_lvl1(struct isal_zstream *);
extern void isal_deflate_icf_body_lvl2(struct isal_zstream *);
extern void isal_deflate_icf_body_lvl3(struct isal_zstream *);
/*
*************************************************************
* Helper functions
@ -318,41 +319,11 @@ void icf_body_lazyhash1_fillgreedy_greedy(struct isal_zstream *stream)
icf_body_next_state(stream);
}
void isal_deflate_icf_body_base(struct isal_zstream *stream)
void isal_deflate_icf_body(struct isal_zstream *stream)
{
switch (stream->level) {
case 3:
icf_body_hash1_fillgreedy_lazy(stream);
break;
case 2:
isal_deflate_icf_body_lvl2(stream);
break;
case 1:
default:
isal_deflate_icf_body_lvl1(stream);
}
}
void isal_deflate_icf_body_04(struct isal_zstream *stream)
{
switch (stream->level) {
case 3:
icf_body_lazyhash1_fillgreedy_greedy(stream);
break;
case 2:
isal_deflate_icf_body_lvl2(stream);
break;
case 1:
default:
isal_deflate_icf_body_lvl1(stream);
}
}
void isal_deflate_icf_body_06(struct isal_zstream *stream)
{
switch (stream->level) {
case 3:
icf_body_lazyhash1_fillgreedy_greedy(stream);
isal_deflate_icf_body_lvl3(stream);
break;
case 2:
isal_deflate_icf_body_lvl2(stream);

View File

@ -86,9 +86,8 @@ extern isal_deflate_hash_crc_01
extern isal_deflate_hash_mad_base
extern isal_deflate_icf_body_base
extern isal_deflate_icf_body_04
extern isal_deflate_icf_body_06
extern icf_body_hash1_fillgreedy_lazy
extern icf_body_lazyhash1_fillgreedy_greedy
section .text
@ -105,6 +104,9 @@ mbin_dispatch_init5 isal_deflate_icf_body_lvl1, isal_deflate_icf_body_hash8k_bas
mbin_interface isal_deflate_icf_body_lvl2
mbin_dispatch_init5 isal_deflate_icf_body_lvl2, isal_deflate_icf_body_hash_hist_base, isal_deflate_icf_body_hash_hist_01, isal_deflate_icf_body_hash_hist_02, isal_deflate_icf_body_hash_hist_04
mbin_interface isal_deflate_icf_body_lvl3
mbin_dispatch_init5 isal_deflate_icf_body_lvl3, icf_body_hash1_fillgreedy_lazy, icf_body_hash1_fillgreedy_lazy, icf_body_hash1_fillgreedy_lazy, icf_body_lazyhash1_fillgreedy_greedy
mbin_interface isal_deflate_icf_finish_lvl1
mbin_dispatch_init5 isal_deflate_icf_finish_lvl1, isal_deflate_icf_finish_hash8k_base, isal_deflate_icf_finish_hash8k_01, isal_deflate_icf_finish_hash8k_01, isal_deflate_icf_finish_hash8k_01
@ -155,10 +157,3 @@ mbin_dispatch_init5 isal_deflate_hash_lvl2, isal_deflate_hash_base, isal_deflate
mbin_interface isal_deflate_hash_lvl3
mbin_dispatch_init5 isal_deflate_hash_lvl3, isal_deflate_hash_base, isal_deflate_hash_base, isal_deflate_hash_base, isal_deflate_hash_mad_base
%ifdef HAVE_AS_KNOWS_AVX512
mbin_interface isal_deflate_icf_body
mbin_dispatch_init6 isal_deflate_icf_body, isal_deflate_icf_body_base, isal_deflate_icf_body_base, isal_deflate_icf_body_base, isal_deflate_icf_body_04, isal_deflate_icf_body_06
%else
mbin_interface isal_deflate_icf_body
mbin_dispatch_init5 isal_deflate_icf_body, isal_deflate_icf_body_base, isal_deflate_icf_body_base, isal_deflate_icf_body_base, isal_deflate_icf_body_04
%endif