ec: Fixes for 32-bit build

Change-Id: Iac362f0d7282716a8502afcec939b0d1877a943f
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
Greg Tucker 2017-03-21 13:46:30 -07:00
parent a0bfd8d02b
commit 5d9cf8cadf
5 changed files with 22 additions and 13 deletions

View File

@ -20,6 +20,7 @@ examples=
other_tests=
lsrc_x86_64=
lsrc_x86_32=
lsrc_base_aliases=
lsrc32=
unit_tests32=
perf_tests32=

View File

@ -27,12 +27,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
########################################################################
lsrc += erasure_code/ec_highlevel_func.c \
erasure_code/ec_base.c
lsrc += erasure_code/ec_base.c
lsrc_base_aliases += erasure_code/ec_base_aliases.c
lsrc_x86_64 += \
erasure_code/ec_highlevel_func.c \
erasure_code/gf_vect_mul_sse.asm \
erasure_code/gf_vect_mul_avx.asm \
erasure_code/gf_vect_dot_prod_sse.asm \
@ -85,6 +85,7 @@ lsrc_x86_64 += \
erasure_code/gf_4vect_mad_avx512.asm
lsrc_x86_32 += \
erasure_code/ec_highlevel_func.c \
erasure_code/ec_multibinary.asm \
erasure_code/gf_vect_dot_prod_avx.asm \
erasure_code/gf_2vect_dot_prod_avx.asm \

View File

@ -33,6 +33,18 @@
#include "ec_base.h" // for GF tables
#include "types.h"
void ec_init_tables(int k, int rows, unsigned char *a, unsigned char *g_tbls)
{
int i, j;
for (i = 0; i < rows; i++) {
for (j = 0; j < k; j++) {
gf_vect_mul_init(*a++, g_tbls);
g_tbls += 32;
}
}
}
unsigned char gf_mul(unsigned char a, unsigned char b)
{
#ifndef GF_LARGE_TABLES

View File

@ -30,17 +30,6 @@
#include "erasure_code.h"
#include "types.h"
void ec_init_tables(int k, int rows, unsigned char *a, unsigned char *g_tbls)
{
int i, j;
for (i = 0; i < rows; i++) {
for (j = 0; j < k; j++) {
gf_vect_mul_init(*a++, g_tbls);
g_tbls += 32;
}
}
}
void ec_encode_data_sse(int len, int k, int rows, unsigned char *g_tbls, unsigned char **data,
unsigned char **coding)

View File

@ -80,6 +80,12 @@ ifeq ($(arch),mingw)
AR=x86_64-w64-mingw32-ar
endif
# arch=noarch build options
ARFLAGS_noarch = cr $@
ifeq ($(arch),noarch)
host_cpu=base_aliases
endif
ASFLAGS_Darwin = -f macho64 --prefix=_
ARFLAGS_Darwin = -r $@
ifeq ($(arch),Darwin)