OSDN Git Service

x86: yadif: fix asm with suncc
authorMans Rullgard <mans@mansr.com>
Sun, 12 Aug 2012 18:45:46 +0000 (19:45 +0100)
committerMans Rullgard <mans@mansr.com>
Mon, 13 Aug 2012 13:51:52 +0000 (14:51 +0100)
commit480178a29587df8ed6d5e93bfe79e4a08a61f9e1
treee6445d7958e70a7e9f4971179bf80030692a9f15
parent8ec0204ee4ee93218c51a86d2faa24937c8108e7
x86: yadif: fix asm with suncc

Under some circumstances, suncc will use a single register for the
address of all memory operands, inserting lea instructions loading
the correct address prior to each memory operand being used in the
code. In the yadif code, the branch in the asm block bypasses such
an lea instruction, causing an incorrect address to be used in the
following load.

This patch replaces the tmpX arrays with a single array and uses a
register operand to hold its address. Although this prevents using
offsets from the stack pointer to access these locations, the code
still builds as 32-bit PIC even with old compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavfilter/x86/yadif_template.c