On 2/6/20 6:02 AM, Richard Henderson wrote:
> On 2/5/20 10:41 PM, Taylor Simpson wrote:
>> Currently, helpers can only take up to 6 arguments.  This patch adds the
>> capability for up to 7 arguments.  I have tested it with the Hexagon port
>> that I am preparing for submission.
> 
> This is not safe, in general, without other changes.
> 
>>From include/tcg/tcg.h:
> 
>> /* While we limit helpers to 6 arguments, for 32-bit hosts, with padding,
>>    this imples a max of 6*2 (64-bit in) + 2 (64-bit out) = 14 operands.
>>    There are never more than 2 outputs, which means that we can store all
>>    dead + sync data within 16 bits.  */
>> #define DEAD_ARG  4
>> #define SYNC_ARG  1
>> typedef uint16_t TCGLifeData;
> 
> Thus 7 uint64_t inputs, on a 32-bit host, will overflow TCGLifeData.

My bad, no it won't.  For some reason I had two outputs in my head, but they'll
both be uint32_t not two uint64_t.  7 uint64_t inputs with 1 uint64_t output
will *just* fit.


> What are you doing that requires so many arguments?

But I'd still like to know why you need so many.


r~

Reply via email to