Skip to content

Commit

Permalink
i#5036 A64 scatter/gather, part 9: State restore (#6753)
Browse files Browse the repository at this point in the history
Adds support for restoring register app state when a fault is triggered
by one of the instructions in a scatter/gather expansion sequence
emitted by drx_expand_scatter_gather().

Also extends the existing scatter/gather expansion tests to check the
value of the FFR register, and run the test instructions with different
elements rigged to fault so we can test the state restoration behaviour.

Support for the first-faulting and non-faulting variants (ldff1*,
ldnf1*) will be added in future commits.

Issue: #5036
  • Loading branch information
jackgallagher-arm authored Apr 4, 2024
1 parent 221fc84 commit 2587672
Show file tree
Hide file tree
Showing 5 changed files with 1,702 additions and 1,150 deletions.
9 changes: 8 additions & 1 deletion clients/drcachesim/tools/invariant_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,14 @@ invariant_checker_t::parallel_shard_memref(void *shard_data, const memref_t &mem
// DR hands us a different address for sysenter than the
// resumption point.
shard->last_signal_context_.pre_signal_instr.memref.instr.type ==
TRACE_TYPE_INSTR_SYSENTER;
TRACE_TYPE_INSTR_SYSENTER // clang-format off
// The AArch64 scatter/gather expansion test skips faulting
// instructions in the signal handler by incrementing the PC.
IF_AARCH64(||
(knob_test_name_ == "scattergather" &&
memref.instr.addr ==
shard->last_signal_context_.xfer_int_pc + 4));
// clang-format on
report_if_false(
shard,
kernel_event_marker_equality ||
Expand Down
Loading

0 comments on commit 2587672

Please sign in to comment.