diff mbox series

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

Message ID 20220517123929.284511-2-matheus.ferst@eldorado.org.br
State Changes Requested
Headers show
Series Change helper declarations to use call flags | expand

Commit Message

Matheus K. Ferst May 17, 2022, 12:39 p.m. UTC
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(-)

Comments

Richard Henderson May 17, 2022, 4:30 p.m. UTC | #1
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~
diff mbox series

Patch

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)