diff --git a/build/exe.mk b/build/exe.mk index f146d61b..74e32a91 100644 --- a/build/exe.mk +++ b/build/exe.mk @@ -47,7 +47,7 @@ $(PROGRAM) : $(OBJS) $(CC) $(CFLAGS) -E $< -o $@ %.o : %.nasm - $(NASM) -f elf -d ELF -i i386/ $< -o $@ + $(NASM) -f elf -d ELF -i ia32/ $< -o $@ .PHONY : clean clean : diff --git a/build/lib.mk b/build/lib.mk index dc9dec2a..179b0a6e 100644 --- a/build/lib.mk +++ b/build/lib.mk @@ -49,7 +49,7 @@ $(DYNAMIC_LIB) : $(OBJS) $(CC) $(CFLAGS) -E $< -o $@ %.o : %.nasm - $(NASM) -f elf -d ELF -i i386/ $< -o $@ + $(NASM) -f elf -d ELF -i ia32/ $< -o $@ .PHONY : clean clean : diff --git a/configure.in b/configure.in index e1a94f25..b716da92 100644 --- a/configure.in +++ b/configure.in @@ -81,7 +81,7 @@ fi AC_OUTPUT( Makefile \ src/Makefile \ src/libFLAC/Makefile \ - src/libFLAC/i386/Makefile \ + src/libFLAC/ia32/Makefile \ src/flac/Makefile \ src/metaflac/Makefile \ src/plugin_xmms/Makefile \ diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am index 1a7c935b..b4566bc8 100644 --- a/src/libFLAC/Makefile.am +++ b/src/libFLAC/Makefile.am @@ -31,8 +31,8 @@ if FLaC__NO_ASM else if FLaC__CPU_IA32 if FLaC__HAS_NASM -SUBDIRS = i386 . -libFLAC_la_LIBADD = i386/libFLAC-asm.la +SUBDIRS = ia32 . +libFLAC_la_LIBADD = ia32/libFLAC-asm.la endif endif endif diff --git a/src/libFLAC/Makefile.lite b/src/libFLAC/Makefile.lite index 4a0462d0..7a8c27fe 100644 --- a/src/libFLAC/Makefile.lite +++ b/src/libFLAC/Makefile.lite @@ -40,9 +40,9 @@ OBJS = \ stream_decoder.o \ stream_encoder.o \ stream_encoder_framing.o \ - i386/cpu_asm.o \ - i386/fixed_asm.o \ - i386/lpc_asm.o + ia32/cpu_asm.o \ + ia32/fixed_asm.o \ + ia32/lpc_asm.o include ../../build/lib.mk diff --git a/src/libFLAC/Makefile.vc b/src/libFLAC/Makefile.vc index 9cfbac5f..4d4f0bea 100644 --- a/src/libFLAC/Makefile.vc +++ b/src/libFLAC/Makefile.vc @@ -45,9 +45,9 @@ C_FILES= \ stream_encoder_framing.c NASM_FILES= \ - i386/cpu_asm.nasm \ - i386/fixed_asm.nasm \ - i386/lpc_asm.nasm + ia32/cpu_asm.nasm \ + ia32/fixed_asm.nasm \ + ia32/lpc_asm.nasm OBJS= $(C_FILES:.c=.obj) $(NASM_FILES:.nasm=.obj) @@ -56,13 +56,13 @@ all: libFLAC.lib libFLAC.lib: $(OBJS) link.exe -lib -out:../../obj/lib/$*.lib $(OBJS) -i386/cpu_asm.obj: i386/cpu_asm.nasm - $(NASM) -f win32 -d WIN32 -i i386/ i386/cpu_asm.nasm -o i386/cpu_asm.obj -i386/fixed_asm.obj: i386/fixed_asm.nasm - $(NASM) -f win32 -d WIN32 -i i386/ i386/fixed_asm.nasm -o i386/fixed_asm.obj -i386/lpc_asm.obj: i386/lpc_asm.nasm - $(NASM) -f win32 -d WIN32 -i i386/ i386/lpc_asm.nasm -o i386/lpc_asm.obj +ia32/cpu_asm.obj: ia32/cpu_asm.nasm + $(NASM) -f win32 -d WIN32 -i ia32/ ia32/cpu_asm.nasm -o ia32/cpu_asm.obj +ia32/fixed_asm.obj: ia32/fixed_asm.nasm + $(NASM) -f win32 -d WIN32 -i ia32/ ia32/fixed_asm.nasm -o ia32/fixed_asm.obj +ia32/lpc_asm.obj: ia32/lpc_asm.nasm + $(NASM) -f win32 -d WIN32 -i ia32/ ia32/lpc_asm.nasm -o ia32/lpc_asm.obj clean: - -del *.obj i386\*.obj *.pch + -del *.obj ia32\*.obj *.pch -del ..\..\obj\lib\libFLAC.lib ..\..\obj\lib\libFLAC.pdb diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c index 8afedb8f..f14ef178 100644 --- a/src/libFLAC/cpu.c +++ b/src/libFLAC/cpu.c @@ -35,7 +35,7 @@ void FLAC__cpu_info(FLAC__CPUInfo *info) #if !defined FLAC__NO_ASM && defined FLAC__HAS_NASM info->use_asm = true; { - unsigned cpuid = FLAC__cpu_info_asm_i386(); + unsigned cpuid = FLAC__cpu_info_asm_ia32(); info->data.ia32.cmov = (cpuid & FLAC__CPUINFO_IA32_CPUID_CMOV)? true : false; info->data.ia32.mmx = (cpuid & FLAC__CPUINFO_IA32_CPUID_MMX)? true : false; info->data.ia32.fxsr = (cpuid & FLAC__CPUINFO_IA32_CPUID_FXSR)? true : false; diff --git a/src/libFLAC/ia32/cpu_asm.nasm b/src/libFLAC/ia32/cpu_asm.nasm index 2869fda9..edd10b49 100644 --- a/src/libFLAC/ia32/cpu_asm.nasm +++ b/src/libFLAC/ia32/cpu_asm.nasm @@ -20,14 +20,14 @@ data_section -cglobal FLAC__cpu_info_asm_i386 +cglobal FLAC__cpu_info_asm_ia32 code_section ; ********************************************************************** ; ALIGN 16 -cident FLAC__cpu_info_asm_i386 +cident FLAC__cpu_info_asm_ia32 push ebx diff --git a/src/libFLAC/ia32/fixed_asm.nasm b/src/libFLAC/ia32/fixed_asm.nasm index b0aba2ef..88b37fd5 100644 --- a/src/libFLAC/ia32/fixed_asm.nasm +++ b/src/libFLAC/ia32/fixed_asm.nasm @@ -20,7 +20,7 @@ data_section -cglobal FLAC__fixed_compute_best_predictor_asm_i386_mmx_cmov +cglobal FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov code_section @@ -64,7 +64,7 @@ cglobal FLAC__fixed_compute_best_predictor_asm_i386_mmx_cmov ; return order; ; } ALIGN 16 -cident FLAC__fixed_compute_best_predictor_asm_i386_mmx_cmov +cident FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov ; esp + 36 == data[] ; esp + 40 == data_len diff --git a/src/libFLAC/ia32/lpc_asm.nasm b/src/libFLAC/ia32/lpc_asm.nasm index eddffcdc..de2d1ff1 100644 --- a/src/libFLAC/ia32/lpc_asm.nasm +++ b/src/libFLAC/ia32/lpc_asm.nasm @@ -20,14 +20,14 @@ data_section -cglobal FLAC__lpc_compute_autocorrelation_asm_i386 -cglobal FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_4 -cglobal FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_8 -cglobal FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_12 -cglobal FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386 -cglobal FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386_mmx -cglobal FLAC__lpc_restore_signal_asm_i386 -cglobal FLAC__lpc_restore_signal_asm_i386_mmx +cglobal FLAC__lpc_compute_autocorrelation_asm_ia32 +cglobal FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_4 +cglobal FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_8 +cglobal FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_12 +cglobal FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32 +cglobal FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32_mmx +cglobal FLAC__lpc_restore_signal_asm_ia32 +cglobal FLAC__lpc_restore_signal_asm_ia32_mmx code_section @@ -57,7 +57,7 @@ cglobal FLAC__lpc_restore_signal_asm_i386_mmx ; } ; ALIGN 16 -cident FLAC__lpc_compute_autocorrelation_asm_i386 +cident FLAC__lpc_compute_autocorrelation_asm_ia32 ;[esp + 24] == autoc[] ;[esp + 20] == lag ;[esp + 16] == data_len @@ -413,7 +413,7 @@ cident FLAC__lpc_compute_autocorrelation_asm_i386 ret ALIGN 16 -cident FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_4 +cident FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_4 ;[esp + 16] == autoc[] ;[esp + 12] == lag ;[esp + 8] == data_len @@ -460,7 +460,7 @@ cident FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_4 ret ALIGN 16 -cident FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_8 +cident FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_8 ;[esp + 16] == autoc[] ;[esp + 12] == lag ;[esp + 8] == data_len @@ -519,7 +519,7 @@ cident FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_8 ret ALIGN 16 -cident FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_12 +cident FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_12 ;[esp + 16] == autoc[] ;[esp + 12] == lag ;[esp + 8] == data_len @@ -602,7 +602,7 @@ cident FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_12 ; } ; ALIGN 16 -cident FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386 +cident FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32 ;[esp + 40] residual[] ;[esp + 36] lp_quantization ;[esp + 32] order @@ -812,7 +812,7 @@ cident FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386 ; the channel must be <= 16. Especially note that this routine cannot be used ; for side-channel coded 16bps channels since the effective bps is 17. ALIGN 16 -cident FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386_mmx +cident FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32_mmx ;[esp + 40] residual[] ;[esp + 36] lp_quantization ;[esp + 32] order @@ -977,7 +977,7 @@ cident FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386_mmx .last_one: mov eax, [esp + 32] inc ebx - jnz near FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386.begin + jnz near FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32.begin .end: pop edi @@ -1003,7 +1003,7 @@ cident FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386_mmx ; } ; } ALIGN 16 -cident FLAC__lpc_restore_signal_asm_i386 +cident FLAC__lpc_restore_signal_asm_ia32 ;[esp + 40] data[] ;[esp + 36] lp_quantization ;[esp + 32] order @@ -1210,7 +1210,7 @@ cident FLAC__lpc_restore_signal_asm_i386 ; the channel must be <= 16. Especially note that this routine cannot be used ; for side-channel coded 16bps channels since the effective bps is 17. ALIGN 16 -cident FLAC__lpc_restore_signal_asm_i386_mmx +cident FLAC__lpc_restore_signal_asm_ia32_mmx ;[esp + 40] data[] ;[esp + 36] lp_quantization ;[esp + 32] order @@ -1233,7 +1233,7 @@ cident FLAC__lpc_restore_signal_asm_i386_mmx test ebx, ebx jz near .end ; do nothing if data_len == 0 cmp eax, byte 4 - jb near FLAC__lpc_restore_signal_asm_i386.begin + jb near FLAC__lpc_restore_signal_asm_ia32.begin mov edx, [esp + 28] movd mm6, [esp + 36] diff --git a/src/libFLAC/include/private/cpu.h b/src/libFLAC/include/private/cpu.h index 30dbea65..6e56361e 100644 --- a/src/libFLAC/include/private/cpu.h +++ b/src/libFLAC/include/private/cpu.h @@ -53,7 +53,7 @@ void FLAC__cpu_info(FLAC__CPUInfo *info); #ifndef FLAC__NO_ASM #ifdef FLAC__CPU_IA32 #ifdef FLAC__HAS_NASM -unsigned FLAC__cpu_info_asm_i386(); +unsigned FLAC__cpu_info_asm_ia32(); #endif #endif #endif diff --git a/src/libFLAC/include/private/fixed.h b/src/libFLAC/include/private/fixed.h index 52655c28..55ccb696 100644 --- a/src/libFLAC/include/private/fixed.h +++ b/src/libFLAC/include/private/fixed.h @@ -38,7 +38,7 @@ unsigned FLAC__fixed_compute_best_predictor(const int32 data[], unsigned data_le #ifndef FLAC__NO_ASM #ifdef FLAC__CPU_IA32 #ifdef FLAC__HAS_NASM -unsigned FLAC__fixed_compute_best_predictor_asm_i386_mmx_cmov(const int32 data[], unsigned data_len, real residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]); +unsigned FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov(const int32 data[], unsigned data_len, real residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]); #endif #endif #endif diff --git a/src/libFLAC/include/private/lpc.h b/src/libFLAC/include/private/lpc.h index 676c2cc4..c16f570f 100644 --- a/src/libFLAC/include/private/lpc.h +++ b/src/libFLAC/include/private/lpc.h @@ -40,10 +40,10 @@ void FLAC__lpc_compute_autocorrelation(const real data[], unsigned data_len, uns #ifndef FLAC__NO_ASM #ifdef FLAC__CPU_IA32 #ifdef FLAC__HAS_NASM -void FLAC__lpc_compute_autocorrelation_asm_i386(const real data[], unsigned data_len, unsigned lag, real autoc[]); -void FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_4(const real data[], unsigned data_len, unsigned lag, real autoc[]); -void FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_8(const real data[], unsigned data_len, unsigned lag, real autoc[]); -void FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_12(const real data[], unsigned data_len, unsigned lag, real autoc[]); +void FLAC__lpc_compute_autocorrelation_asm_ia32(const real data[], unsigned data_len, unsigned lag, real autoc[]); +void FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_4(const real data[], unsigned data_len, unsigned lag, real autoc[]); +void FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_8(const real data[], unsigned data_len, unsigned lag, real autoc[]); +void FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_12(const real data[], unsigned data_len, unsigned lag, real autoc[]); #endif #endif #endif @@ -108,8 +108,8 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients(const int32 data[], unsign #ifndef FLAC__NO_ASM #ifdef FLAC__CPU_IA32 #ifdef FLAC__HAS_NASM -void FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386(const int32 data[], unsigned data_len, const int32 qlp_coeff[], unsigned order, int lp_quantization, int32 residual[]); -void FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386_mmx(const int32 data[], unsigned data_len, const int32 qlp_coeff[], unsigned order, int lp_quantization, int32 residual[]); +void FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32(const int32 data[], unsigned data_len, const int32 qlp_coeff[], unsigned order, int lp_quantization, int32 residual[]); +void FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32_mmx(const int32 data[], unsigned data_len, const int32 qlp_coeff[], unsigned order, int lp_quantization, int32 residual[]); #endif #endif #endif @@ -133,8 +133,8 @@ void FLAC__lpc_restore_signal(const int32 residual[], unsigned data_len, const i #ifndef FLAC__NO_ASM #ifdef FLAC__CPU_IA32 #ifdef FLAC__HAS_NASM -void FLAC__lpc_restore_signal_asm_i386(const int32 residual[], unsigned data_len, const int32 qlp_coeff[], unsigned order, int lp_quantization, int32 data[]); -void FLAC__lpc_restore_signal_asm_i386_mmx(const int32 residual[], unsigned data_len, const int32 qlp_coeff[], unsigned order, int lp_quantization, int32 data[]); +void FLAC__lpc_restore_signal_asm_ia32(const int32 residual[], unsigned data_len, const int32 qlp_coeff[], unsigned order, int lp_quantization, int32 data[]); +void FLAC__lpc_restore_signal_asm_ia32_mmx(const int32 residual[], unsigned data_len, const int32 qlp_coeff[], unsigned order, int lp_quantization, int32 data[]); #endif #endif #endif diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 0fb1baeb..dccd1d81 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -229,12 +229,12 @@ FLAC__StreamDecoderState FLAC__stream_decoder_init( FLAC__ASSERT(decoder->private->cpuinfo.type == FLAC__CPUINFO_TYPE_IA32); #ifdef FLAC__HAS_NASM if(decoder->private->cpuinfo.data.ia32.mmx) { - decoder->private->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_i386; - decoder->private->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_i386_mmx; + decoder->private->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_ia32; + decoder->private->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ia32_mmx; } else { - decoder->private->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_i386; - decoder->private->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_i386; + decoder->private->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_ia32; + decoder->private->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ia32; } #endif #endif diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index c24932ff..75e24591 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -377,25 +377,25 @@ FLAC__StreamEncoderState FLAC__stream_encoder_init( #ifdef FLAC__HAS_NASM if(0 && encoder->private->cpuinfo.data.ia32.sse) { /* SSE version lacks necessary resolution, plus SSE flag doesn't check for OS support */ if(encoder->protected->max_lpc_order < 4) - encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_4; + encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_4; else if(encoder->protected->max_lpc_order < 8) - encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_8; + encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_8; else if(encoder->protected->max_lpc_order < 12) - encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_i386_sse_lag_12; + encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_12; else - encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_i386; + encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_ia32; } else - encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_i386; + encoder->private->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_ia32; if(encoder->private->cpuinfo.data.ia32.mmx && encoder->private->cpuinfo.data.ia32.cmov) - encoder->private->local_fixed_compute_best_predictor = FLAC__fixed_compute_best_predictor_asm_i386_mmx_cmov; + encoder->private->local_fixed_compute_best_predictor = FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov; if(encoder->private->cpuinfo.data.ia32.mmx) { - encoder->private->local_lpc_compute_residual_from_qlp_coefficients = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386; - encoder->private->local_lpc_compute_residual_from_qlp_coefficients_16bit = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386_mmx; + encoder->private->local_lpc_compute_residual_from_qlp_coefficients = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32; + encoder->private->local_lpc_compute_residual_from_qlp_coefficients_16bit = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32_mmx; } else { - encoder->private->local_lpc_compute_residual_from_qlp_coefficients = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386; - encoder->private->local_lpc_compute_residual_from_qlp_coefficients_16bit = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386; + encoder->private->local_lpc_compute_residual_from_qlp_coefficients = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32; + encoder->private->local_lpc_compute_residual_from_qlp_coefficients_16bit = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32; } #endif #endif