libmicroemu 0.2.0
ARM Microcontroller Emulator Library
Loading...
Searching...
No Matches
mnemonic_builder_nullary_instr.h
1#pragma once
2
4#include "libmicroemu/types.h"
5
6namespace libmicroemu::internal {
7
11template <typename TContext> class MnemonicBuilderNullaryInstr {
12public:
13 using It = typename TContext::It;
14 using Reg = typename TContext::Reg;
15 using SReg = typename TContext::SReg;
16 static void Build(const char *instr_spec, TContext &mctx, const MnemonicBuilderFlagsSet &bflags,
17 const InstrFlagsSet &iflags) {
18 static_cast<void>(bflags);
19 const bool is_setflags = (iflags & static_cast<InstrFlagsSet>(InstrFlags::kSetFlags)) != 0U;
20 mctx.builder.AddString(instr_spec)
21 .AddString(is_setflags == true ? "S" : "")
22 .AddString(It::GetConditionAsStr(mctx.cpua))
23 .Terminate();
24 }
25
26private:
30 MnemonicBuilderNullaryInstr() = delete;
31
35 ~MnemonicBuilderNullaryInstr() = delete;
36
41 MnemonicBuilderNullaryInstr(const MnemonicBuilderNullaryInstr &r_src) = default;
42
47 MnemonicBuilderNullaryInstr &operator=(const MnemonicBuilderNullaryInstr &r_src) = delete;
48
53 MnemonicBuilderNullaryInstr(MnemonicBuilderNullaryInstr &&r_src) = delete;
54
59 MnemonicBuilderNullaryInstr &operator=(MnemonicBuilderNullaryInstr &&r_src) = delete;
60};
61
62} // 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.