qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Taylor Simpson <tsimpson@quicinc.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH 3/9] target/Hexagon: Finish conversion to tcg_gen_qemu_{ld,st}_*
Date: Tue, 2 May 2023 16:48:30 +0100	[thread overview]
Message-ID: <31b4d915-b8ab-ec6e-45c4-36089b34fc40@linaro.org> (raw)
In-Reply-To: <SN4PR0201MB8808A13255BC8104B407C816DE6F9@SN4PR0201MB8808.namprd02.prod.outlook.com>

On 5/2/23 16:27, Taylor Simpson wrote:
> 
> 
>> -----Original Message-----
>> From: Richard Henderson <richard.henderson@linaro.org>
>> Sent: Tuesday, May 2, 2023 8:58 AM
>> To: qemu-devel@nongnu.org
>> Cc: mrolnik@gmail.com; edgar.iglesias@gmail.com; Taylor Simpson
>> <tsimpson@quicinc.com>; ale@rev.ng; anjo@rev.ng; laurent@vivier.eu;
>> philmd@linaro.org; jiaxun.yang@flygoat.com; david@redhat.com;
>> iii@linux.ibm.com; thuth@redhat.com; mark.cave-ayland@ilande.co.uk;
>> atar4qemu@gmail.com; jcmvbkbc@gmail.com
>> Subject: [PATCH 3/9] target/Hexagon: Finish conversion to
>> tcg_gen_qemu_{ld,st}_*
>>
>> Convert away from the old interface with the implicit MemOp argument.
>> Importantly, this removes some incorrect casts generated by idef-parser's
>> gen_load().
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   target/hexagon/macros.h                     | 14 ++++-----
>>   target/hexagon/genptr.c                     |  8 +++---
>>   target/hexagon/idef-parser/parser-helpers.c | 28 +++++++++---------
>>   target/hexagon/translate.c                  | 32 ++++++++++-----------
>>   4 files changed, 40 insertions(+), 42 deletions(-)
>>
>> diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index
>> 502c85ae35..244063b1d2 100644
>> --- a/target/hexagon/genptr.c
>> +++ b/target/hexagon/genptr.c
>> @@ -320,14 +320,14 @@ void gen_set_byte_i64(int N, TCGv_i64 result, TCGv
>> src)
>>
>>   static void gen_return(DisasContext *ctx, TCGv_i64 dst, TCGv src) @@ -
>> 1019,7 +1019,7 @@ static void gen_vreg_load(DisasContext *ctx, intptr_t
>> dstoff, TCGv src,
>>           tcg_gen_andi_tl(src, src, ~((int32_t)sizeof(MMVector) - 1));
>>       }
>>       for (int i = 0; i < sizeof(MMVector) / 8; i++) {
>> -        tcg_gen_qemu_ld64(tmp, src, ctx->mem_idx);
>> +        tcg_gen_qemu_ld_i64(tmp, src, ctx->mem_idx, MO_TEUQ);
>>           tcg_gen_addi_tl(src, src, 8);
>>           tcg_gen_st_i64(tmp, cpu_env, dstoff + i * 8);
> 
> Did you intend to leave the tcg_gen_st_i64 alone or should that be converted to tcg_gen_qemu_st64.
> 
> There's a tcg_gen_st8_i64 in vec_to_qvec.  Does that need to be converted?

No, those are host stores to env, not guest stores to guest memory.
Notice the lack of "qemu" in the function names.

> I'm curious if there's a better way to do a vector load (e.g., with tcg_gen_gvec_<something>) than a loop that does 8 bytes at a time.

The best you can do at the moment is tcg_gen_qemu_ld_i128.
But there's no gvec variant to load arbitrary vector lengths.


r~



  reply	other threads:[~2023-05-02 15:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 13:57 [PATCH 0/9] tcg: Remove compatability helpers for qemu ld/st Richard Henderson
2023-05-02 13:57 ` [PATCH 1/9] target/avr: Finish conversion to tcg_gen_qemu_{ld,st}_* Richard Henderson
2023-05-03 12:46   ` Anton Johansson via
2023-05-02 13:57 ` [PATCH 2/9] target/cris: " Richard Henderson
2023-05-03 12:47   ` Anton Johansson via
2023-05-02 13:57 ` [PATCH 3/9] target/Hexagon: Finish conversion to tcg_gen_qemu_{ld, st}_* Richard Henderson
2023-05-02 15:27   ` [PATCH 3/9] target/Hexagon: Finish conversion to tcg_gen_qemu_{ld,st}_* Taylor Simpson
2023-05-02 15:48     ` Richard Henderson [this message]
2023-05-02 19:09       ` Taylor Simpson
2023-05-03 12:47   ` Anton Johansson via
2023-05-02 13:57 ` [PATCH 4/9] target/m68k: " Richard Henderson
2023-05-03 13:08   ` Anton Johansson via
2023-05-04  8:02     ` Richard Henderson
2023-05-02 13:57 ` [PATCH 5/9] target/mips: " Richard Henderson
2023-05-03 13:10   ` Anton Johansson via
2023-05-02 13:57 ` [PATCH 6/9] target/s390x: Finish conversion to tcg_gen_qemu_{ld, st}_* Richard Henderson
2023-05-03  8:13   ` [PATCH 6/9] target/s390x: Finish conversion to tcg_gen_qemu_{ld,st}_* David Hildenbrand
2023-05-04 12:28   ` Ilya Leoshkevich
2023-05-02 13:57 ` [PATCH 7/9] target/sparc: Finish conversion to tcg_gen_qemu_{ld, st}_* Richard Henderson
2023-05-03 13:19   ` [PATCH 7/9] target/sparc: Finish conversion to tcg_gen_qemu_{ld,st}_* Anton Johansson via
2023-05-03 20:11   ` [PATCH 7/9] target/sparc: Finish conversion to tcg_gen_qemu_{ld, st}_* Mark Cave-Ayland
2023-05-04  7:59     ` Richard Henderson
2023-05-02 13:57 ` [PATCH 8/9] target/xtensa: " Richard Henderson
2023-05-02 14:11   ` Max Filippov
2023-05-02 13:57 ` [PATCH 9/9] tcg: Remove compatability helpers for qemu ld/st Richard Henderson
2023-05-02 15:39   ` Taylor Simpson
2023-05-03  8:15     ` David Hildenbrand
2023-05-05 16:07 ` [PATCH 0/9] " 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=31b4d915-b8ab-ec6e-45c4-36089b34fc40@linaro.org \
    --to=richard.henderson@linaro.org \
    --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).