qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL v2 00/33] tcg patch queue
@ 2021-06-20  4:25 Richard Henderson
  2021-06-20  4:25 ` [PULL v2 30/33] tcg: Allocate sufficient storage in temp_allocate_frame Richard Henderson
  2021-06-22 13:36 ` [PULL v2 00/33] tcg patch queue Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Henderson @ 2021-06-20  4:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

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


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

* [PULL v2 30/33] tcg: Allocate sufficient storage in temp_allocate_frame
  2021-06-20  4:25 [PULL v2 00/33] tcg patch queue Richard Henderson
@ 2021-06-20  4:25 ` Richard Henderson
  2021-06-22 13:36 ` [PULL v2 00/33] tcg patch queue Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2021-06-20  4:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Philippe Mathieu-Daudé, qemu-stable, Stefan Weil

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

Fixes: d2fd745fe8b
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/367
Cc: qemu-stable@nongnu.org
Tested-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/tcg.c | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 52e858523c..bdeea18234 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -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);
-- 
2.25.1



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

* Re: [PULL v2 00/33] tcg patch queue
  2021-06-20  4:25 [PULL v2 00/33] tcg patch queue Richard Henderson
  2021-06-20  4:25 ` [PULL v2 30/33] tcg: Allocate sufficient storage in temp_allocate_frame Richard Henderson
@ 2021-06-22 13:36 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2021-06-22 13:36 UTC (permalink / raw)
  To: Richard Henderson; +Cc: QEMU Developers

On Sun, 20 Jun 2021 at 05:26, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> 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.
>


Applied, thanks.

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

-- PMM


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

end of thread, other threads:[~2021-06-22 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-20  4:25 [PULL v2 00/33] tcg patch queue Richard Henderson
2021-06-20  4:25 ` [PULL v2 30/33] tcg: Allocate sufficient storage in temp_allocate_frame Richard Henderson
2021-06-22 13:36 ` [PULL v2 00/33] tcg patch queue Peter Maydell

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).