]> git.sesse.net Git - ffmpeg/commitdiff
x86: bswap: remove test for bswap instruction
authorMans Rullgard <mans@mansr.com>
Mon, 12 Dec 2011 01:33:17 +0000 (01:33 +0000)
committerMans Rullgard <mans@mansr.com>
Mon, 12 Dec 2011 12:14:15 +0000 (12:14 +0000)
Firstly, this test never worked as intended, always reporting
success.  Secondly, bswap is available from 486 onward and can
thus be assumed present.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure
libavutil/x86/bswap.h

index a0dc6e08f86221dca8adc02d5cb11564d5edb77d..567fa9d1f48cab14021f3597b245f442b7c8e715 100755 (executable)
--- a/configure
+++ b/configure
@@ -1053,7 +1053,6 @@ HAVE_LIST="
     asm_mod_y
     attribute_may_alias
     attribute_packed
-    bswap
     closesocket
     cmov
     dcbzl
@@ -2741,8 +2740,6 @@ EOF
     enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
     enabled mmx2  && check_asm mmx2  '"pmaxub %mm0, %mm1"'
 
-    check_asm bswap '"bswap %%eax" ::: "%eax"'
-
     if ! disabled_any asm mmx yasm; then
         if check_cmd $yasmexe --version; then
             enabled x86_64 && yasm_extra="-m amd64"
index 6840b632cbd4d9da8f7e6fd8b6f6960d506166dd..c6cf007c86459f1616c1951cbdfc9f3f7a45573f 100644 (file)
@@ -41,14 +41,7 @@ static av_always_inline av_const unsigned av_bswap16(unsigned x)
 #define av_bswap32 av_bswap32
 static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
 {
-#if HAVE_BSWAP
     __asm__("bswap   %0" : "+r" (x));
-#else
-    __asm__("rorw    $8,  %w0 \n\t"
-            "rorl    $16, %0  \n\t"
-            "rorw    $8,  %w0"
-            : "+r"(x));
-#endif
     return x;
 }