libmicroemu 0.2.0
ARM Microcontroller Emulator Library
Loading...
Searching...
No Matches
mnemonic_builder_ternary_loadstore_instr_with_shift.h
1#pragma once
2
4#include "libmicroemu/types.h"
5
6namespace libmicroemu::internal {
7
11template <typename TContext> class MnemonicBuilderTernaryLoadStoreInstrWithShift {
12public:
13 using It = typename TContext::It;
14 using Reg = typename TContext::Reg;
15 using SReg = typename TContext::SReg;
16
17 template <typename TTgt, typename TArg0, typename TArg1>
18 static void Build(const char *instr_spec, TContext &mctx, const MnemonicBuilderFlagsSet &bflags,
19 const InstrFlagsSet &iflags, const TTgt &rt, const TArg0 &rn, const TArg1 &rm,
20 const ImmShiftResults &shift_res) {
21
22 static_cast<void>(iflags);
23 static_cast<void>(bflags);
24 mctx.builder.AddString(instr_spec)
25 .AddString(It::GetConditionAsStr(mctx.cpua))
26 .AddChar(' ')
27 .AddString(Reg::GetRegisterName(rt.Get()))
28 .AddString(", [")
29 .AddString(Reg::GetRegisterName(rn.Get()))
30 .AddString(", ")
31 .AddString(Reg::GetRegisterName(rm.Get()));
32
33 if (shift_res.value != 0U) {
34 mctx.builder.AddString(", LSL #").AddUInt(shift_res.value);
35 }
36 mctx.builder.AddChar(']').Terminate();
37 }
38
39private:
43 MnemonicBuilderTernaryLoadStoreInstrWithShift() = delete;
44
48 ~MnemonicBuilderTernaryLoadStoreInstrWithShift() = delete;
49
54 MnemonicBuilderTernaryLoadStoreInstrWithShift(
55 const MnemonicBuilderTernaryLoadStoreInstrWithShift &r_src) = default;
56
61 MnemonicBuilderTernaryLoadStoreInstrWithShift &
62 operator=(const MnemonicBuilderTernaryLoadStoreInstrWithShift &r_src) = delete;
63
68 MnemonicBuilderTernaryLoadStoreInstrWithShift(
69 MnemonicBuilderTernaryLoadStoreInstrWithShift &&r_src) = delete;
70
75 MnemonicBuilderTernaryLoadStoreInstrWithShift &
76 operator=(MnemonicBuilderTernaryLoadStoreInstrWithShift &&r_src) = delete;
77};
78
79} // namespace libmicroemu::internal
The libmicroemu::internal namespace contains all classes and functions of libmicroemu which are priva...
Definition bkpt_flags.h:6
Contains the Result class which is used to return the result of a function.
Definition imm_shift_results.h:15