On Sun, 11 Dec 2011, Mans Rullgard  wrote:

Module: libav
Branch: master
Commit: 599b4c6efddaed33b1667c386b34b07729ba732b

Author:    Mans Rullgard <[email protected]>
Committer: Mans Rullgard <[email protected]>
Date:      Sun Dec 11 21:41:59 2011 +0000

x86: cabac: replace explicit memory references with "m" operands

This replaces the explicit offset(reg) memory references with
"m" operands for the same locations.  As a result, one fewer
register operand is needed for these inline asm statements.

This breaks building in 32 bit PIC mode on OS X (on both gcc 4.0 and 4.2, the xcode provided versions), where config.h contains

#define HAVE_EBP_AVAILABLE 1
#define HAVE_EBX_AVAILABLE 0

gcc 4.0 gives:
libavcodec/cabac.h: In function ‘get_cabac’:
libavcodec/x86/cabac.h:91: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’

gcc 4.2 gives:
libavcodec/h264_cabac.c: In function ‘decode_cabac_mb_ref’:
libavcodec/x86/cabac.h:91: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
libavcodec/x86/cabac.h:91: error: ‘asm’ operand has impossible constraints


clang (Apple clang version 2.0 (tags/Apple/clang-138) (based on LLVM 2.9svn)) wasn't able to build it before either, erroring out with:

fatal error: error in backend: Ran out of registers during register allocation!


// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to