qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Taylor Simpson <tsimpson@quicinc.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] Add support for a helper with 7 arguments
Date: Thu, 6 Feb 2020 10:28:35 +0000	[thread overview]
Message-ID: <640ffa37-a70b-dfa9-55ef-cde5c7f0dfcb@twiddle.net> (raw)
In-Reply-To: <09def3cf-6833-ccf5-457e-1755a7fd0e04@twiddle.net>

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	other threads:[~2020-02-06 10:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 22:41 [PATCH] Add support for a helper with 7 arguments Taylor Simpson
2020-02-06  6:02 ` Richard Henderson
2020-02-06 10:28   ` Richard Henderson [this message]
2020-02-06 14:03     ` Taylor Simpson
2020-02-06 15:35       ` Richard Henderson
2020-02-06 17:52         ` Taylor Simpson
2020-02-07  0:27           ` Richard Henderson
2020-02-07  4:46             ` Taylor Simpson
2020-02-07  8:53               ` Richard Henderson
2020-02-07 11:59                 ` Taylor Simpson
2020-02-07 12:14 ` Richard Henderson
2020-02-07 12:43   ` Taylor Simpson
2020-02-07 15:49     ` Richard Henderson
2020-02-09  5:08       ` Taylor Simpson
2020-02-09 18:17         ` Richard Henderson
2020-02-09 20:51           ` Taylor Simpson
2020-02-10  4:54             ` Taylor Simpson
2020-02-10 16:33               ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=640ffa37-a70b-dfa9-55ef-cde5c7f0dfcb@twiddle.net \
    --to=rth@twiddle.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tsimpson@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).