On 7/31/24 10:21 PM, Kewen.Lin wrote:
> on 2024/8/1 01:52, Carl Love wrote:
>> Yes, I noticed that the built-ins were defined as overloaded but only had 
>> one definition.   Did seem odd to me.
>>
>>> either is with "vector unsigned char" as argument type, but the 
>>> corresponding instance
>>> prototype in builtin table is with "vector signed char".  It's inconsistent 
>>> and weird,
>>> I think we can just update the prototype in builtin table with "vector 
>>> unsigned char"
>>> and remove the entries in overload table.  It can be a follow up patch.
>>
>> I didn't notice that it was signed in the instance prototype but unsigned in 
>> the overloaded definition.  That is definitely inconsistent.
>>
>> That said, should we just go ahead and support both signed and unsigned 
>> argument versions of the all ones and all zeros built-ins?
> 
> Good question, I thought about that but found openxl only supports the 
> unsigned version 
> so I felt it's probably better to keep consistent with it.  But I'm fine for 
> either, if
> we decide to extend it to cover both signed and unsigned, we should notify 
> openxl team
> to extend it as well.
> 
> openxl doc links:
> 
> https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.2?topic=functions-vec-test-lsbb-all-ones
> https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.2?topic=functions-vec-test-lsbb-all-zeros

If it makes sense to support vector signed char rather than only the vector 
unsigned char,
then I'm fine adding support for it.  It almost seems since we tried adding an 
overload
for it, that that was our intention (to support both signed and unsigned) and 
we just
had a bug so only unsigned was supported?

CC'ing Steve since he noticed the missing documentation when we was trying to
use the built-ins.  Steve, do you see a need to also support vector signed char
with these built-ins?

Peter


Reply via email to