diff mbox series

[06/19] target/ppc: Set OV32 when OV is set

Message ID 20220901131756.26060-7-victor.colombo@eldorado.org.br (mailing list archive)
State New, archived
Headers show
Series Multiple ppc instructions fixes | expand

Commit Message

Víctor Colombo Sept. 1, 2022, 1:17 p.m. UTC
According to PowerISA: "OV32 is set whenever OV is implicitly set, and
is set to the same value that OV is defined to be set to in 32-bit
mode".

This patch changes helper_update_ov_legacy to set/clear ov32 when
applicable.

Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
---
 target/ppc/int_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Henrique Barboza Sept. 5, 2022, 6:25 p.m. UTC | #1
On 9/1/22 10:17, Víctor Colombo wrote:
> According to PowerISA: "OV32 is set whenever OV is implicitly set, and
> is set to the same value that OV is defined to be set to in 32-bit
> mode".
> 
> This patch changes helper_update_ov_legacy to set/clear ov32 when
> applicable.
> 
> Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
> ---


Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

>   target/ppc/int_helper.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
> index d905f07d02..696096100b 100644
> --- a/target/ppc/int_helper.c
> +++ b/target/ppc/int_helper.c
> @@ -37,9 +37,9 @@
>   static inline void helper_update_ov_legacy(CPUPPCState *env, int ov)
>   {
>       if (unlikely(ov)) {
> -        env->so = env->ov = 1;
> +        env->so = env->ov = env->ov32 = 1;
>       } else {
> -        env->ov = 0;
> +        env->ov = env->ov32 = 0;
>       }
>   }
>
diff mbox series

Patch

diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
index d905f07d02..696096100b 100644
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -37,9 +37,9 @@ 
 static inline void helper_update_ov_legacy(CPUPPCState *env, int ov)
 {
     if (unlikely(ov)) {
-        env->so = env->ov = 1;
+        env->so = env->ov = env->ov32 = 1;
     } else {
-        env->ov = 0;
+        env->ov = env->ov32 = 0;
     }
 }