Skip to contentSkip to conversation

tcg patch queue

GIT PULL Applied Richard Henderson 2 participants 3 messages Jun 20, 2021 – Jun 22, 2021

lore
Share & tools
lore
#0 lore raw

The following changes since commit 3ccf6cd0e3e1dfd663814640b3b18b55715d7a75:

Merge remote-tracking branch 'remotes/kraxel/tags/audio-20210617-pull-request' into staging (2021-06-18 09:54:42 +0100)

are available in the Git repository at:

https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210619-2

for you to fetch changes up to 1c9638667b7068539dc5783c9428d588b14162ea:

util/oslib-win32: Fix fatal assertion in qemu_try_memalign (2021-06-19 14:51:51 -0700)

----------------------------------------------------------------
TCI cleanup and re-encoding Fixes for #367 and #390. Move TCGCond to tcg/tcg-cond.h. Fix for win32 qemu_try_memalign.

----------------------------------------------------------------
Alessandro Di Federico (1):
tcg: expose TCGCond manipulation routines

Richard Henderson (31):
tcg: Combine dh_is_64bit and dh_is_signed to dh_typecode
tcg: Add tcg_call_flags
accel/tcg/plugin-gen: Drop inline markers
plugins: Drop tcg_flags from struct qemu_plugin_dyn_cb accel/tcg: Add tcg call flags to plugins helpers
tcg: Store the TCGHelperInfo in the TCGOp for call
tcg: Add tcg_call_func
tcg: Build ffi data structures for helpers
tcg/tci: Improve tcg_target_call_clobber_regs
tcg/tci: Move call-return regs to end of tcg_target_reg_alloc_order tcg/tci: Use ffi for calls
tcg/tci: Reserve r13 for a temporary
tcg/tci: Emit setcond before brcond
tcg/tci: Remove tci_write_reg
tcg/tci: Change encoding to uint32_t units
tcg/tci: Implement goto_ptr
tcg/tci: Implement movcond
tcg/tci: Implement andc, orc, eqv, nand, nor
tcg/tci: Implement extract, sextract
tcg/tci: Implement clz, ctz, ctpop
tcg/tci: Implement mulu2, muls2
tcg/tci: Implement add2, sub2
tcg/tci: Split out tci_qemu_ld, tci_qemu_st
Revert "tcg/tci: Use exec/cpu_ldst.h interfaces" tcg/tci: Remove the qemu_ld/st_type macros
tcg/tci: Use {set,clear}_helper_retaddr
tests/tcg: Increase timeout for TCI
accel/tcg: Probe the proper permissions for atomic ops tcg/sparc: Fix temp_allocate_frame vs sparc stack bias
tcg: Allocate sufficient storage in temp_allocate_frame
tcg: Restart when exhausting the stack frame

Stefan Weil (1):
util/oslib-win32: Fix fatal assertion in qemu_try_memalign

 configure                                          |    3 +
 accel/tcg/atomic_template.h                        |   24 +-
 accel/tcg/plugin-helpers.h                         |    5 +-
 include/exec/helper-head.h                         |   37 +-
 include/exec/helper-tcg.h                          |   34 +-
 include/qemu/plugin.h                              |    1 -
 include/tcg/tcg-cond.h                             |  101 ++
 include/tcg/tcg-opc.h                              |    4 +-
 include/tcg/tcg.h                                  |   71 +-
 target/hppa/helper.h                               |    3 -
 target/i386/ops_sse_header.h                       |    3 -
 target/m68k/helper.h                               |    1 -
 target/ppc/helper.h                                |    3 -
 tcg/tcg-internal.h                                 |   22 +
 tcg/tci/tcg-target-con-set.h                       |    1 +
 tcg/tci/tcg-target.h                               |   68 +-
 accel/tcg/cputlb.c                                 |   95 +-
 accel/tcg/plugin-gen.c                             |   20 +-
 accel/tcg/user-exec.c                              |    8 +-
 plugins/core.c                                     |   30 +-
 tcg/optimize.c                                     |    3 +-
 tcg/tcg.c                                          |  299 +++--
 tcg/tci.c                                          | 1203 ++++++++++----------
 util/oslib-win32.c                                 |    6 +-
 tcg/sparc/tcg-target.c.inc                         |   16 +-
 tcg/tci/tcg-target.c.inc                           |  550 ++++-----
 tcg/meson.build                                    |    8 +-
 tcg/tci/README                                     |   20 +-
 tests/docker/dockerfiles/alpine.docker             |    1 +
 tests/docker/dockerfiles/centos8.docker            |    1 +
 tests/docker/dockerfiles/debian10.docker           |    1 +
 tests/docker/dockerfiles/fedora-i386-cross.docker  |    1 +
 tests/docker/dockerfiles/fedora-win32-cross.docker |    1 +
 tests/docker/dockerfiles/fedora-win64-cross.docker |    1 +
 tests/docker/dockerfiles/fedora.docker             |    1 +
 tests/docker/dockerfiles/ubuntu.docker             |    1 +
 tests/docker/dockerfiles/ubuntu1804.docker         |    1 +
 tests/docker/dockerfiles/ubuntu2004.docker         |    1 +
 tests/tcg/Makefile.target                          |    6 +-
 39 files changed, 1453 insertions(+), 1202 deletions(-)
 create mode 100644 include/tcg/tcg-cond.h
