mirror of
https://github.com/mpv-player/mpv
synced 2025-04-09 11:11:52 +00:00
When we're compiling/running on a kernel without sse/sse2 support, we have
to be careful when using gcc-3.x. gcc-3.x is able to emit sse/sse2 instructions for normal C code when we compile for maximum performance with something like the -march=athlon-xp switch. So, if the kernel does not support the sse/sse2 instruction set extension, we have to tell gcc-3.x to not emit see/sse2 instructions for regular C code, otherwise mplayer might crash with a SIGILL signal. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7336 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5bf4fb0263
commit
17bafc411c
19
configure
vendored
19
configure
vendored
@ -884,24 +884,35 @@ EOF
|
|||||||
echores "failed"
|
echores "failed"
|
||||||
echo "It seems that your kernel does not correctly support $2."
|
echo "It seems that your kernel does not correctly support $2."
|
||||||
echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
|
echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
return 1
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
extcheck $_mmx "mmx" "emms" || _mmx=no
|
extcheck $_mmx "mmx" "emms" || _mmx=no
|
||||||
extcheck $_mmx2 "mmx2" "sfence" || _mmx2=no
|
extcheck $_mmx2 "mmx2" "sfence" || _mmx2=no
|
||||||
extcheck $_3dnow "3dnow" "femms" || _3dnow=no
|
extcheck $_3dnow "3dnow" "femms" || _3dnow=no
|
||||||
extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex=no
|
extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex=no
|
||||||
extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no
|
extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no _gcc3_ext="$_gcc3_ext -mno-sse"
|
||||||
extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no
|
extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no _gcc3_ext="$_gcc3_ext -mno-sse2"
|
||||||
echocheck "mtrr support"
|
echocheck "mtrr support"
|
||||||
echores "$_mtrr"
|
echores "$_mtrr"
|
||||||
|
|
||||||
if test "$_mtrr" = yes ; then
|
if test "$_mtrr" = yes ; then
|
||||||
_optimizing="$_optimizing mtrr"
|
_optimizing="$_optimizing mtrr"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$_gcc3_ext" != ""; then
|
||||||
|
# if we had to disable sse/sse2 because the active kernel does not
|
||||||
|
# support this instruction set extension, we also have to tell
|
||||||
|
# gcc3 to not generate sse/sse2 instructions for normal C code
|
||||||
|
cat > $TMPC << EOF
|
||||||
|
int main(void) { return 0; }
|
||||||
|
EOF
|
||||||
|
cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext"
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user