]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Add extension concept and exploit it for s390x `PRNO'
authorAndreas Arnez <arnez@linux.ibm.com>
Thu, 18 Apr 2024 11:49:52 +0000 (13:49 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Thu, 18 Apr 2024 11:49:52 +0000 (13:49 +0200)
commit01d106084a8e2e3164a53b2f29cb0239a45bb81e
tree3f5e04b7f944783ab2bb54a4957bda25bbe907ef
parenta90e4a7172e940887e0c64cb4229ed17d24b3954
Add extension concept and exploit it for s390x `PRNO'

z/Architecture specifies various "complex" machine instructions whose
register and memory effects cannot be expressed with Valgrind's current
mechanisms.

One example is the PPNO instruction -- "perform pseudorandom number
operation", whose main purpose is to generate a chunk of pseudorandom
data.  When doing so, it reads and writes a so-called "parameter block"
while also writing the variable-sized pseudorandom data itself.  These
memory effects cannot be adequately represented by the IRDirty concept.

Instead of using dirty helpers, a different approach is to treat such
instructions similar to syscalls, adding a new IRJumpKind for this
purpose.

This patch provides an implementation of this approach and an illustration
of its use at the example of PPNO (or its newer instantiation "PRNO").
15 files changed:
.gitignore
VEX/priv/guest_s390_toIR.c
VEX/priv/host_s390_defs.c
VEX/priv/host_s390_isel.c
VEX/priv/ir_defs.c
VEX/pub/libvex_ir.h
VEX/pub/libvex_s390x_common.h
VEX/pub/libvex_trc_values.h
coregrind/Makefile.am
coregrind/m_extension/extension-main.c [new file with mode: 0644]
coregrind/m_extension/extension-s390x.c [new file with mode: 0644]
coregrind/m_extension/priv_extension.h [new file with mode: 0644]
coregrind/m_extension/priv_types_n_macros.h [new file with mode: 0644]
coregrind/m_scheduler/scheduler.c
coregrind/pub_core_extension.h [new file with mode: 0644]