dummy add src/asm

dev
MITSUNARI Shigeo 9 years ago
parent 33b024500d
commit dd7fa85374
  1. 12
      Makefile
  2. 3
      common.mk
  3. 0
      src/asm/low_arm.s
  4. 0
      src/asm/low_x86-64.asm
  5. 0
      src/asm/low_x86.asm

@ -18,9 +18,12 @@ all: $(MCL_LIB)
LLVM_LLC=llc$(LLVM_VER)
LLVM_OPT=opt$(LLVM_VER)
GEN_EXE=src/gen
ASM_SRC=src/$(CPU).s
ifneq ($(CPU),)
ASM_SRC=src/$(CPU).s
endif
ASM_OBJ=$(OBJ_DIR)/$(CPU).o
LIB_OBJ=$(OBJ_DIR)/fp.o
FUNC_LIST=src/func.list
USE_LLVM?=0
ifeq ($(USE_LLVM),1)
CFLAGS+=-DMCL_USE_LLVM
@ -47,8 +50,11 @@ $(ASM_OBJ): $(ASM_SRC) $(OBJ_DIR)
$(ASM_SRC): $(LLVM_SRC)
$(LLVM_OPT) -O3 -o - $< | $(LLVM_LLC) -O3 -o $@ $(LLVM_FLAGS)
$(LLVM_SRC): $(GEN_EXE)
$(GEN_EXE) > $@
$(LLVM_SRC): $(GEN_EXE) $(FUNC_LIST)
$(GEN_EXE) -f $(FUNC_LIST) > $@
$(FUNC_LIST): $(LOW_ASM_SRC)
$(shell awk '/global/ { print $$2}' $(LOW_ASM_SRC) > $(FUNC_LIST) || touch $(FUNC_LIST))
$(GEN_EXE): src/gen.cpp src/llvm_gen.hpp
$(CXX) -o $@ $< $(CFLAGS) -O0

@ -8,15 +8,18 @@ ifeq ($(ARCH),x86_64)
CPU=x86-64
BIT=64
BIT_OPT=-m64
LOW_ASM_SRC=src/asm/low_x86-64.asm
endif
ifeq ($(ARCH),x86)
CPU=x86
BIT=32
BIT_OPT=-m32
LOW_ASM_SRC=src/asm/low_x86.asm
endif
ifeq ($(ARCH),armv71)
CPU=armv71
BIT=32
LOW_ASM_SRC=src/asm/low_arm.s
endif
ifneq ($(UNAME_S),Darwin)
LDFLAGS+=-lrt

Loading…
Cancel
Save