[x264-devel] [PATCH 23/24] RFC: checkasm: arm: Check register clobbering

Martin Storsjö martin at martin.st
Fri Aug 14 08:07:03 CEST 2015


On Thu, 13 Aug 2015, Henrik Gramner wrote:

> On Thu, Aug 13, 2015 at 10:59 PM, Martin Storsjö <martin at martin.st> wrote:
>> This fails for the sa8d_satd test, since the function is declared
>> to return an intptr_t, which is 32 bit on arm, while the sa8d_satd
>> function returns an uint64_t.
>>
>> The same would be an issue on x86 32 bit as well, but the sa8d_satd
>> function isn't implemented there.
>
> Yeah, that's one of the major issues with the current code (the other
> big one being floating point, but that's not really a big deal for
> x264).
>
> Not sure what the cleanest way of handling that is, but we would
> probably need to create a separate macro for calling such functions. I
> don't know the ARM ABI, but would it be enough to typecast the
> function pointer and use the same assembly function for both 32-bit
> and 64-bit return values?

Yes, that should work fine - currently it also works fine if the return 
value of x264_checkasm_call is changed into uint64_t (although it produces 
loads of warnings when building).

// Martin


More information about the x264-devel mailing list