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