File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,9 +91,9 @@ as_SRCS:=$(wildcard $(AS_DIR)/*.c) \
9191ld_SRCS: =$(wildcard $(LD_DIR ) /* .c) $(UTIL_DIR ) /archive.c \
9292 $(UTIL_DIR ) /util.c $(UTIL_DIR ) /elfutil.c $(UTIL_DIR ) /table.c
9393
94- src_as_CFLAGS: =-I$(AS_DIR ) -I $( AS_ARCH_DIR )
95- src_as_arch_$(ARCHTYPE)_CFLAGS: =-I$(AS_DIR ) -I $( AS_ARCH_DIR )
96- src_cc_CFLAGS: =-I$(CC1_FE_DIR ) -I$(CC1_BE_DIR ) # arch required for builtin.c
94+ src_as_CFLAGS: =-I$(AS_DIR )
95+ src_as_arch_$(ARCHTYPE)_CFLAGS: =-I$(AS_DIR )
96+ src_cc_CFLAGS: =-I$(CC1_FE_DIR ) -I$(CC1_BE_DIR )
9797src_cc_frontend_CFLAGS: =-I$(CC1_FE_DIR )
9898src_cc_backend_CFLAGS: =-I$(CC1_FE_DIR ) -I$(CC1_BE_DIR )
9999src_cc_arch_$(ARCHTYPE)_CFLAGS: =-I$(CC1_FE_DIR ) -I$(CC1_BE_DIR )
Original file line number Diff line number Diff line change 1212#include <alloca.h>
1313#endif
1414
15- #include "inst.h" // Inst, depends on target architecture.
1615#include "ir_asm.h"
1716#include "table.h"
1817#include "util.h"
1918
19+ // #include "inst.h" // To enable code interpolation on a text editor.
20+ #if XCC_TARGET_ARCH == XCC_ARCH_X64
21+ #include "./arch/x64/inst.h"
22+ #elif XCC_TARGET_ARCH == XCC_ARCH_AARCH64
23+ #include "./arch/aarch64/inst.h"
24+ #elif XCC_TARGET_ARCH == XCC_ARCH_RISCV64
25+ #include "./arch/riscv64/inst.h"
26+ #else
27+ #error "Unsupported architecture"
28+ #endif
29+
2030#if XCC_TARGET_PLATFORM == XCC_PLATFORM_APPLE
2131const char kSegText [] = "__TEXT" ;
2232const char kSecText [] = "__text" ;
You can’t perform that action at this time.
0 commit comments