[x265] [PATCH 1 of 3] testbench: support float ret value

chen chenm003 at 163.com
Sat Apr 26 04:36:59 CEST 2014


At 2014-04-25 22:41:12,"Steve Borho" <steve at borho.org> wrote:
>On Thu, Apr 24, 2014 at 10:02 PM, Min Chen <chenm003 at 163.com> wrote:
>> # HG changeset patch
>> # User Min Chen <chenm003 at 163.com>
>> # Date 1398394872 -28800
>> # Node ID 9505724b11bc944eaaefd35d396f92f4c2c3f88f
>> # Parent  c630b0b393eec3a2e2bedf137fba0d56764672ef
>> testbench: support float ret value
>>
>> diff -r c630b0b393ee -r 9505724b11bc source/test/checkasm-a.asm
>> --- a/source/test/checkasm-a.asm        Thu Apr 24 15:59:05 2014 -0500
>> +++ b/source/test/checkasm-a.asm        Fri Apr 25 11:01:12 2014 +0800
>> @@ -87,6 +87,7 @@
>>  ;-----------------------------------------------------------------------------
>>  ; intptr_t x265_checkasm_call( intptr_t (*func)(), int *ok, ... )
>>  ;-----------------------------------------------------------------------------
>> +cglobal checkasm_call_float
>>  INIT_XMM
>>  cglobal checkasm_call, 2,15,16,max_args*8+8
>>      mov  r6, r0
>> @@ -170,6 +171,7 @@
>>  ;-----------------------------------------------------------------------------
>>  ; intptr_t x264_checkasm_call( intptr_t (*func)(), int *ok, ... )
>>  ;-----------------------------------------------------------------------------
>> +cglobal checkasm_call_float
>>  cglobal checkasm_call, 1,7
>>      mov  r3, n3
>>      mov  r4, n4
>> diff -r c630b0b393ee -r 9505724b11bc source/test/pixelharness.cpp
>> --- a/source/test/pixelharness.cpp      Thu Apr 24 15:59:05 2014 -0500
>> +++ b/source/test/pixelharness.cpp      Fri Apr 25 11:01:12 2014 +0800
>> @@ -915,7 +915,7 @@
>>
>>          int width = (rand() % 4) + 1; // range[1-4]
>>          float cres = ref(sum0, sum1, width);
>> -        float vres = (float)checked(opt, sum0, sum1, width);
>> +        float vres = (float)checked_float(opt, sum0, sum1, width);
>>          if (fabs(vres - cres) > 0.00001)
>>              return false;
>>
>> diff -r c630b0b393ee -r 9505724b11bc source/test/testharness.h
>> --- a/source/test/testharness.h Thu Apr 24 15:59:05 2014 -0500
>> +++ b/source/test/testharness.h Fri Apr 25 11:01:12 2014 +0800
>> @@ -121,6 +121,7 @@
>>  /* detect when callee-saved regs aren't saved
>>   * needs an explicit asm check because it only sometimes crashes in normal use. */
>>  intptr_t x265_checkasm_call(intptr_t (*func)(), int *ok, ...);
>> +float x265_checkasm_call_float(intptr_t (*func)(), int *ok, ...);
>
>I suppose it might be a bit pedantic, but shouldn't the argument
>funcdef return a float instead of an intptr_t?
>
the ABI problem, intptr_t store in rax, and float in XMM0, so I made two version
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20140426/cd7ac31b/attachment-0001.html>


More information about the x265-devel mailing list