[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] Add support for a helper with 7 arguments
From: |
Taylor Simpson |
Subject: |
RE: [PATCH] Add support for a helper with 7 arguments |
Date: |
Thu, 6 Feb 2020 14:03:37 +0000 |
Some of the more complex instructions need a lot of operands. Here's an example
if (Pv4) memb(Rs32 + Ru32 << #u2) = Rt32
This is a predicated store with 5 operands:
Pv4predicate
Rs32, Ru32, u2used to compute the effective address
Rt32value to store
In addition, every helper gets an env argument, and predicated instructions get
a "slot" argument. The slot argument refers to the VLIW slot where the
instruction is located within the packet. It is used for predicated
instructions to communicate to the end-of-packet handling to determine whether
the instruction should commit.
So, the signature for the helper for this instruction is
void HELPER(S4_pstorerbt_rr)(CPUHexagonState *env, int32_t PvV, int32_t
RsV, int32_t RuV, int32_t RtV, int32_t uiV, uint32_t slot)
HTH,
Taylor
> -----Original Message-----
> From: Richard Henderson <address@hidden> On Behalf Of Richard
> Henderson
> Sent: Thursday, February 6, 2020 4:29 AM
> To: Taylor Simpson <address@hidden>; address@hidden
> Cc: Paolo Bonzini <address@hidden>
> Subject: Re: [PATCH] Add support for a helper with 7 arguments
>
> -------------------------------------------------------------------------
> CAUTION: This email originated from outside of the organization.
> -------------------------------------------------------------------------
>
> 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~
- [PATCH] Add support for a helper with 7 arguments, Taylor Simpson, 2020/02/05
- Re: [PATCH] Add support for a helper with 7 arguments, Richard Henderson, 2020/02/06
- Re: [PATCH] Add support for a helper with 7 arguments, Richard Henderson, 2020/02/06
- RE: [PATCH] Add support for a helper with 7 arguments,
Taylor Simpson <=
- Re: [PATCH] Add support for a helper with 7 arguments, Richard Henderson, 2020/02/06
- RE: [PATCH] Add support for a helper with 7 arguments, Taylor Simpson, 2020/02/06
- Re: [PATCH] Add support for a helper with 7 arguments, Richard Henderson, 2020/02/06
- RE: [PATCH] Add support for a helper with 7 arguments, Taylor Simpson, 2020/02/06
- Re: [PATCH] Add support for a helper with 7 arguments, Richard Henderson, 2020/02/07
- RE: [PATCH] Add support for a helper with 7 arguments, Taylor Simpson, 2020/02/07
Re: [PATCH] Add support for a helper with 7 arguments, Richard Henderson, 2020/02/07