qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 02/11] Hexagon (target/hexagon) Fix predicated assignment


From: Richard Henderson
Subject: Re: [PATCH v3 02/11] Hexagon (target/hexagon) Fix predicated assignment to .tmp and .cur
Date: Sat, 5 Nov 2022 09:50:23 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

On 11/5/22 06:26, Taylor Simpson wrote:
Here are example instructions with a predicated .tmp/.cur assignment
     if (p1) v12.tmp = vmem(r7 + #0)
     if (p0) v12.cur = vmem(r9 + #0)
The .tmp/.cur indicates that references to v12 in the same packet
take the result of the load.  However, when the predicate is false,
the value at the start of the packet should be used.  After the packet
commits, the .tmp value is dropped, but the .cur value is maintained.

To fix this bug, we preload the original value from the HVX register
into the temporary used for the result.

Test cases added to tests/tcg/hexagon/hvx_misc.c

Co-authored-by: Matheus Tavares Bernardino<quic_mathbern@quicinc.com>
Signed-off-by: Matheus Tavares Bernardino<quic_mathbern@quicinc.com>
Signed-off-by: Taylor Simpson<tsimpson@quicinc.com>
---
  target/hexagon/translate.h      |  6 +++
  tests/tcg/hexagon/hvx_misc.c    | 72 +++++++++++++++++++++++++++++++++
  target/hexagon/gen_tcg_funcs.py | 12 ++++++
  3 files changed, 90 insertions(+)

Acked-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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