Index: head/comms/libfec/Makefile =================================================================== --- head/comms/libfec/Makefile (revision 492336) +++ head/comms/libfec/Makefile (revision 492337) @@ -1,48 +1,46 @@ # Created by: db # $FreeBSD$ PORTNAME= libfec PORTVERSION= 3.0.1 PORTREVISION= 3 CATEGORIES= comms astro hamradio math MASTER_SITES= http://www.ka9q.net/code/fec/ \ LOCAL/db DISTNAME= fec-${PORTVERSION} MAINTAINER= hamradio@FreeBSD.org COMMENT= Several forward error correction (FEC) decoders LICENSE= LGPL21 -BROKEN_powerpc64= fails to compile: cc1: error: unrecognized command line option -faltivec - MAKEFILE= makefile GNU_CONFIGURE= yes -USES= autoreconf gmake tar:bzip2 +USES= autoreconf compiler:c11 gmake tar:bzip2 USE_LDCONFIG= yes PLIST_FILES= include/fec.h \ lib/libfec.so \ lib/libfec.a \ man/man3/dsp.3.gz \ man/man3/rs.3.gz \ man/man3/simd-viterbi.3.gz # makefile tries to create libfec.so from object files compiled without -fPIC. CFLAGS+= -fPIC post-patch: @${CP} ${FILESDIR}/cpu_mode.c ${WRKSRC} do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/include @${MKDIR} ${STAGEDIR}${PREFIX}/lib @${MKDIR} ${STAGEDIR}${MAN3PREFIX}/man/man3 ${INSTALL_DATA} ${WRKSRC}/fec.h ${STAGEDIR}${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/libfec.a ${STAGEDIR}${PREFIX}/lib ${INSTALL_LIB} ${WRKSRC}/libfec.so ${STAGEDIR}${PREFIX}/lib .for _man in dsp.3 simd-viterbi.3 rs.3 ${INSTALL_MAN} ${WRKSRC}/${_man} ${STAGEDIR}${MAN3PREFIX}/man/man3 .endfor .include Index: head/comms/libfec/files/cpu_mode.c =================================================================== --- head/comms/libfec/files/cpu_mode.c (revision 492336) +++ head/comms/libfec/files/cpu_mode.c (revision 492337) @@ -1,50 +1,55 @@ /* Determine CPU support for SIMD * Copyright 2004 Phil Karn, KA9Q */ #include #include "fec.h" #ifdef __VEC__ +#include #include #endif /* Various SIMD instruction set names */ char *Cpu_modes[] = {"Unknown","Portable C","x86 Multi Media Extensions (MMX)", "x86 Streaming SIMD Extensions (SSE)", "x86 Streaming SIMD Extensions 2 (SSE2)", "PowerPC G4/G5 Altivec/Velocity Engine"}; enum cpu_mode Cpu_mode; void find_cpu_mode(void){ int f; if(Cpu_mode != UNKNOWN) return; else Cpu_mode = PORT; #ifdef __i386__ /* Figure out what kind of CPU we have */ f = cpu_features(); if(f & (1<<26)){ /* SSE2 is present */ Cpu_mode = SSE2; } else if(f & (1<<25)){ /* SSE is present */ Cpu_mode = SSE; } else if(f & (1<<23)){ /* MMX is present */ Cpu_mode = MMX; } #endif -//#ifdef __VEC__ -#if 0 -// This looks very Linux specific +#ifdef __VEC__ { /* Ask the OS if we have Altivec support */ +#ifdef __APPLE__ int selectors[2] = { CTL_HW, HW_VECTORUNIT }; +#endif int hasVectorUnit = 0; size_t length = sizeof(hasVectorUnit); +#ifdef __APPLE__ int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0); +#elif __FreeBSD__ + int error = sysctlbyname("hw.altivec", &hasVectorUnit, &length, NULL, 0); +#endif if(0 == error && hasVectorUnit) Cpu_mode = ALTIVEC; } #endif fprintf(stderr,"SIMD CPU detect: %s\n",Cpu_modes[Cpu_mode]); } Index: head/comms/libfec/files/patch-configure.in =================================================================== --- head/comms/libfec/files/patch-configure.in (revision 492336) +++ head/comms/libfec/files/patch-configure.in (revision 492337) @@ -1,27 +1,28 @@ --- configure.in.orig 2006-10-13 01:10:53 UTC +++ configure.in @@ -38,7 +38,7 @@ AC_CANONICAL_SYSTEM case $target_cpu in i386|i486|i586|i686) ARCH_OPTION="-march=$target_cpu" - MLIBS="viterbi27_mmx.o mmxbfly27.o viterbi27_sse.o ssebfly27.o viterbi27_sse2.o sse2bfly27.o \ + MLIBS="cpu_features.o viterbi27_mmx.o mmxbfly27.o viterbi27_sse.o ssebfly27.o viterbi27_sse2.o sse2bfly27.o \ viterbi29_mmx.o mmxbfly29.o viterbi29_sse.o ssebfly29.o viterbi29_sse2.o sse2bfly29.o \ viterbi39_sse2.o viterbi39_sse.o viterbi39_mmx.o \ viterbi615_mmx.o viterbi615_sse.o viterbi615_sse2.o \ @@ -50,13 +50,13 @@ i386|i486|i586|i686) sumsq.o sumsq_port.o \ sumsq_sse2.o sumsq_sse2_assist.o \ sumsq_mmx.o sumsq_mmx_assist.o \ - cpu_features.o cpu_mode_x86.o" + cpu_features.o" ;; powerpc*) - ARCH_OPTION="-fno-common -faltivec" +- ARCH_OPTION="-fno-common -faltivec" ++ ARCH_OPTION="-fno-common -maltivec" MLIBS="viterbi27_av.o viterbi29_av.o viterbi39_av.o viterbi615_av.o \ encode_rs_av.o \ - dotprod_av.o sumsq_av.o peakval_av.o cpu_mode_ppc.o" + dotprod_av.o sumsq_av.o peakval_av.o" ;; *) MLIBS= Index: head/comms/libfec/files/patch-dotprod__av.c =================================================================== --- head/comms/libfec/files/patch-dotprod__av.c (nonexistent) +++ head/comms/libfec/files/patch-dotprod__av.c (revision 492337) @@ -0,0 +1,28 @@ +--- dotprod_av.c.orig 2019-02-05 19:37:00 UTC ++++ dotprod_av.c +@@ -3,6 +3,7 @@ + * Copyright 2004 Phil Karn + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ ++#include + #include + #include "fec.h" + +@@ -70,7 +71,7 @@ long dotprod_av(void *p,signed short a[]){ + nblocks = (dp->len+al-1)/8+1; + + /* Sum into four vectors each holding four 32-bit partial sums */ +- sums3 = sums2 = sums1 = sums0 = (vector signed int)(0); ++ sums3 = sums2 = sums1 = sums0 = (vector signed int){0}; + while(nblocks >= 4){ + sums0 = vec_msums(ar[nblocks-1],d[nblocks-1],sums0); + sums1 = vec_msums(ar[nblocks-2],d[nblocks-2],sums1); +@@ -85,7 +86,7 @@ long dotprod_av(void *p,signed short a[]){ + sums0 = vec_msums(ar[nblocks],d[nblocks],sums0); + } + /* Sum 4 partial sums into final result */ +- s.v = vec_sums(sums0,(vector signed int)(0)); ++ s.v = vec_sums(sums0,(vector signed int){0}); + + return s.w[3]; + } Property changes on: head/comms/libfec/files/patch-dotprod__av.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/comms/libfec/files/patch-encode__rs__8.c =================================================================== --- head/comms/libfec/files/patch-encode__rs__8.c (nonexistent) +++ head/comms/libfec/files/patch-encode__rs__8.c (revision 492337) @@ -0,0 +1,27 @@ +--- encode_rs_8.c.orig 2019-02-06 10:40:06 UTC ++++ encode_rs_8.c +@@ -3,6 +3,7 @@ + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ + #include ++#include + #include "fixed.h" + #ifdef __VEC__ + #include +@@ -36,10 +37,16 @@ void encode_rs_8(data_t *data, data_t *parity,int pad) + } + #elif __VEC__ + /* Ask the OS if we have Altivec support */ ++#ifdef __APPLE__ + int selectors[2] = { CTL_HW, HW_VECTORUNIT }; ++#endif + int hasVectorUnit = 0; + size_t length = sizeof(hasVectorUnit); ++#ifdef __APPLE__ + int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0); ++#elif __FreeBSD__ ++ int error = sysctlbyname("hw.altivec", &hasVectorUnit, &length, NULL, 0); ++#endif + if(0 == error && hasVectorUnit) + cpu_mode = ALTIVEC; + else Property changes on: head/comms/libfec/files/patch-encode__rs__8.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/comms/libfec/files/patch-encode__rs__av.c =================================================================== --- head/comms/libfec/files/patch-encode__rs__av.c (nonexistent) +++ head/comms/libfec/files/patch-encode__rs__av.c (revision 492337) @@ -0,0 +1,41 @@ +--- encode_rs_av.c.orig 2019-02-05 19:29:53 UTC ++++ encode_rs_av.c +@@ -2,6 +2,7 @@ + * Copyright 2004, Phil Karn KA9Q + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ ++#include + #include + #include + #include "fixed.h" +@@ -12,8 +13,8 @@ + */ + static union { vector unsigned char v; unsigned char c[16]; } table[256]; + +-static vector unsigned char reverse = (vector unsigned char)(0,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1); +-static vector unsigned char shift_right = (vector unsigned char)(15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30); ++static vector unsigned char reverse = (vector unsigned char){0,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; ++static vector unsigned char shift_right = (vector unsigned char){15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30}; + + extern data_t CCSDS_alpha_to[]; + extern data_t CCSDS_index_of[]; +@@ -40,8 +41,8 @@ void encode_rs_av(unsigned char *data,unsigned char *p + union { vector unsigned char v[2]; unsigned char c[32]; } shift_register; + int i; + +- shift_register.v[0] = (vector unsigned char)(0); +- shift_register.v[1] = (vector unsigned char)(0); ++ shift_register.v[0] = (vector unsigned char){0}; ++ shift_register.v[1] = (vector unsigned char){0}; + + for(i=0;i + #include "fec.h" + + signed short peakval_av(signed short *in,int cnt){ +@@ -14,11 +15,11 @@ signed short peakval_av(signed short *in,int cnt){ + union { vector signed char cv; vector signed short hv; signed short s[8]; signed char c[16];} s; + vector signed short smallest,largest; + +- smallest = (vector signed short)(0); +- largest = (vector signed short)(0); ++ smallest = (vector signed short){0}; ++ largest = (vector signed short){0}; + if((pad = (int)in & 15)!=0){ + /* Load unaligned leading word */ +- x = vec_perm(vec_ld(0,in),(vector signed short)(0),vec_lvsl(0,in)); ++ x = vec_perm(vec_ld(0,in),(vector signed short){0},vec_lvsl(0,in)); + if(cnt < 8){ /* Shift right to chop stuff beyond end of short block */ + s.c[15] = (8-cnt)<<4; + x = vec_sro(x,s.cv); Property changes on: head/comms/libfec/files/patch-peakval__av.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/comms/libfec/files/patch-sumsq__av.c =================================================================== --- head/comms/libfec/files/patch-sumsq__av.c (nonexistent) +++ head/comms/libfec/files/patch-sumsq__av.c (revision 492337) @@ -0,0 +1,47 @@ +--- sumsq_av.c.orig 2019-02-05 19:36:10 UTC ++++ sumsq_av.c +@@ -8,6 +8,7 @@ + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ + ++#include + #include "fec.h" + + unsigned long long sumsq_av(signed short *in,int cnt){ +@@ -17,15 +18,15 @@ unsigned long long sumsq_av(signed short *in,int cnt){ + int pad; + union { vector unsigned char cv; vector unsigned int iv; unsigned int w[4]; unsigned char c[16];} s; + +- carries = sums = (vector unsigned int)(0); ++ carries = sums = (vector unsigned int){0}; + if((pad = (int)in & 15)!=0){ + /* Load unaligned leading word */ +- x = vec_perm(vec_ld(0,in),(vector signed short)(0),vec_lvsl(0,in)); ++ x = vec_perm(vec_ld(0,in),(vector signed short){0},vec_lvsl(0,in)); + if(cnt < 8){ /* Shift right to chop stuff beyond end of short block */ + s.c[15] = (8-cnt)<<4; + x = vec_sro(x,s.cv); + } +- sums = (vector unsigned int)vec_msum(x,x,(vector signed int)(0)); ++ sums = (vector unsigned int)vec_msum(x,x,(vector signed int){0}); + in += 8-pad/2; + cnt -= 8-pad/2; + } +@@ -36,7 +37,7 @@ unsigned long long sumsq_av(signed short *in,int cnt){ + * the earlier terms separately to handle the carries + * The cast to unsigned is OK because squares are always positive + */ +- s1 = (vector unsigned int)vec_msum(x,x,(vector signed int)(0)); ++ s1 = (vector unsigned int)vec_msum(x,x,(vector signed int){0}); + carries = vec_add(carries,vec_addc(sums,s1)); + sums = vec_add(sums,s1); + in += 8; +@@ -47,7 +48,7 @@ unsigned long long sumsq_av(signed short *in,int cnt){ + x = vec_ld(0,in); + s.c[15] = (8-cnt)<<4; + x = vec_sro(x,s.cv); +- s1 = (vector unsigned int)vec_msum(x,x,(vector signed int)(0)); ++ s1 = (vector unsigned int)vec_msum(x,x,(vector signed int){0}); + carries = vec_add(carries,vec_addc(sums,s1)); + sums = vec_add(sums,s1); + } Property changes on: head/comms/libfec/files/patch-sumsq__av.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/comms/libfec/files/patch-viterbi27__av.c =================================================================== --- head/comms/libfec/files/patch-viterbi27__av.c (nonexistent) +++ head/comms/libfec/files/patch-viterbi27__av.c (revision 492337) @@ -0,0 +1,41 @@ +--- viterbi27_av.c.orig 2019-02-05 19:34:45 UTC ++++ viterbi27_av.c +@@ -1,6 +1,7 @@ + /* K=7 r=1/2 Viterbi decoder for PowerPC G4/G5 Altivec instructions + * Feb 2004, Phil Karn, KA9Q + */ ++#include + #include + #include + #include +@@ -31,7 +32,7 @@ int init_viterbi27_av(void *p,int starting_state){ + if(p == NULL) + return -1; + for(i=0;i<4;i++) +- vp->metrics1.v[i] = (vector unsigned char)(63); ++ vp->metrics1.v[i] = (vector unsigned char){63}; + vp->old_metrics = &vp->metrics1; + vp->new_metrics = &vp->metrics2; + vp->dp = vp->decisions; +@@ -134,8 +135,8 @@ int update_viterbi27_blk_av(void *p,unsigned char *sym + + /* Form first set of 16 branch metrics */ + metric = vec_avg(vec_xor(Branchtab27[0].v[0],sym0v),vec_xor(Branchtab27[1].v[0],sym1v)); +- metric = vec_sr(metric,(vector unsigned char)(3)); +- m_metric = vec_sub((vector unsigned char)(31),metric); ++ metric = vec_sr(metric,(vector unsigned char){3}); ++ m_metric = vec_sub((vector unsigned char){31},metric); + + /* Form first set of path metrics */ + m0 = vec_adds(vp->old_metrics->v[0],metric); +@@ -145,8 +146,8 @@ int update_viterbi27_blk_av(void *p,unsigned char *sym + + /* Form second set of 16 branch metrics */ + metric = vec_avg(vec_xor(Branchtab27[0].v[1],sym0v),vec_xor(Branchtab27[1].v[1],sym1v)); +- metric = vec_sr(metric,(vector unsigned char)(3)); +- m_metric = vec_sub((vector unsigned char)(31),metric); ++ metric = vec_sr(metric,(vector unsigned char){3}); ++ m_metric = vec_sub((vector unsigned char){31},metric); + + /* Compare and select first set */ + decision0 = vec_cmpgt(m0,m1); Property changes on: head/comms/libfec/files/patch-viterbi27__av.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/comms/libfec/files/patch-viterbi29__av.c =================================================================== --- head/comms/libfec/files/patch-viterbi29__av.c (nonexistent) +++ head/comms/libfec/files/patch-viterbi29__av.c (revision 492337) @@ -0,0 +1,34 @@ +--- viterbi29_av.c.orig 2019-02-05 19:33:58 UTC ++++ viterbi29_av.c +@@ -2,9 +2,11 @@ + * Copyright Feb 2004, Phil Karn, KA9Q + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ ++#include + #include + #include + #include ++#include + #include + #include "fec.h" + +@@ -31,7 +33,7 @@ int init_viterbi29_av(void *p,int starting_state){ + if(p == NULL) + return -1; + for(i=0;i<16;i++) +- vp->metrics1.v[i] = (vector unsigned char)(63); ++ vp->metrics1.v[i] = (vector unsigned char){63}; + + vp->old_metrics = &vp->metrics1; + vp->new_metrics = &vp->metrics2; +@@ -136,8 +138,8 @@ int update_viterbi29_blk_av(void *p,unsigned char *sym + + /* Form branch metrics */ + metric = vec_avg(vec_xor(Branchtab29[0].v[i],sym1v),vec_xor(Branchtab29[1].v[i],sym2v)); +- metric = vec_sr(metric,(vector unsigned char)(3)); +- m_metric = (vector unsigned char)(31) - metric; ++ metric = vec_sr(metric,(vector unsigned char){3}); ++ m_metric = (vector unsigned char){31} - metric; + + /* Add branch metrics to path metrics */ + m0 = vec_adds(vp->old_metrics->v[i],metric); Property changes on: head/comms/libfec/files/patch-viterbi29__av.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/comms/libfec/files/patch-viterbi39__av.c =================================================================== --- head/comms/libfec/files/patch-viterbi39__av.c (nonexistent) +++ head/comms/libfec/files/patch-viterbi39__av.c (revision 492337) @@ -0,0 +1,46 @@ +--- viterbi39_av.c.orig 2019-02-05 19:31:24 UTC ++++ viterbi39_av.c +@@ -3,6 +3,7 @@ + * Copyright Aug 2006, Phil Karn, KA9Q + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ ++#include + #include + #include + #include +@@ -30,7 +31,7 @@ int init_viterbi39_av(void *p,int starting_state){ + int i; + + for(i=0;i<32;i++) +- vp->metrics1.v[i] = (vector unsigned short)(1000); ++ vp->metrics1.v[i] = (vector unsigned short){1000}; + + vp->old_metrics = &vp->metrics1; + vp->new_metrics = &vp->metrics2; +@@ -111,7 +112,7 @@ int update_viterbi39_blk_av(void *p,unsigned char *sym + struct v39 *vp = p; + decision_t *d = (decision_t *)vp->dp; + int path_metric = 0; +- vector unsigned char decisions = (vector unsigned char)(0); ++ vector unsigned char decisions = (vector unsigned char){0}; + + while(nbits--){ + vector unsigned short symv,sym0v,sym1v,sym2v; +@@ -122,7 +123,7 @@ int update_viterbi39_blk_av(void *p,unsigned char *sym + /* Splat the 0th symbol across sym0v, the 1st symbol across sym1v, etc */ + s = (vector unsigned char)vec_perm(vec_ld(0,syms),vec_ld(5,syms),vec_lvsl(0,syms)); + +- symv = (vector unsigned short)vec_mergeh((vector unsigned char)(0),s); /* Unsigned byte->word unpack */ ++ symv = (vector unsigned short)vec_mergeh((vector unsigned char){0},s); /* Unsigned byte->word unpack */ + sym0v = vec_splat(symv,0); + sym1v = vec_splat(symv,1); + sym2v = vec_splat(symv,2); +@@ -140,7 +141,7 @@ int update_viterbi39_blk_av(void *p,unsigned char *sym + m0 = vec_add(vec_xor(Branchtab39[0].v[i],sym0v),vec_xor(Branchtab39[1].v[i],sym1v)); + m1 = vec_xor(Branchtab39[2].v[i],sym2v); + metric = vec_add(m0,m1); +- m_metric = vec_sub((vector unsigned short)(765),metric); ++ m_metric = vec_sub((vector unsigned short){765},metric); + + /* Add branch metrics to path metrics */ + m0 = vec_adds(vp->old_metrics->v[i],metric); Property changes on: head/comms/libfec/files/patch-viterbi39__av.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/comms/libfec/files/patch-viterbi615__av.c =================================================================== --- head/comms/libfec/files/patch-viterbi615__av.c (nonexistent) +++ head/comms/libfec/files/patch-viterbi615__av.c (revision 492337) @@ -0,0 +1,46 @@ +--- viterbi615_av.c.orig 2019-02-05 19:33:18 UTC ++++ viterbi615_av.c +@@ -3,6 +3,7 @@ + * Copyright Mar 2004, Phil Karn, KA9Q + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ ++#include + #include + #include + #include +@@ -33,7 +34,7 @@ int init_viterbi615_av(void *p,int starting_state){ + return -1; + + for(i=0;i<2048;i++) +- vp->metrics1.v[i] = (vector unsigned short)(5000); ++ vp->metrics1.v[i] = (vector unsigned short){5000}; + + vp->old_metrics = &vp->metrics1; + vp->new_metrics = &vp->metrics2; +@@ -111,7 +112,7 @@ int update_viterbi615_blk_av(void *p,unsigned char *sy + struct v615 *vp = p; + decision_t *d = (decision_t *)vp->dp; + int path_metric = 0; +- vector unsigned char decisions = (vector unsigned char)(0); ++ vector unsigned char decisions = (vector unsigned char){0}; + + while(nbits--){ + vector unsigned short symv,sym0v,sym1v,sym2v,sym3v,sym4v,sym5v; +@@ -122,7 +123,7 @@ int update_viterbi615_blk_av(void *p,unsigned char *sy + /* Splat the 0th symbol across sym0v, the 1st symbol across sym1v, etc */ + s = (vector unsigned char)vec_perm(vec_ld(0,syms),vec_ld(5,syms),vec_lvsl(0,syms)); + +- symv = (vector unsigned short)vec_mergeh((vector unsigned char)(0),s); /* Unsigned byte->word unpack */ ++ symv = (vector unsigned short)vec_mergeh((vector unsigned char){0},s); /* Unsigned byte->word unpack */ + sym0v = vec_splat(symv,0); + sym1v = vec_splat(symv,1); + sym2v = vec_splat(symv,2); +@@ -145,7 +146,7 @@ int update_viterbi615_blk_av(void *p,unsigned char *sy + m2 = vec_add(vec_xor(Branchtab615[4].v[i],sym4v),vec_xor(Branchtab615[5].v[i],sym5v)); + metric = vec_add(m0,m1); + metric = vec_add(metric,m2); +- m_metric = vec_sub((vector unsigned short)(1530),metric); ++ m_metric = vec_sub((vector unsigned short){1530},metric); + + /* Add branch metrics to path metrics */ + m0 = vec_adds(vp->old_metrics->v[i],metric); Property changes on: head/comms/libfec/files/patch-viterbi615__av.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property