#1 lore raw

[PULL v2 30/33] tcg: Allocate sufficient storage in temp_allocate_frame

This function should have been updated for vector types when they were introduced.

Fixes d2fd745fe8b

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/367

---
 tcg/tcg.c | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)
tcg/tcg.c +26 -5
index 52e858523c..bdeea18234 100644
@@ -3015,17 +3015,38 @@ static void check_regs(TCGContext *s)
 
 static void temp_allocate_frame(TCGContext *s, TCGTemp *ts)
 {
-    if (s->current_frame_offset + (tcg_target_long)sizeof(tcg_target_long) >
-        s->frame_end) {
-        tcg_abort();
+    intptr_t off, size, align;
+
+    switch (ts->type) {
+    case TCG_TYPE_I32:
+        size = align = 4;
+        break;
+    case TCG_TYPE_I64:
+    case TCG_TYPE_V64:
+        size = align = 8;
+        break;
+    case TCG_TYPE_V128:
+        size = align = 16;
+        break;
+    case TCG_TYPE_V256:
+        /* Note that we do not require aligned storage for V256. */
+        size = 32, align = 16;
+        break;
+    default:
+        g_assert_not_reached();
     }
-    ts->mem_offset = s->current_frame_offset;
+
+    assert(align <= TCG_TARGET_STACK_ALIGN);
+    off = ROUND_UP(s->current_frame_offset, align);
+    assert(off + size <= s->frame_end);
+    s->current_frame_offset = off + size;
+
+    ts->mem_offset = off;
 #if defined(__sparc__)
     ts->mem_offset += TCG_TARGET_STACK_BIAS;
 #endif
     ts->mem_base = s->frame_temp;
     ts->mem_allocated = 1;
-    s->current_frame_offset += sizeof(tcg_target_long);
 }
 
 static void temp_load(TCGContext *, TCGTemp *, TCGRegSet, TCGRegSet, TCGRegSet);
Signature · 1 line
2.25.1
#2 lore raw
In reply to Richard Henderson
Quoted 11 lines · Richard Henderson

The following changes since commit 3ccf6cd0e3e1dfd663814640b3b18b55715d7a75:

Merge remote-tracking branch 'remotes/kraxel/tags/audio-20210617-pull-request' into staging (2021-06-18 09:54:42 +0100)

are available in the Git repository at:

https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210619-2

for you to fetch changes up to 1c9638667b7068539dc5783c9428d588b14162ea:

Quoted 8 lines

util/oslib-win32: Fix fatal assertion in qemu_try_memalign (2021-06-19 14:51:51 -0700)

----------------------------------------------------------------
TCI cleanup and re-encoding Fixes for #367 and #390. Move TCGCond to tcg/tcg-cond.h. Fix for win32 qemu_try_memalign.

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.

-- PMM