aboutsummaryrefslogtreecommitdiff
path: root/src/host/buildvm.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/host/buildvm.c (renamed from src/buildvm.c)19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/buildvm.c b/src/host/buildvm.c
index 29cf7378..7dbf2cae 100644
--- a/src/buildvm.c
+++ b/src/host/buildvm.c
@@ -54,33 +54,24 @@ static int collect_reloc(BuildCtx *ctx, uint8_t *addr, int idx, int type);
54/* Avoid trouble if cross-compiling for an x86 target. Speed doesn't matter. */ 54/* Avoid trouble if cross-compiling for an x86 target. Speed doesn't matter. */
55#define DASM_ALIGNED_WRITES 1 55#define DASM_ALIGNED_WRITES 1
56 56
57/* Embed architecture-specific DynASM encoder and backend. */ 57/* Embed architecture-specific DynASM encoder. */
58#if LJ_TARGET_X86 58#if LJ_TARGET_X86ORX64
59#include "../dynasm/dasm_x86.h" 59#include "../dynasm/dasm_x86.h"
60#include "buildvm_x86.h"
61#elif LJ_TARGET_X64
62#include "../dynasm/dasm_x86.h"
63#if LJ_ABI_WIN
64#include "buildvm_x64win.h"
65#else
66#include "buildvm_x64.h"
67#endif
68#elif LJ_TARGET_ARM 60#elif LJ_TARGET_ARM
69#include "../dynasm/dasm_arm.h" 61#include "../dynasm/dasm_arm.h"
70#include "buildvm_arm.h"
71#elif LJ_TARGET_PPC 62#elif LJ_TARGET_PPC
72#include "../dynasm/dasm_ppc.h" 63#include "../dynasm/dasm_ppc.h"
73#include "buildvm_ppc.h"
74#elif LJ_TARGET_PPCSPE 64#elif LJ_TARGET_PPCSPE
75#include "../dynasm/dasm_ppc.h" 65#include "../dynasm/dasm_ppc.h"
76#include "buildvm_ppcspe.h"
77#elif LJ_TARGET_MIPS 66#elif LJ_TARGET_MIPS
78#include "../dynasm/dasm_mips.h" 67#include "../dynasm/dasm_mips.h"
79#include "buildvm_mips.h"
80#else 68#else
81#error "No support for this architecture (yet)" 69#error "No support for this architecture (yet)"
82#endif 70#endif
83 71
72/* Embed generated architecture-specific backend. */
73#include "buildvm_arch.h"
74
84/* ------------------------------------------------------------------------ */ 75/* ------------------------------------------------------------------------ */
85 76
86void owrite(BuildCtx *ctx, const void *ptr, size_t sz) 77void owrite(BuildCtx *ctx, const void *ptr, size_t sz)