15template <
typename TStoreOp,
typename TInstrContext>
class BinaryStoreInstrWithImm {
17 using It =
typename TInstrContext::It;
18 using Pc =
typename TInstrContext::Pc;
20 template <
typename TTgt,
typename TArg0>
22 const TTgt &rt,
const TArg0 &rn,
const u32 &imm32) {
23 const bool is_index = (iflags &
static_cast<InstrFlagsSet
>(InstrFlags::kIndex)) != 0U;
24 const bool is_add = (iflags &
static_cast<InstrFlagsSet
>(InstrFlags::kAdd)) != 0U;
27 if (!condition_passed) {
28 PostExecAdvancePcAndIt::Call(ictx, iflags);
32 const auto n = ictx.cpua.ReadRegister(rn.Get());
33 const me_adr_t offset_addr = is_add ==
true ? n + imm32 : n - imm32;
34 const me_adr_t address = is_index ==
true ? offset_addr : n;
36 const auto t = ictx.cpua.ReadRegister(rt.Get());
39 const bool is_wback = (iflags &
static_cast<InstrFlagsSet
>(InstrFlags::kWBack)) != 0U;
41 PostExecWriteRegPcExcluded::Call(ictx, rn, offset_addr);
43 PostExecAdvancePcAndIt::Call(ictx, iflags);
51 BinaryStoreInstrWithImm() =
delete;
56 ~BinaryStoreInstrWithImm() =
delete;
62 BinaryStoreInstrWithImm(
const BinaryStoreInstrWithImm &r_src) =
delete;
68 BinaryStoreInstrWithImm &operator=(
const BinaryStoreInstrWithImm &r_src) =
delete;
74 BinaryStoreInstrWithImm(BinaryStoreInstrWithImm &&r_src) =
delete;
80 BinaryStoreInstrWithImm &operator=(BinaryStoreInstrWithImm &&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