Browse code

* Fixes for gcc and clang (while they can compile the code, the DLLs made aren't functional, but oh well).

* [2SF] Used more up-to-date asmjit, despite the ugly looking code.

Naram Qashat authored on 2014/09/17 19:51:45
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,54 @@
1
+// [AsmJit]
2
+// Complete x86/x64 JIT and Remote Assembler for C++.
3
+//
4
+// [License]
5
+// Zlib - See LICENSE.md file in the package.
6
+
7
+#pragma once
8
+
9
+// [Dependencies - Core]
10
+#include "base.h"
11
+
12
+// ============================================================================
13
+// [asmjit::host - X86 / X64]
14
+// ============================================================================
15
+
16
+#if defined(ASMJIT_HOST_X86) || defined(ASMJIT_HOST_X64)
17
+#include "x86.h"
18
+
19
+namespace asmjit {
20
+
21
+// Define `asmjit::host` namespace wrapping `asmjit::x86`.
22
+namespace host { using namespace ::asmjit::x86; }
23
+
24
+// Define host assembler.
25
+typedef X86Assembler HostAssembler;
26
+
27
+// Define host operands.
28
+typedef X86GpReg GpReg;
29
+typedef X86FpReg FpReg;
30
+typedef X86MmReg MmReg;
31
+typedef X86XmmReg XmmReg;
32
+typedef X86YmmReg YmmReg;
33
+typedef X86SegReg SegReg;
34
+typedef X86Mem Mem;
35
+
36
+// Define host utilities.
37
+typedef X86CpuInfo HostCpuInfo;
38
+
39
+// Define host compiler and related.
40
+#ifndef ASMJIT_DISABLE_COMPILER
41
+typedef X86Compiler HostCompiler;
42
+typedef X86CallNode HostCallNode;
43
+typedef X86FuncDecl HostFuncDecl;
44
+typedef X86FuncNode HostFuncNode;
45
+
46
+typedef X86GpVar GpVar;
47
+typedef X86MmVar MmVar;
48
+typedef X86XmmVar XmmVar;
49
+typedef X86YmmVar YmmVar;
50
+#endif // !ASMJIT_DISABLE_COMPILER
51
+
52
+} // asmjit namespace
53
+
54
+#endif // ASMJIT_HOST_X86 || ASMJIT_HOST_X64