[PATCH 01/12] target/ppc: declare darn32/darn64 helpers with TCG_CALL_NO_RWG

matheus.ferst@eldorado.org.br posted 12 patches 3 years, 1 month ago
There is a newer version of this series
[PATCH 01/12] target/ppc: declare darn32/darn64 helpers with TCG_CALL_NO_RWG
Posted by matheus.ferst@eldorado.org.br 3 years, 1 month ago
From: Matheus Ferst <matheus.ferst@eldorado.org.br>

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
 target/ppc/helper.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/ppc/helper.h b/target/ppc/helper.h
index aa6773c4a5..44eb6b7b7c 100644
--- a/target/ppc/helper.h
+++ b/target/ppc/helper.h
@@ -59,8 +59,8 @@ DEF_HELPER_FLAGS_2(cmpeqb, TCG_CALL_NO_RWG_SE, i32, tl, tl)
 DEF_HELPER_FLAGS_1(popcntw, TCG_CALL_NO_RWG_SE, tl, tl)
 DEF_HELPER_FLAGS_2(bpermd, TCG_CALL_NO_RWG_SE, i64, i64, i64)
 DEF_HELPER_3(srad, tl, env, tl, tl)
-DEF_HELPER_0(darn32, tl)
-DEF_HELPER_0(darn64, tl)
+DEF_HELPER_FLAGS_0(darn32, TCG_CALL_NO_RWG, tl)
+DEF_HELPER_FLAGS_0(darn64, TCG_CALL_NO_RWG, tl)
 #endif
 
 DEF_HELPER_FLAGS_1(cntlsw32, TCG_CALL_NO_RWG_SE, i32, i32)
-- 
2.25.1
Re: [PATCH 01/12] target/ppc: declare darn32/darn64 helpers with TCG_CALL_NO_RWG
Posted by Richard Henderson 3 years, 1 month ago
On 5/17/22 05:39, matheus.ferst@eldorado.org.br wrote:
> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
> 
> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
> ---
>   target/ppc/helper.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/ppc/helper.h b/target/ppc/helper.h
> index aa6773c4a5..44eb6b7b7c 100644
> --- a/target/ppc/helper.h
> +++ b/target/ppc/helper.h
> @@ -59,8 +59,8 @@ DEF_HELPER_FLAGS_2(cmpeqb, TCG_CALL_NO_RWG_SE, i32, tl, tl)
>   DEF_HELPER_FLAGS_1(popcntw, TCG_CALL_NO_RWG_SE, tl, tl)
>   DEF_HELPER_FLAGS_2(bpermd, TCG_CALL_NO_RWG_SE, i64, i64, i64)
>   DEF_HELPER_3(srad, tl, env, tl, tl)
> -DEF_HELPER_0(darn32, tl)
> -DEF_HELPER_0(darn64, tl)
> +DEF_HELPER_FLAGS_0(darn32, TCG_CALL_NO_RWG, tl)
> +DEF_HELPER_FLAGS_0(darn64, TCG_CALL_NO_RWG, tl)

These might be declared not to have side effects as well.
It would change the sequence of random numbers returned,
but if we assume those are non-predictable anyway, that
should not be visible to the guest.

Either way,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~