[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers
From: |
Leon Alrae |
Subject: |
Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers |
Date: |
Fri, 9 Sep 2016 15:46:16 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Sep 03, 2016 at 09:39:41PM +0100, Richard Henderson wrote:
> --- a/tcg/tcg.h
> +++ b/tcg/tcg.h
> @@ -1175,6 +1175,59 @@ uint64_t helper_be_ldq_cmmu(CPUArchState *env,
> target_ulong addr,
> # define helper_ret_ldq_cmmu helper_le_ldq_cmmu
> #endif
>
> +uint32_t helper_atomic_cmpxchgb_mmu(CPUArchState *env, target_ulong addr,
> + uint32_t cmpv, uint32_t newv,
> + TCGMemOpIdx oi, uintptr_t retaddr);
> +uint32_t helper_atomic_cmpxchgw_le_mmu(CPUArchState *env, target_ulong addr,
> + uint32_t cmpv, uint32_t newv,
> + TCGMemOpIdx oi, uintptr_t retaddr);
> +uint32_t helper_atomic_cmpxchgl_le_mmu(CPUArchState *env, target_ulong addr,
> + uint32_t cmpv, uint32_t newv,
> + TCGMemOpIdx oi, uintptr_t retaddr);
> +uint64_t helper_atomic_cmpxchgq_le_mmu(CPUArchState *env, target_ulong addr,
> + uint64_t cmpv, uint64_t newv,
> + TCGMemOpIdx oi, uintptr_t retaddr);
> +uint32_t helper_atomic_cmpxchgw_be_mmu(CPUArchState *env, target_ulong addr,
> + uint32_t cmpv, uint32_t newv,
> + TCGMemOpIdx oi, uintptr_t retaddr);
> +uint32_t helper_atomic_cmpxchgl_be_mmu(CPUArchState *env, target_ulong addr,
> + uint32_t cmpv, uint32_t newv,
> + TCGMemOpIdx oi, uintptr_t retaddr);
> +uint64_t helper_atomic_cmpxchgq_be_mmu(CPUArchState *env, target_ulong addr,
> + uint64_t cmpv, uint64_t newv,
> + TCGMemOpIdx oi, uintptr_t retaddr);
Wouldn't it be useful if tcg.h provided also aliases for _le/_be atomic
helpers (equivalent to helper_ret_X_mmu) so that in target-* code we wouldn't
need to care about the endianness (specifically I'm thinking about SC in MIPS
where I need to select between helper_atomic_cmpxchgl_le_mmu() and
helper_atomic_cmpxchgl_be_mmu()).
Thanks,
Leon
- [Qemu-devel] [PATCH v3 10/34] cputlb: Remove includes from softmmu_template.h, (continued)
- [Qemu-devel] [PATCH v3 10/34] cputlb: Remove includes from softmmu_template.h, Richard Henderson, 2016/09/03
- [Qemu-devel] [PATCH v3 16/34] target-i386: emulate LOCK'ed cmpxchg using cmpxchg helpers, Richard Henderson, 2016/09/03
- [Qemu-devel] [PATCH v3 14/34] tcg: Add atomic128 helpers, Richard Henderson, 2016/09/03
- [Qemu-devel] [PATCH v3 18/34] target-i386: emulate LOCK'ed INC using atomic helper, Richard Henderson, 2016/09/03
- [Qemu-devel] [PATCH v3 17/34] target-i386: emulate LOCK'ed OP instructions using atomic helpers, Richard Henderson, 2016/09/03
- [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers, Richard Henderson, 2016/09/03
Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers, Alex Bennée, 2016/09/12
Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers, Alex Bennée, 2016/09/13
[Qemu-devel] [PATCH v3 19/34] target-i386: emulate LOCK'ed NOT using atomic helper, Richard Henderson, 2016/09/03