[FFmpeg-cvslog] x86: cabac: fix register constraints for 32-bit mode

Mans Rullgard git at videolan.org
Tue Jun 21 03:45:24 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Mon Jun 20 23:10:26 2011 +0100| [c5ee740745596941b84b738cc528ec85b0e6f0a3] | committer: Mans Rullgard

x86: cabac: fix register constraints for 32-bit mode

Some operands need to be accessed in byte mode, which restricts the
available registers in 32-bit mode.  Using the 'q' constraint selects
a suitable register.

Signed-off-by: Mans Rullgard <mans at mansr.com>

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

 libavcodec/x86/cabac.h     |    2 +-
 libavcodec/x86/h264_i386.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index 3e5a221..52bea9c 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -98,7 +98,7 @@ static av_always_inline int get_cabac_inline_x86(CABACContext *c,
         "movl %2, %a6(%5)               \n\t"
         "movl %1, %a7(%5)               \n\t"
 
-        :"=&r"(bit), "=&r"(low), "=&r"(range), "=&r"(tmp)
+        :"=&r"(bit), "=&r"(low), "=&r"(range), "=&q"(tmp)
         :"r"(state), "r"(c),
          "i"(offsetof(CABACContext, range)), "i"(offsetof(CABACContext, low)),
          "i"(offsetof(CABACContext, bytestream))
diff --git a/libavcodec/x86/h264_i386.h b/libavcodec/x86/h264_i386.h
index af3addd..9c86210 100644
--- a/libavcodec/x86/h264_i386.h
+++ b/libavcodec/x86/h264_i386.h
@@ -89,7 +89,7 @@ static int decode_significance_x86(CABACContext *c, int max_coeff,
 
         "movl %5, %a11(%6)                      \n\t"
         "movl %3, %a12(%6)                      \n\t"
-        :"=&r"(coeff_count), "+r"(significant_coeff_ctx_base), "+m"(index),
+        :"=&q"(coeff_count), "+r"(significant_coeff_ctx_base), "+m"(index),
          "=&r"(low), "=&r"(bit), "=&r"(range)
         :"r"(c), "m"(minusstart), "m"(end), "m"(minusindex), "m"(last_off),
          "i"(offsetof(CABACContext, range)), "i"(offsetof(CABACContext, low)),
@@ -157,7 +157,7 @@ static int decode_significance_8x8_x86(CABACContext *c,
 
         "movl %5, %a12(%7)                      \n\t"
         "movl %3, %a13(%7)                      \n\t"
-        :"=&r"(coeff_count),"+m"(last), "+m"(index), "=&r"(low), "=&r"(bit),
+        :"=&q"(coeff_count),"+m"(last), "+m"(index), "=&r"(low), "=&r"(bit),
          "=&r"(range), "=&r"(state)
         :"r"(c), "m"(minusindex), "m"(significant_coeff_ctx_base), "m"(sig_off), "m"(last_off),
          "i"(offsetof(CABACContext, range)), "i"(offsetof(CABACContext, low)),



More information about the ffmpeg-cvslog mailing list