Am 30.01.2013 14:41, schrieb Luca Barbato: > On 30/01/13 14:30, Benjamin Larsson wrote: >> On 01/30/2013 12:13 PM, Reinhard Tartler wrote: >>> On Wed, Jan 30, 2013 at 11:35 AM, Benjamin Larsson >>> <[email protected]> wrote: >>>> On 01/29/2013 10:13 PM, Diego Biurrun wrote: >>>>> This avoids SIMD-optimized functions having to sign-extend their >>>>> line size argument manually to be able to do pointer arithmetic. >>>>> --- >>>>> >>>>> >>>> This is ugly and obfuscating. >>> I have a hard time to follow your reasoning. Please elaborate. >>> >>> >> Using a pointer difference type when you express a simple size. > That simple size is a pointer difference. It can be a negative a size > can't be negative. So it is clarifying its usage after all. > I'd like to point out that this interfers with x32 - porting. Since there ptrdiff_t is still only 32 bits, while effective addresses are best done using 64 bits (requiring an adress size override otherwise = greater code size). Those movxsd would have to be reintroduced then. Since similar concerns have been expressed with x264 I'm currently working on a solution to have the assembler figure out those things from an ordinary C-style declaration of the function. e.g. replace cglobal foo, 2, 4 which might be a void foo(int* src, intptr_t stride) with cglobalx "void foo(int* srcq, intptr_t strideq)", 4 and let the assembler figured out if mosxd&co need to be inserted. The parser already works, so I expect to have something by the weekend - assuming there is interest. In general I agree that ptrdiff_t makes more sense.
// Matthias _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
