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.

What are you doing that requires so many arguments?


r~

Reply via email to