[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-8.0 v2 12/13] target/s390x: Use tcg_gen_atomic_cmpxchg_i1
From: |
Ilya Leoshkevich |
Subject: |
Re: [PATCH for-8.0 v2 12/13] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG |
Date: |
Tue, 29 Nov 2022 00:40:51 +0100 |
On Fri, Nov 11, 2022 at 06:08:19PM +1000, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/s390x/helper.h | 2 --
> target/s390x/tcg/mem_helper.c | 52 ---------------------------
> target/s390x/tcg/translate.c | 60 ++++++++++++++++++++------------
> target/s390x/tcg/insn-data.h.inc | 2 +-
> 4 files changed, 38 insertions(+), 78 deletions(-)
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
I was wondering what assembly this would generate in parallel mode and
wrote a small test. On my x86_64 machine it ended up being
helper_atomic_cmpxchgo_be() -> cpu_atomic_cmpxchgo_be_mmu() ->
lock cmpxchg16b, nothing surprising.
On an s390x host we fall back to cpu_exec_step_atomic(), because in the
configure test:
int main(void)
{
unsigned __int128 x = 0, y = 0;
__sync_val_compare_and_swap_16(&x, y, x);
return 0;
}
x and y are not aligned. I guess that's working as intended as well,
even though it would be nice to eventually make use of cdsg there.
I will post the test shortly.
- [PATCH for-8.0 v2 06/13] target/s390x: Use Int128 for return from CLST, (continued)
- [PATCH for-8.0 v2 06/13] target/s390x: Use Int128 for return from CLST, Richard Henderson, 2022/11/11
- [PATCH for-8.0 v2 07/13] target/s390x: Use Int128 for return from CKSM, Richard Henderson, 2022/11/11
- [PATCH for-8.0 v2 09/13] target/s390x: Copy wout_x1 to wout_x1_P, Richard Henderson, 2022/11/11
- [PATCH for-8.0 v2 13/13] target/s390x: Implement CC_OP_NZ in gen_op_calc_cc, Richard Henderson, 2022/11/11
- [PATCH for-8.0 v2 10/13] target/s390x: Use Int128 for returning float128, Richard Henderson, 2022/11/11
- [PATCH for-8.0 v2 11/13] target/s390x: Use Int128 for passing float128, Richard Henderson, 2022/11/11
- [PATCH for-8.0 v2 12/13] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG, Richard Henderson, 2022/11/11
- Re: [PATCH for-8.0 v2 12/13] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG,
Ilya Leoshkevich <=
- [PATCH] tests/tcg/s390x: Add cdsg.c, Ilya Leoshkevich, 2022/11/28
- Re: [PATCH] tests/tcg/s390x: Add cdsg.c, David Hildenbrand, 2022/11/29
- Re: [PATCH] tests/tcg/s390x: Add cdsg.c, Ilya Leoshkevich, 2022/11/29
- [PATCH v2] tests/tcg/s390x: Add cdsg.c, Ilya Leoshkevich, 2022/11/29
- [PATCH v3] tests/tcg/s390x: Add cdsg.c, Ilya Leoshkevich, 2022/11/29
- Re: [PATCH for-8.0 v2 12/13] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG, Richard Henderson, 2022/11/28