[FFmpeg-devel] [PATCH 1/3] diracdec: add 10-bit Haar SIMD functions

Henrik Gramner henrik at gramner.com
Fri Jul 27 17:22:24 EEST 2018


On Fri, Jul 27, 2018 at 4:03 PM, James Darnley <jdarnley at obe.tv> wrote:
> On 2018-07-27 15:05, Henrik Gramner wrote:
>> Can't you just use 7 GPR:s on x86-32 as well?
>
> I'm sure I've done that in the past and at least 1 platform has always
> complained due to PIE or stack alignment or whatever, I think.  I went
> looking for an old email but couldn't find it.
>
> If you want me to try it I can.

If you're allocating stack space with a positive number there has to
be a register available to store the old stack pointer in case the
guaranteed stack alignment is smaller than the required stack
alignment. This can be avoided by using a negative value for the stack
space in case of high register pressure which will allocate space for
the old stack pointer and store it on the stack after
allocation/alignment. In functions that doesn't use the stack this is
a non-issue.

So it should be fine to use 7 registers here.


More information about the ffmpeg-devel mailing list