[FFmpeg-cvslog] x86: bswap: remove test for bswap instruction

Mans Rullgard git at videolan.org
Tue Dec 13 00:59:44 CET 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Mon Dec 12 01:33:17 2011 +0000| [5b0d35eaedbb08d0c11fa4f2b47a24d91aaa294d] | committer: Mans Rullgard

x86: bswap: remove test for bswap instruction

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 at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5b0d35eaedbb08d0c11fa4f2b47a24d91aaa294d
---

 configure             |    3 ---
 libavutil/x86/bswap.h |    7 -------
 2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index a0dc6e0..567fa9d 100755
--- 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"
diff --git a/libavutil/x86/bswap.h b/libavutil/x86/bswap.h
index 6840b63..c6cf007 100644
--- a/libavutil/x86/bswap.h
+++ b/libavutil/x86/bswap.h
@@ -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;
 }
 



More information about the ffmpeg-cvslog mailing list