qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 72/82] target/arm: Implement SVE2 bitwise shift immediate


From: Richard Henderson
Subject: Re: [PATCH v6 72/82] target/arm: Implement SVE2 bitwise shift immediate
Date: Sat, 15 May 2021 11:53:12 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 5/13/21 11:57 AM, Peter Maydell wrote:
On Fri, 30 Apr 2021 at 22:17, Richard Henderson
<richard.henderson@linaro.org> wrote:

From: Stephen Long <steplong@quicinc.com>

Implements SQSHL/UQSHL, SRSHR/URSHR, and SQSHLU

Signed-off-by: Stephen Long <steplong@quicinc.com>
Message-Id: <20200430194159.24064-1-steplong@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  target/arm/helper-sve.h    | 33 +++++++++++++++++++++
  target/arm/sve.decode      |  5 ++++
  target/arm/sve_helper.c    | 35 ++++++++++++++++++++++
  target/arm/translate-sve.c | 60 ++++++++++++++++++++++++++++++++++++++
  4 files changed, 133 insertions(+)



+/* SVE2 bitwise shift by immediate */
+DO_ZPZI(sve2_sqshl_zpzi_b, int8_t, H1, do_sqshl_b)
+DO_ZPZI(sve2_sqshl_zpzi_h, int16_t, H1_2, do_sqshl_h)
+DO_ZPZI(sve2_sqshl_zpzi_s, int32_t, H1_4, do_sqshl_s)
+DO_ZPZI_D(sve2_sqshl_zpzi_d, int64_t, do_sqshl_d)

What is the rule for when a set of operations on (8, 16, 32, 64) bit
values should use (H1, H2, H4, ""), and when it should
use (H1, H1_2, H1_4, "") ?

Depending on how the address arithmetic is being done, and unfortunately, you have to look into the expansion macro to know.

If we're indexing an array of uint16_t, use H2.

If we're doing byte arithmetic and casting to uint16_t* afterward, use H2_1.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]