[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/9] target/i386: Convert to HAVE_CMPXCHG128
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/9] target/i386: Convert to HAVE_CMPXCHG128 |
Date: |
Thu, 11 Oct 2018 12:55:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 03/10/2018 21:39, Richard Henderson wrote:
> Reviewed-by: Emilio G. Cota <address@hidden>
> Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> target/i386/mem_helper.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/target/i386/mem_helper.c b/target/i386/mem_helper.c
> index 30c26b9d9c..6cc53bcb40 100644
> --- a/target/i386/mem_helper.c
> +++ b/target/i386/mem_helper.c
> @@ -23,6 +23,7 @@
> #include "exec/exec-all.h"
> #include "exec/cpu_ldst.h"
> #include "qemu/int128.h"
> +#include "qemu/atomic128.h"
> #include "tcg.h"
>
> void helper_cmpxchg8b_unlocked(CPUX86State *env, target_ulong a0)
> @@ -137,10 +138,7 @@ void helper_cmpxchg16b(CPUX86State *env, target_ulong a0)
>
> if ((a0 & 0xf) != 0) {
> raise_exception_ra(env, EXCP0D_GPF, ra);
> - } else {
> -#ifndef CONFIG_ATOMIC128
> - cpu_loop_exit_atomic(ENV_GET_CPU(env), ra);
> -#else
> + } else if (HAVE_CMPXCHG128) {
> int eflags = cpu_cc_compute_all(env, CC_OP);
>
> Int128 cmpv = int128_make128(env->regs[R_EAX], env->regs[R_EDX]);
> @@ -159,7 +157,8 @@ void helper_cmpxchg16b(CPUX86State *env, target_ulong a0)
> eflags &= ~CC_Z;
> }
> CC_SRC = eflags;
> -#endif
> + } else {
> + cpu_loop_exit_atomic(ENV_GET_CPU(env), ra);
> }
> }
> #endif
>
- [Qemu-devel] [PATCH v3 0/9] tcg: Reorg 128-bit atomic operations, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 2/9] target/i386: Convert to HAVE_CMPXCHG128, Richard Henderson, 2018/10/03
- Re: [Qemu-devel] [PATCH v3 2/9] target/i386: Convert to HAVE_CMPXCHG128,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v3 4/9] target/arm: Check HAVE_CMPXCHG128 at translate time, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 9/9] target/s390x: Check HAVE_ATOMIC128 and HAVE_CMPXCHG128 at translate, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 1/9] tcg: Split CONFIG_ATOMIC128, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 8/9] target/s390x: Skip wout, cout helpers if op helper does not return, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 6/9] target/s390x: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128, Richard Henderson, 2018/10/03