[vlc] mfence on i386
Kévin Szkudlapski
szkudl.k at gmail.com
Fri Sep 19 04:12:30 CEST 2008
Hello,
I recently try the new version of VLC (9.x) on my laptop which is
running on an athlonxp-m.
I'm using gentoo, so I compile it throught emerge : every times I run
it, I get "Illegal Instruction" error message.
So I investigated and I found out the problem : vlc is using the
instruction mfence which is from sse2 instruction set and is not
supported by my processor.
Then I recompiled this package without sse (USE="-sse ..."), but it
doesn't fixed my problem...
According to the source
/**
* Issues a full memory barrier.
*/
#if defined (__APPLE__)
# include <libkern/OSAtomic.h> /* OSMemoryBarrier() */
#endif
static inline void barrier (void)
{
#if defined (__GNUC__) && (__GNUC__ > 4) || (__GNUC__ == 4 &&
__GNUC_MINOR__ >= 1)
__sync_synchronize ();
#elif defined(__APPLE__)
OSMemoryBarrier ();
#elif defined(__powerpc__)
asm volatile ("sync":::"memory");
#elif defined(__i386__)
asm volatile ("mfence":::"memory");
#else
vlc_spinlock_t spin;
vlc_spin_init (&spin);
vlc_spin_lock (&spin);
vlc_spin_unlock (&spin);
vlc_spin_destroy (&spin);
#endif
}
The problem is that vlc use mfence if __i386__ is defined,
unfortunatly mfence instruction depends on sse2 and not on i386 cpu.
I comment these lines and it looks to work, of course I think that
this is not the optimal solution.
I hope it can help, bisou.
--
; Kevin Szkudlapski
; ESL, Promo 2012
More information about the vlc
mailing list