libmicroemu 0.2.0
ARM Microcontroller Emulator Library
Loading...
Searching...
No Matches
mnemonic_builder_unary_instr_with_imm_carry.h
1#pragma once
2
4#include "libmicroemu/types.h"
5
6namespace libmicroemu::internal {
7
11template <typename TContext> class MnemonicBuilderUnaryInstrWithImmCarry {
12public:
13 using It = typename TContext::It;
14 using Reg = typename TContext::Reg;
15 using SReg = typename TContext::SReg;
16
17 template <typename TDest>
18 static void Build(const char *instr_spec, TContext &mctx, const MnemonicBuilderFlagsSet &bflags,
19 const InstrFlagsSet &iflags, const TDest &rd,
20 const ThumbImmediateResult &imm_carry) {
21
22 static_cast<void>(bflags);
23 const bool is_setflags = (iflags & static_cast<InstrFlagsSet>(InstrFlags::kSetFlags)) != 0U;
24 mctx.builder.AddString(instr_spec)
25 .AddString(is_setflags == true ? "S" : "")
26 .AddString(It::GetConditionAsStr(mctx.cpua))
27 .AddChar(' ')
28 .AddString(Reg::GetRegisterName(rd.Get()))
29 .AddString(", #")
30 .AddUInt(imm_carry.out)
31 .Terminate();
32 }
33
34private:
38 MnemonicBuilderUnaryInstrWithImmCarry() = delete;
39
43 ~MnemonicBuilderUnaryInstrWithImmCarry() = delete;
44
49 MnemonicBuilderUnaryInstrWithImmCarry(const MnemonicBuilderUnaryInstrWithImmCarry &r_src) =
50 default;
51
56 MnemonicBuilderUnaryInstrWithImmCarry &
57 operator=(const MnemonicBuilderUnaryInstrWithImmCarry &r_src) = delete;
58
63 MnemonicBuilderUnaryInstrWithImmCarry(MnemonicBuilderUnaryInstrWithImmCarry &&r_src) = delete;
64
69 MnemonicBuilderUnaryInstrWithImmCarry &
70 operator=(MnemonicBuilderUnaryInstrWithImmCarry &&r_src) = delete;
71};
72
73} // 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 thumb_immediate_result.h:6