qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] tcg: Reorg 128-bit atomic operations
@ 2018-08-21 14:26 Richard Henderson
  2018-08-21 14:27 ` [Qemu-devel] [PATCH v2 1/5] tcg: Split CONFIG_ATOMIC128 Richard Henderson
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Richard Henderson @ 2018-08-21 14:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: cota, pbonzini

The other day Emilio noticed that we weren't setting CONFIG_ATOMIC128
for x86_64, despite forcing -mcx16 on the command-line.  It seems that
gcc has changed behaviour with version 7.

There's a rather long discussion about this:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878

It does not appear that gcc will ever quite align with our needs here.
I have added a second configure test, and have split the test to be 
used by the rest of QEMU into two compile-time constants.  This lets
us refactor the code a bit and remove some conditional compilation.

In addition, no version of gcc supports __sync_compare_and_swap_16
for aarch64.  Inline some asm for that case.

I've also checked power8, which does support CONFIG_ATOMIC128.

Changes since v1:
  * Fixed some errors in the lesser used paths (Emilio).
  * Dropped the target/s390x changes for now, as they conflict
    with other patches in-flight on list.
  * Raise EXCP_ATOMIC at translate time for AArch64, if needed.


r~


Richard Henderson (5):
  tcg: Split CONFIG_ATOMIC128
  target/i386: Convert to HAVE_CMPXCHG128
  target/arm: Convert to HAVE_CMPXCHG128
  target/arm: Check HAVE_CMPXCHG128 at transate time
  target/ppc: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128

 accel/tcg/atomic_template.h |  20 ++-
 include/qemu/atomic128.h    | 155 ++++++++++++++++++++++
 target/ppc/helper.h         |   2 +-
 tcg/tcg.h                   |  16 ++-
 accel/tcg/cputlb.c          |   3 +-
 accel/tcg/user-exec.c       |   5 +-
 target/arm/helper-a64.c     | 251 ++++++++++++++++++------------------
 target/arm/translate-a64.c  |  38 +++---
 target/i386/mem_helper.c    |   9 +-
 target/ppc/mem_helper.c     |  33 ++++-
 target/ppc/translate.c      | 115 +++++++++--------
 configure                   |  19 +++
 12 files changed, 443 insertions(+), 223 deletions(-)
 create mode 100644 include/qemu/atomic128.h

-- 
2.17.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-08-21 22:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-21 14:26 [Qemu-devel] [PATCH v2 0/5] tcg: Reorg 128-bit atomic operations Richard Henderson
2018-08-21 14:27 ` [Qemu-devel] [PATCH v2 1/5] tcg: Split CONFIG_ATOMIC128 Richard Henderson
2018-08-21 21:30   ` Emilio G. Cota
2018-08-21 14:27 ` [Qemu-devel] [PATCH v2 2/5] target/i386: Convert to HAVE_CMPXCHG128 Richard Henderson
2018-08-21 14:27 ` [Qemu-devel] [PATCH v2 3/5] target/arm: " Richard Henderson
2018-08-21 14:27 ` [Qemu-devel] [PATCH v2 4/5] target/arm: Check HAVE_CMPXCHG128 at transate time Richard Henderson
2018-08-21 22:01   ` Emilio G. Cota
2018-08-21 14:27 ` [Qemu-devel] [PATCH v2 5/5] target/ppc: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128 Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).