qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v11 11/16] target/riscv: Add orc.b instruction for Zbb, remov


From: Philipp Tomsich
Subject: Re: [PATCH v11 11/16] target/riscv: Add orc.b instruction for Zbb, removing gorc/gorci
Date: Tue, 28 Sep 2021 17:45:58 +0200

Richard,

On Tue, 28 Sept 2021 at 09:07, Alistair Francis <alistair23@gmail.com> wrote:
>
> On Sun, Sep 12, 2021 at 12:07 AM Philipp Tomsich
> <philipp.tomsich@vrull.eu> wrote:
> >
> > The 1.0.0 version of Zbb does not contain gorc/gorci.  Instead, a
> > orc.b instruction (equivalent to the orc.b pseudo-instruction built on
> > gorci from pre-0.93 draft-B) is available, mainly targeting
> > string-processing workloads.
> >
> > This commit adds the new orc.b instruction and removed gorc/gorci.
> >
> > Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
> > Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> > Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
>
> I'm seeing this warning when building with gcc (GCC) 11.2.1
>
> /var/mnt/scratch/alistair/software/qemu/include/tcg/tcg.h:1267:5:
> warning: overflow in conversion from ‘long long unsigned int’ to
> ‘int32_t’ {aka ‘int’} changes value from ‘72340172838076673’ to
> ‘16843009’ [-Woverflow]
>  1267 |     (__builtin_constant_p(VECE)                                    \
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1268 |      ? (  (VECE) == MO_8  ? 0x0101010101010101ull * (uint8_t)(C)   \
>       |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1269 |         : (VECE) == MO_16 ? 0x0001000100010001ull * (uint16_t)(C)  \
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1270 |         : (VECE) == MO_32 ? 0x0000000100000001ull * (uint32_t)(C)  \
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1271 |         : (VECE) == MO_64 ? (uint64_t)(C)                          \
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1272 |         : (qemu_build_not_reached_always(), 0))                    \
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1273 |      : dup_const(VECE, C))
>       |      ~~~~~~~~~~~~~~~~~~~~~
> ../target/riscv/insn_trans/trans_rvb.c.inc:301:34: note: in expansion
> of macro ‘dup_const’
>   301 |     TCGv  ones = tcg_constant_tl(dup_const(MO_8, 0x01));
>       |                                  ^~~~~~~~~
> [78/87] Compiling C object
> libqemu-riscv32-linux-user.fa.p/target_riscv_translate.c.o
> In file included from
> /var/mnt/scratch/alistair/software/qemu/include/tcg/tcg-op.h:28,
>                  from ../target/riscv/translate.c:22:

The dup_const macro is returning an unsigned long long, which probably
should be fixed on the tcg.h-level instead of forcing a cast to target_long
at the call site.

Or should we introduce a dup_const_tl?

Philipp.



reply via email to

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