17template <
typename TInstrContext>
class VariadicStoreInstr {
19 using It =
typename TInstrContext::It;
20 using Pc =
typename TInstrContext::Pc;
22 template <
typename TArg0>
24 const TArg0 &rn,
const u32 ®isters) {
27 if (!condition_passed) {
28 PostExecAdvancePcAndIt::Call(ictx, iflags);
32 const auto n = ictx.cpua.ReadRegister(rn.Get());
35 const bool is_wback = (iflags &
static_cast<InstrFlagsSet
>(InstrFlags::kWBack)) != 0U;
37 for (u32 reg = 0U; reg <= 14U; ++reg) {
39 if ((registers & bm) != 0U) {
40 if ((reg ==
static_cast<u32
>(rn.Get())) && (is_wback) && (lowest_bit_set == reg)) {
43 const auto r = ictx.cpua.ReadRegister(
static_cast<RegisterId>(reg));
45 ictx.bus.template WriteOrRaise<u32>(ictx.cpua, address, r,
46 BusExceptionType::kRaisePreciseDataBusError));
58 const auto wback_val = n + 4U * reg_count;
61 PostExecWriteRegPcExcluded::Call(ictx, rn, wback_val);
63 PostExecAdvancePcAndIt::Call(ictx, iflags);
72 VariadicStoreInstr() =
delete;
77 ~VariadicStoreInstr() =
delete;
83 VariadicStoreInstr(
const VariadicStoreInstr &r_src) =
delete;
89 VariadicStoreInstr &operator=(
const VariadicStoreInstr &r_src) =
delete;
95 VariadicStoreInstr(VariadicStoreInstr &&r_src) =
delete;
101 VariadicStoreInstr &operator=(VariadicStoreInstr &&r_src) =
delete;
#define TRY_ASSIGN(NAME, OUT_TYPE, CALL)
Try to assign a value to a variable and return an error if the assignment fails.
Definition result.h:123
#define TRY(OUT_TYPE, CALL)
Try to call a function and return an error if the call fails.
Definition result.h:138