1 // AsmJit - Machine code generation for C++
2 //
3 //  * Official AsmJit Home Page: https://asmjit.com
4 //  * Official Github Repository: https://github.com/asmjit/asmjit
5 //
6 // Copyright (c) 2008-2020 The AsmJit Authors
7 //
8 // This software is provided 'as-is', without any express or implied
9 // warranty. In no event will the authors be held liable for any damages
10 // arising from the use of this software.
11 //
12 // Permission is granted to anyone to use this software for any purpose,
13 // including commercial applications, and to alter it and redistribute it
14 // freely, subject to the following restrictions:
15 //
16 // 1. The origin of this software must not be misrepresented; you must not
17 //    claim that you wrote the original software. If you use this software
18 //    in a product, an acknowledgment in the product documentation would be
19 //    appreciated but is not required.
20 // 2. Altered source versions must be plainly marked as such, and must not be
21 //    misrepresented as being the original software.
22 // 3. This notice may not be removed or altered from any source distribution.
23 
24 #ifndef ASMJIT_X86_X86FORMATTER_P_H_INCLUDED
25 #define ASMJIT_X86_X86FORMATTER_P_H_INCLUDED
26 
27 #include "../core/api-config.h"
28 #ifndef ASMJIT_NO_LOGGING
29 
30 #include "../core/formatter.h"
31 #include "../core/string.h"
32 #include "../x86/x86globals.h"
33 
ASMJIT_BEGIN_SUB_NAMESPACE(x86)34 ASMJIT_BEGIN_SUB_NAMESPACE(x86)
35 
36 //! \cond INTERNAL
37 //! \addtogroup asmjit_x86
38 //! \{
39 
40 // ============================================================================
41 // [asmjit::x86::FormatterInternal]
42 // ============================================================================
43 
44 namespace FormatterInternal {
45 
46 Error formatFeature(
47   String& sb,
48   uint32_t featureId) noexcept;
49 
50 Error formatRegister(
51   String& sb,
52   uint32_t flags,
53   const BaseEmitter* emitter,
54   uint32_t arch,
55   uint32_t regType,
56   uint32_t regId) noexcept;
57 
58 Error formatOperand(
59   String& sb,
60   uint32_t flags,
61   const BaseEmitter* emitter,
62   uint32_t arch,
63   const Operand_& op) noexcept;
64 
65 Error formatInstruction(
66   String& sb,
67   uint32_t flags,
68   const BaseEmitter* emitter,
69   uint32_t arch,
70   const BaseInst& inst, const Operand_* operands, size_t opCount) noexcept;
71 
72 } // {FormatterInternal}
73 
74 //! \}
75 //! \endcond
76 
77 ASMJIT_END_SUB_NAMESPACE
78 
79 #endif // !ASMJIT_NO_LOGGING
80 #endif // ASMJIT_X86_X86FORMATTER_P_H_INCLUDED
81