You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

137 lines
3.5 KiB

Index: configure.in
--- configure.in.orig 2006-10-13 03:10:53.000000000 +0200
+++ configure.in 2016-03-26 18:46:45.717275239 +0100
@@ -58,8 +58,10 @@
encode_rs_av.o \
dotprod_av.o sumsq_av.o peakval_av.o cpu_mode_ppc.o"
;;
+x86_64*)
+ MLIBS="cpu_mode_unknown.o" ;;
*)
- MLIBS=
+ MLIBS="cpu_mode_unknown.o" ;;
esac
case $target_os in
darwin*)
Index: cpu_mode_unknown.c
--- cpu_mode_unknown.c.orig 2016-03-26 18:46:45.717275239 +0100
+++ cpu_mode_unknown.c 2016-03-26 18:46:45.717275239 +0100
@@ -0,0 +1,20 @@
+/* Determine CPU support for SIMD
+ * Copyright 2004 Phil Karn, KA9Q
+ */
+#include <stdio.h>
+#include "fec.h"
+
+/* 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){
+
+ if (Cpu_mode != UNKNOWN)
+ return;
+ Cpu_mode = PORT;
+}
Index: dotprod.c
--- dotprod.c.orig 2006-10-13 03:10:53.000000000 +0200
+++ dotprod.c 2016-03-26 18:46:45.717275239 +0100
@@ -54,12 +54,16 @@
switch(Cpu_mode){
case PORT:
default:
+ freedp_port(p);
+ break;
#ifdef __i386__
case MMX:
case SSE:
- return freedp_mmx(p);
+ freedp_mmx(p);
+ break;
case SSE2:
- return freedp_sse2(p);
+ freedp_sse2(p);
+ break;
#endif
#ifdef __VEC__
case ALTIVEC:
Index: fec.h
--- fec.h.orig 2006-10-13 03:10:53.000000000 +0200
+++ fec.h 2016-03-26 18:46:45.717275239 +0100
@@ -262,7 +262,7 @@
void find_cpu_mode(void); /* Call this once at startup to set Cpu_mode */
/* Determine parity of argument: 1 = odd, 0 = even */
-#ifdef __i386__
+#ifdef notyet__i386__
static inline int parityb(unsigned char x){
__asm__ __volatile__ ("test %1,%1;setpo %0" : "=g"(x) : "r" (x));
return x;
Index: makefile.in
--- makefile.in.orig 2006-10-13 03:10:53.000000000 +0200
+++ makefile.in 2016-03-26 18:47:43.527619500 +0100
@@ -6,6 +6,9 @@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+mandir=@mandir@
VPATH = @srcdir@
CC=@CC@
LIBS=@MLIBS@ fec.o sim.o viterbi27.o viterbi27_port.o viterbi29.o viterbi29_port.o \
@@ -41,14 +44,12 @@
./vtest615
install: all
- mkdir -p @libdir@
- install -m 644 -p $(SHARED_LIB) libfec.a @libdir@
-# (cd @libdir@;ln -f -s $(SHARED_LIB) libfec.so)
- @REBIND@
- mkdir -p @includedir@
- install -m 644 -p fec.h @includedir@
- mkdir -m 0755 -p @mandir@/man3
- install -m 644 -p simd-viterbi.3 rs.3 dsp.3 @mandir@/man3
+ mkdir -p $(libdir)
+ install -m 644 -p $(SHARED_LIB) libfec.a $(libdir)
+ mkdir -p $(includedir)
+ install -m 644 -p fec.h $(includedir)
+ mkdir -m 0755 -p $(mandir)/man3
+ install -m 644 -p simd-viterbi.3 rs.3 dsp.3 $(mandir)/man3
peaktest: peaktest.o libfec.a
gcc -g -o $@ $^
@@ -146,10 +147,10 @@
./gen_ccsds > ccsds_tab.c
gen_ccsds: gen_ccsds.o init_rs_char.o
- gcc -o $@ $^
+ $(CC) $(CFLAGS) -o $@ $^
gen_ccsds.o: gen_ccsds.c
- gcc $(CFLAGS) -c -o $@ $<
+ $(CC) $(CFLAGS) -c -o $@ $<
ccsds_tal.o: ccsds_tal.c
@@ -157,7 +158,7 @@
./gen_ccsds_tal > ccsds_tal.c
exercise_char.o: exercise.c
- gcc $(CFLAGS) -c -o $@ $<
+ $(CC) $(CFLAGS) -c -o $@ $<
exercise_int.o: exercise.c
gcc -DBIGSYM=1 $(CFLAGS) -c -o $@ $<
@@ -232,6 +233,7 @@
cpu_mode_ppc.o: cpu_mode_ppc.c fec.h
+cpu_mode_unknown.o: cpu_mode_unknown.c fec.h
clean:
rm -f *.o $(SHARED_LIB) *.a rs_speedtest peaktest sumsq_test dtest vtest27 vtest29 vtest39 vtest615 rstest ccsds_tab.c ccsds_tal.c gen_ccsds gen_ccsds_tal core