qemu-devel
[Top][All Lists]
Advanced

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

RE: [PATCH 2/2] Add test for storing .new vector


From: Taylor Simpson
Subject: RE: [PATCH 2/2] Add test for storing .new vector
Date: Tue, 21 Mar 2023 16:52:06 +0000


> -----Original Message-----
> From: Marco Liebel (QUIC) <quic_mliebel@quicinc.com>
> Sent: Tuesday, March 21, 2023 8:12 AM
> To: qemu-devel@nongnu.org
> Cc: Taylor Simpson <tsimpson@quicinc.com>; Matheus Bernardino (QUIC)
> <quic_mathbern@quicinc.com>; Marco Liebel (QUIC)
> <quic_mliebel@quicinc.com>
> Subject: [PATCH 2/2] Add test for storing .new vector
> 
> Hexagon toolchain version 16.0.0 fixes a bug where the ecoding of storing a
> .new vector was incorrect. This resulted in an incorrect valued being stored.
> The test checks that the correct value is used.
> 
> Signed-off-by: Marco Liebel <quic_mliebel@quicinc.com>
> ---
>  tests/tcg/hexagon/hvx_misc.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/tests/tcg/hexagon/hvx_misc.c b/tests/tcg/hexagon/hvx_misc.c
> index 53d5c9b44f..657e556dd4 100644
> --- a/tests/tcg/hexagon/hvx_misc.c
> +++ b/tests/tcg/hexagon/hvx_misc.c
> @@ -211,6 +211,34 @@ static void test_store_unaligned(void)
>      check_output_w(__LINE__, 2);
>  }
> 
> +static void test_store_new(void)
> +{
> +    asm volatile(
> +        "r0 = #0x00000003\n\t"
> +        "v0 = vsplat(r0)\n\t"
> +        "r0 = #expect\n\t"
> +        "vmem(r0+#0) = v0\n\t"

The idiom used in this file is the inline asm stores into the output buffer and 
there is vanilla C that writes to the expect buffer.  So, move the above to 
something like this (after the inline asm).
    for (int j = 0; I < MAX_VEC_SIZE_BYTES / 4; j++) {
        expect[0].w[j] = 3;
    }

Thanks,
Taylor




reply via email to

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