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