libmicroemu 0.2.0
ARM Microcontroller Emulator Library
Loading...
Searching...
No Matches
mnemonic_builder_binary_null_instr_with_imm.h
1#pragma once
2
4#include "libmicroemu/types.h"
5
6namespace libmicroemu::internal {
7
11template <typename TContext> class MnemonicBuilderBinaryNullInstrWithImm {
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, const u32 &imm32) {
20 static_cast<void>(bflags);
21 const bool is_setflags = (iflags & static_cast<InstrFlagsSet>(InstrFlags::kSetFlags)) != 0U;
22 mctx.builder.AddString(instr_spec)
23 .AddString(is_setflags == true ? "S" : "")
24 .AddString(It::GetConditionAsStr(mctx.cpua))
25 .AddChar(' ')
26 .AddString(Reg::GetRegisterName(rm.Get()))
27 .AddString(", #")
28 .AddUInt(imm32)
29 .Terminate();
30 }
31
32private:
36 MnemonicBuilderBinaryNullInstrWithImm() = delete;
37
41 ~MnemonicBuilderBinaryNullInstrWithImm() = delete;
42
47 MnemonicBuilderBinaryNullInstrWithImm(const MnemonicBuilderBinaryNullInstrWithImm &r_src) =
48 default;
49
54 MnemonicBuilderBinaryNullInstrWithImm &
55 operator=(const MnemonicBuilderBinaryNullInstrWithImm &r_src) = delete;
56
61 MnemonicBuilderBinaryNullInstrWithImm(MnemonicBuilderBinaryNullInstrWithImm &&r_src) = delete;
62
67 MnemonicBuilderBinaryNullInstrWithImm &
68 operator=(MnemonicBuilderBinaryNullInstrWithImm &&r_src) = delete;
69};
70
71} // 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.