x86: Require 7 registers for the cabac asm

Message ID 1323694495-79604-1-git-send-email-martin@martin.st
State Committed
Commit f1dba9e4988e78738ad9065e4639b82b8355774a
Headers show

Commit Message

Martin Storsjö Dec. 12, 2011, 12:54 p.m.
The change in 599b4c6ef didn't turn out to work properly on
i386 on OS X, where it broke building with PIC enabled.
---
 libavcodec/x86/cabac.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Mans Rullgard Dec. 12, 2011, 1:05 p.m. | #1
Martin Storsjö <martin@martin.st> writes:

> The change in 599b4c6ef didn't turn out to work properly on
> i386 on OS X, where it broke building with PIC enabled.
> ---
>  libavcodec/x86/cabac.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

OK

Patch

diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index d0d1332..3c3652d 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -81,7 +81,7 @@ 
         "add    "tmp"       , "low"                                     \n\t"\
         "1:                                                             \n\t"
 
-#if HAVE_6REGS && !defined(BROKEN_RELOCATIONS)
+#if HAVE_7REGS && !defined(BROKEN_RELOCATIONS)
 #define get_cabac_inline get_cabac_inline_x86
 static av_always_inline int get_cabac_inline_x86(CABACContext *c,
                                                  uint8_t *const state)
@@ -98,7 +98,7 @@  static av_always_inline int get_cabac_inline_x86(CABACContext *c,
     );
     return bit & 1;
 }
-#endif /* HAVE_6REGS && !defined(BROKEN_RELOCATIONS) */
+#endif /* HAVE_7REGS && !defined(BROKEN_RELOCATIONS) */
 
 #define get_cabac_bypass_sign get_cabac_bypass_sign_x86
 static av_always_inline int get_cabac_bypass_sign_x86(CABACContext *c, int val)