Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-21 Thread lvqcl
Erik de Castro Lopo wrote: > Hmm, compiling just one or two flags with these flags is somewhat difficult. Currently my intrinsic code is split into 5 files: lpc_intrin_sse.c lpc_intrin_sse2.c lpc_intrin_sse41.c stream_encoder_intrin_sse2.c stream_encoder_intrin_ssse3.c > I'll see if I can thin

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-17 Thread Erik de Castro Lopo
lvqcl wrote: > Erik de Castro Lopo wrote: > > >> -msse for SSE code, -msse2 for SSE2 code, -msse4.1 for SSE4.1 code > > > > Yes, that was it. Brain fart. These flags were not needed on x86_64. > > > > Erik > > But now all C code is compiled with -msse2 and it won't work on older CPUs. > Isn't i

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-17 Thread lvqcl
Erik de Castro Lopo wrote: >> -msse for SSE code, -msse2 for SSE2 code, -msse4.1 for SSE4.1 code > > Yes, that was it. Brain fart. These flags were not needed on x86_64. > > Erik But now all C code is compiled with -msse2 and it won't work on older CPUs. Isn't it better to compile only necessary

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-16 Thread Erik de Castro Lopo
lvqcl wrote: > Erik de Castro Lopo wrote: > > > The biggest of these tweaks weas to disable the intrinsics version > > fero FLAC__CPU_IA32 because I couldn't get this to compile on > > i386-linux (and we have the nasm versions). Still open to re-enabling > > this if someone can get it to work. >

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-15 Thread lvqcl
Erik de Castro Lopo wrote: > The biggest of these tweaks weas to disable the intrinsics version > fero FLAC__CPU_IA32 because I couldn't get this to compile on > i386-linux (and we have the nasm versions). Still open to re-enabling > this if someone can get it to work. I know you're a skilled p

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-15 Thread lvqcl
Erik de Castro Lopo wrote: >> > When should FLAC__HAS_X86INTRIN be defined? What header file should I be >> > checking for? >> >> Ah, should be checking for . I simply don't know. In MSVS there's no x86intrin.h, but it has intrin.h. > There is a segfault happening in the new code when compiling

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-15 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > There is a segfault happening in the new code when compiling with > -DDEBUG. Trying to track it down. This turned out somewhat nasty. The segfault was only happening in the libFLAC++ code and only when compiled with -DDEBUG. Debugging with GDB and Valgrind only manag

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-15 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > lvqcl wrote: > > > It's not possible to use ia32/*.nasm code in 64-bit compiles. > > There's still no 64-bit asm code in FLAC. I'm not familiar with asm too, > > so I wrote SSE-accelerated code using intrinsics. > > Thanks for your work on this. > > I've applied the

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-15 Thread Erik de Castro Lopo
lvqcl wrote: > It's not possible to use ia32/*.nasm code in 64-bit compiles. > There's still no 64-bit asm code in FLAC. I'm not familiar with asm too, > so I wrote SSE-accelerated code using intrinsics. Thanks for your work on this. I've applied these patches, updated the configure script to de

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-14 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > Erik de Castro Lopo wrote: > > > When should FLAC__HAS_X86INTRIN be defined? What header file should I be > > checking for? > > Ah, should be checking for . > > The rest seems to be coming together. Testing this now. There is a segfault happening in the new code wh

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-14 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > When should FLAC__HAS_X86INTRIN be defined? What header file should I be > checking for? Ah, should be checking for . The rest seems to be coming together. Testing this now. Erik -- -- Erik de Cast

Re: [flac-dev] PATCH: x86-64 support and SSE intrinscis code

2013-09-14 Thread Erik de Castro Lopo
lvqcl wrote: > It's not possible to use ia32/*.nasm code in 64-bit compiles. > There's still no 64-bit asm code in FLAC. I'm not familiar with asm too, > so I wrote SSE-accelerated code using intrinsics. > > This code uses two new preprocessor macros: > FLAC__CPU_X86_64 (analogous to FLAC__CPU_IA