Commits

Even Wiik Thomassen committed 107c6bb

Meh

  • Participants
  • Parent commits 5c46b96

Comments (0)

Files changed (4)

File lambdachine/Makefile

+.SUFFIXES:  # delete default rules
+
+# Put local customisations into `mk/build.mk`.
+-include mk/build.mk
+
+# DIST must be an absolute directory
+ifeq ($(DIST),)
+DIST := $(shell pwd)/dist
+endif
+
+HC ?= ghc-7.0.4
+HC_PKG ?= ghc-pkg-7.0.4
+CC ?= gcc
+CXX ?= g++
+LIBS ?= -lrt 
+
+ifeq "$(strip $(PerformanceBuild))" "Yes"
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DNDEBUG
+endif
+
+ifeq "$(strip $(SelfCheck))" "Yes"
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DLC_SELF_CHECK_MODE
+endif
+
+ifeq "$(strip $(DisableJit))" "Yes"
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DLC_HAS_JIT=0
+endif
+
+ifneq ($(DebugLevel),)
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DLC_DEBUG_LEVEL=$(DebugLevel)
+endif
+
+ifeq "$(strip $(DisableAsm))" "Yes"
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DLC_HAS_ASM_BACKEND=0
+endif
+
+ifeq "$(shell uname)" "Darwin"
+EXTRA_LDFLAGS := $(EXTRA_LDFLAGS) -Wl,-no_pie
+endif
+
+HSBUILDDIR = $(DIST)/build
+LCC = $(HSBUILDDIR)/lcc/lcc
+CABAL ?= cabal
+
+DEPDIR = $(DIST)/.deps
+DEPDIRS = $(DEPDIR) $(DEPDIR)/rts
+
+.PHONY: all
+all: lcvm lcc unittest
+
+ifeq "$(strip $(AutoConfigure))" "yes"
+Makefile: Makefile.in
+	./configure $(AutoConfigureArgs)
+else
+Makefile: Makefile.in
+	@echo "Makefile.in has been modified; re-run ./configure (and ./boot if needed)"
+	@false
+endif
+
+.PHONY: boot
+boot:
+	mkdir -p $(HSBUILDDIR)
+	mkdir -p $(DEPDIR)/rts
+	mkdir -p $(DEPDIR)/rts/codegen
+	mkdir -p $(DEPDIR)/vm
+	mkdir -p $(DEPDIR)/vm/amd64
+	mkdir -p $(DEPDIR)/utils
+	test -f mk/build.mk || touch mk/build.mk
+
+INCLUDES = -Iincludes -Irts -Irts/codegen -Ivm
+CFLAGS = -g -Wall $(EXTRA_CFLAGS)
+CXXFLAGS = -g -Wall $(EXTRA_CXXFLAGS)
+
+df = $(DEPDIR)/$(*D)/$(*F)
+
+#SRCS := $(wildcard rts/*.c)
+SRCS = rts/Bytecode.c rts/Capability.c rts/ClosureFlags.c \
+       rts/FileUtils.c rts/HashTable.c rts/InterpThreaded.c \
+       rts/Loader.c rts/MiscClosures.c rts/PrintClosure.c \
+       rts/Thread.c rts/StorageManager.c \
+       rts/Main.c \
+       rts/Record.c rts/PrintIR.c rts/OptimiseIR.c \
+       rts/Snapshot.c rts/HeapInfo.c rts/Bitset.c \
+       rts/InterpIR.c rts/Stats.c \
+       rts/codegen/MCode.c rts/codegen/InterpAsm.c \
+       rts/codegen/AsmCodeGen.c \
+       rts/GC.c rts/ShadowHeap.c \
+	rts/Jit.c
+
+UTILSRCS = utils/genopcodes.cc
+
+echo:
+	@echo "SRCS = $(SRCS)"
+#SRCS = rts/Loader.c rts/HashTable.c
+
+#
+# === GoogleTest =======================================================
+#
+
+GTEST_VERSION=1.6.0
+UNZIP=unzip
+AT=@
+GTEST_DEFS=-DGTEST_HAS_PTHREAD=0
+GTEST_DIR=utils/gtest-$(GTEST_VERSION)
+GTEST_A=$(GTEST_DIR)/libgtest.a
+
+$(GTEST_DIR): $(GTEST_DIR).zip
+	cd `dirname $(GTEST_DIR)` && $(UNZIP) -o `basename $<`
+
+${GTEST_DIR}/src/gtest-all.cc: ${GTEST_DIR} 
+
+$(GTEST_DIR)/src/gtest-all.o: ${GTEST_DIR}/src/gtest-all.cc 
+	@echo "Compiling googletest framework"
+	$(CXX) -I${GTEST_DIR}/include -I${GTEST_DIR} $(GTEST_DEFS) -c $< -o $@
+
+$(GTEST_A): $(GTEST_DIR)/src/gtest-all.o
+	ar -rv $@ $<
+
+# ======================================================================
+
+interp: $(SRCS:.c=.o)
+	@echo "LINK $(EXTRA_LDFLAGS) $^ => $@"
+	@$(CC) $(EXTRA_LDFLAGS) -o $@ $^
+
+lcc: $(LCC)
+	ln -fs $(LCC) $@
+
+vm/unittest.o: $(GTEST_A)
+
+# Building a C file automatically generates dependencies as a side
+# effect.  This only works with `gcc'.
+#
+# The dependency file for `rts/Foo.c' lives at `.deps/rts/Foo.c'.
+#
+%.o: %.c mk/build.mk
+	@echo "CC $(CFLAGS) $< => $@"
+	@$(CC) -c $(INCLUDES) -MD -MF $(patsubst %.c,$(DEPDIR)/%.d,$<) $(CFLAGS) -o $@ $<
+	@cp $(df).d $(df).P; \
+	    sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+	        -e '/^$$/ d' -e 's/$$/ :/' < $(df).d >> $(df).P; \
+	rm -f $(df).d
+
+%.o: %.cc mk/build.mk
+	@echo "CXX $(CXXFLAGS) $< => $@"
+	@$(CXX) -c $(INCLUDES) -I$(GTEST_DIR)/include $(GTEST_DEFS) \
+	        -MD -MF $(patsubst %.cc,$(DEPDIR)/%.d,$<) \
+		$(CXXFLAGS) -o $@ $<
+	@cp $(df).d $(df).P; \
+	    sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+	        -e '/^$$/ d' -e 's/$$/ :/' < $(df).d >> $(df).P; \
+	rm -f $(df).d
+
+VM_SRCS = vm/thread.cc vm/capability.cc vm/memorymanager.cc \
+	  vm/loader.cc vm/fileutils.cc vm/bytecode.cc vm/objects.cc \
+	  vm/miscclosures.cc vm/options.cc vm/jit.cc vm/amd64/fragment.cc \
+	  vm/machinecode.cc vm/assembler.cc vm/ir.cc vm/ir_fold.cc \
+	  vm/time.cc
+
+VM_SRCS_ALL = $(VM_SRCS) vm/main.cc
+
+TEST_FILES := tests/Bc/Bc0016.lcbc tests/Bc/Bc0014.lcbc \
+	tests/Bc/Bc0017.lcbc \
+	tests/Bc/TailCallExact.lcbc tests/Bc/TailCallOverapply.lcbc \
+	tests/Bc/TailCallPap.lcbc tests/Bc/Paps.lcbc \
+	tests/Bc/Gc01.lcbc tests/Bc/Gc02.lcbc tests/Bc/Gc03.lcbc \
+	tests/Bench/Primes.lcbc tests/Bench/Append.lcbc \
+	tests/Bench/SumFromTo1.lcbc tests/Bench/SumFromTo2.lcbc \
+	tests/Bench/SumFromTo3.lcbc tests/Bench/SumFromTo4.lcbc \
+	tests/Bench/SumSquare1.lcbc tests/Bc/SumNoAlloc.lcbc \
+	tests/Bc/SumMemLoad.lcbc tests/Bc/Alloc1.lcbc \
+	tests/Bc/EvalThunk.lcbc tests/Bc/TraceCall.lcbc \
+	tests/Bc/QuotRem.lcbc tests/Bc/SumEvalThunk.lcbc \
+	tests/Bc/SumDict.lcbc tests/Bc/SumCall1.lcbc \
+	tests/Bc/Side0001.lcbc tests/Bc/Side0002.lcbc \
+	tests/Bc/Side0003.lcbc \
+	tests/Bc/RealWorld.lcbc tests/Bc/SharedFail.lcbc \
+	tests/Bc/MultiReturn.lcbc tests/Bc/MultiReturn2.lcbc \
+	tests/Bc/MultiReturn3.lcbc tests/Bc/MultiReturnJit.lcbc
+
+lcvm: $(VM_SRCS:.cc=.o) vm/main.o
+	@echo "LINK $(filter %.o %.a, $^) => $@"
+	@$(CXX) -o $@ $(filter %.o %.a, $^) $(LIBS)
+
+unittest: lcc $(TEST_FILES)
+
+unittest: vm/unittest.o $(GTEST_A) $(VM_SRCS:.cc=.o)
+	@echo "LINK $(filter %.o %.a, $^) => $@"
+	$(CXX) -o $@ $(filter %.o %.a, $^) $(LIBS)
+
+bcdump: vm/bcdump.o $(VM_SRCS:.cc=.o)
+	@echo "LINK $^ => $@"
+	@$(CXX) -o $@ $^ $(LIBS)
+
+.PHONY: test
+test: unittest
+	@./unittest 2> /dev/null # ignore debug output
+
+.PHONY: asmtest irtest
+asmtest: unittest
+	@./unittest --gtest_filter=AsmTest*
+
+irtest: unittest
+	@./unittest --gtest_filter=IRTest*
+
+.PHONY: fixstyle
+fixstyle:
+	astyle --style=java --lineend=linux -s2 --convert-tabs \
+		--preserve-date --indent-labels \
+	        --pad-header --align-pointer=name --pad-oper -n \
+		$(VM_SRCS)
+
+.PHONY: analyse analyze
+analyze: analyse
+analyse: $(VM_SRCS)
+	clang++ --analyze -I$(GTEST_DIR)/include -Ivm $^
+
+utils/genopcodes: utils/genopcodes.o
+	@echo "LINK $^ => $@"
+	@$(CXX) -o $@ $^
+
+utils/print_config: utils/print_config.o
+	@echo "LINK $^ => $@"
+	@$(CC) -o $@ $^
+
+utils/genirfoldmacros: utils/genirfoldmacros.o
+	@echo "LINK $^ => $@"
+	@$(CXX) -o $@ $^
+
+vm/irfoldmacros.hh: vm/ir.hh utils/genirfoldmacros
+	./utils/genirfoldmacros $@
+
+vm/ir_fold.o: vm/irfoldmacros.hh
+
+compiler/Opcodes.h: utils/genopcodes
+	./$< > $@
+
+HSDEPFILE = compiler/.depend
+
+HSFLAGS = -hide-all-packages \
+          -package ghc -package base -package filepath -package process -package directory -package containers \
+          -package ghc-paths -package cmdargs -package mtl -package blaze-builder -package vector \
+          -package utf8-string -package bytestring -package array -package ansi-wl-pprint -package binary \
+          -package uniplate -package hoopl -package value-supply \
+          -package graph-serialize -package temporary \
+          -icompiler \
+          -odir $(HSBUILDDIR) -hidir $(HSBUILDDIR)
+
+$(HSDEPFILE):
+	$(HC) -M $(HSFLAGS) compiler/Main.hs -dep-makefile $(HSDEPFILE)
+
+# include $(HSDEPFILE)
+
+%.hi: %.o
+	@:
+
+%.o: %.hs
+	$(HC) -c $< $(HSFLAGS)
+
+HSSRCS := $(shell find compiler -name '*.hs')
+
+# Fixme: We let the compiler depend on the source files not the .o
+# files.  This actually doesn't always work.  Fortunately,
+#
+#    make clean && make boot && make
+#
+# is pretty quick.
+
+# .PHONY:
+
+$(DIST)/setup-config: lambdachine.cabal
+	$(CABAL) configure --with-compiler=$(HC) --with-hc-pkg=$(HC_PKG)
+
+$(LCC): $(HSSRCS) compiler/Opcodes.h $(DIST)/setup-config
+	@mkdir -p $(HSBUILDDIR)
+	$(CABAL) build
+
+.PHONY: clean-interp
+clean-interp:
+	rm -f $(SRCS:%.c=%.o) utils/*.o interp
+
+.PHONY: clean cleanvm
+clean:
+	rm -f $(SRCS:%.c=%.o) utils/*.o interp compiler/.depend \
+		compiler/lcc lcc $(DIST)/setup-config vm/*.o \
+		unittest lcvm bcdump \
+		utils/genirfoldmacros vm/irfoldmacros.hh
+	rm -rf $(HSBUILDDIR)
+	find . -name '*.gcov' -or -name '*.gcno' -or -name '*.gcda' | xargs rm -f
+	$(MAKE) -C tests clean
+
+cleanvm:
+	rm -f $(VM_SRCS:%.cc=%.o) unittest
+
+.PHONY: distclean
+distclean: clean
+	rm -rf autom4te.cache
+	rm -f config.status configure config.log vm/autoconfig.h Makefile
+
+.PHONY: install-deps
+install-deps:
+	$(CABAL) install --only-dependencies --with-compiler=$(HC) \
+	  --with-hc-pkg=$(HC_PKG)
+# find compiler -name "*.hi" -delete
+
+# Rules for building built-in packages
+
+LCCFLAGS = --dump-bytecode --dump-core-binds
+
+tests/ghc-prim/%.lcbc: tests/ghc-prim/%.hs
+	cd tests/ghc-prim && \
+	$(LCC) $(LCCFLAGS) --package-name=ghc-prim $(patsubst tests/ghc-prim/%, %, $<)
+
+tests/integer-gmp/%.lcbc: tests/integer-gmp/%.hs
+	cd tests/integer-gmp && \
+	$(LCC) $(LCCFLAGS) --package-name=integer-gmp $(patsubst tests/integer-gmp/%, %, $<)
+
+tests/base/%.lcbc: tests/base/%.hs
+	cd tests/base && \
+	$(LCC) $(LCCFLAGS) --package-name=base $(patsubst tests/base/%, %, $<)
+#	@echo "@ = $@, < = $<"
+
+tests/%.lcbc: tests/%.hs
+	@echo "LCC $< => $@"
+	@cd tests && \
+	 $(LCC) $(LCCFLAGS) $(patsubst tests/%, %, $<)
+
+PRIM_MODULES_ghc-prim = GHC/Bool GHC/Types GHC/Ordering GHC/Tuple
+PRIM_MODULES_integer-gmp = GHC/Integer/Type GHC/Integer
+PRIM_MODULES_base = GHC/Base GHC/Classes GHC/Num GHC/List \
+	Control/Exception/Base
+
+PRIM_MODULES = \
+	$(patsubst %,tests/ghc-prim/%.lcbc,$(PRIM_MODULES_ghc-prim)) \
+	$(patsubst %,tests/integer-gmp/%.lcbc,$(PRIM_MODULES_integer-gmp)) \
+	$(patsubst %,tests/base/%.lcbc,$(PRIM_MODULES_base))
+
+unittest: $(PRIM_MODULES)
+
+.PHONY: check
+TESTS ?= .
+check: $(PRIM_MODULES)
+	@ $(MAKE) -C tests check TESTS=$(TESTS) LITARGS=$(LITARGS)
+
+.PHONY: bench
+bench: $(PRIM_MODULES)
+	$(MAKE) -C tests check TESTS=Bench LITARGS=$(LITARGS)
+
+pr:
+	@echo $(PRIM_MODULES)
+
+clean-bytecode:
+	rm -f $(PRIM_MODULES)
+	$(MAKE) -C tests clean
+
+.PHONY: gtest
+gtest: $(GTEST_A)
+
+bench-ghc/%: tests/Bench/%.hs
+	@mkdir -p bench-ghc
+	$(HC) -O2 -fforce-recomp -DBENCH_GHC $(BENCH_HC_OPTS) -rtsopts -o $@ $<
+
+# -include $(SRCS:%.c=$(DEPDIR)/%.P)
+-include $(UTILSRCS:%.cc=$(DEPDIR)/%.P)
+-include $(DEPDIR)/vm/unittest.P
+-include $(VM_SRCS_ALL:%.cc=$(DEPDIR)/%.P)

File lambdachine/Makefile.in

+.SUFFIXES:  # delete default rules
+
+# Put local customisations into `mk/build.mk`.
+-include mk/build.mk
+
+# DIST must be an absolute directory
+ifeq ($(DIST),)
+DIST := $(shell pwd)/dist
+endif
+
+HC ?= @HC@
+HC_PKG ?= @HC_PKG@
+CC ?= @CC@
+CXX ?= @CXX@
+LIBS ?= @LIBS@
+
+ifeq "$(strip $(PerformanceBuild))" "Yes"
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DNDEBUG
+endif
+
+ifeq "$(strip $(SelfCheck))" "Yes"
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DLC_SELF_CHECK_MODE
+endif
+
+ifeq "$(strip $(DisableJit))" "Yes"
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DLC_HAS_JIT=0
+endif
+
+ifneq ($(DebugLevel),)
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DLC_DEBUG_LEVEL=$(DebugLevel)
+endif
+
+ifeq "$(strip $(DisableAsm))" "Yes"
+EXTRA_CFLAGS := $(EXTRA_CFLAGS) -DLC_HAS_ASM_BACKEND=0
+endif
+
+ifeq "$(shell uname)" "Darwin"
+EXTRA_LDFLAGS := $(EXTRA_LDFLAGS) -Wl,-no_pie
+endif
+
+HSBUILDDIR = $(DIST)/build
+LCC = $(HSBUILDDIR)/lcc/lcc
+CABAL ?= cabal
+
+DEPDIR = $(DIST)/.deps
+DEPDIRS = $(DEPDIR) $(DEPDIR)/rts
+
+.PHONY: all
+all: lcvm lcc unittest
+
+ifeq "$(strip $(AutoConfigure))" "yes"
+Makefile: Makefile.in
+	./configure $(AutoConfigureArgs)
+else
+Makefile: Makefile.in
+	@echo "Makefile.in has been modified; re-run ./configure (and ./boot if needed)"
+	@false
+endif
+
+.PHONY: boot
+boot:
+	mkdir -p $(HSBUILDDIR)
+	mkdir -p $(DEPDIR)/rts
+	mkdir -p $(DEPDIR)/rts/codegen
+	mkdir -p $(DEPDIR)/vm
+	mkdir -p $(DEPDIR)/vm/amd64
+	mkdir -p $(DEPDIR)/utils
+	test -f mk/build.mk || touch mk/build.mk
+
+INCLUDES = -Iincludes -Irts -Irts/codegen -Ivm
+CFLAGS = -g -Wall $(EXTRA_CFLAGS)
+CXXFLAGS = -g -Wall $(EXTRA_CXXFLAGS)
+
+df = $(DEPDIR)/$(*D)/$(*F)
+
+#SRCS := $(wildcard rts/*.c)
+SRCS = rts/Bytecode.c rts/Capability.c rts/ClosureFlags.c \
+       rts/FileUtils.c rts/HashTable.c rts/InterpThreaded.c \
+       rts/Loader.c rts/MiscClosures.c rts/PrintClosure.c \
+       rts/Thread.c rts/StorageManager.c \
+       rts/Main.c \
+       rts/Record.c rts/PrintIR.c rts/OptimiseIR.c \
+       rts/Snapshot.c rts/HeapInfo.c rts/Bitset.c \
+       rts/InterpIR.c rts/Stats.c \
+       rts/codegen/MCode.c rts/codegen/InterpAsm.c \
+       rts/codegen/AsmCodeGen.c \
+       rts/GC.c rts/ShadowHeap.c \
+	rts/Jit.c
+
+UTILSRCS = utils/genopcodes.cc
+
+echo:
+	@echo "SRCS = $(SRCS)"
+#SRCS = rts/Loader.c rts/HashTable.c
+
+#
+# === GoogleTest =======================================================
+#
+
+GTEST_VERSION=1.6.0
+UNZIP=unzip
+AT=@
+GTEST_DEFS=-DGTEST_HAS_PTHREAD=0
+GTEST_DIR=utils/gtest-$(GTEST_VERSION)
+GTEST_A=$(GTEST_DIR)/libgtest.a
+
+$(GTEST_DIR): $(GTEST_DIR).zip
+	cd `dirname $(GTEST_DIR)` && $(UNZIP) -o `basename $<`
+
+${GTEST_DIR}/src/gtest-all.cc: ${GTEST_DIR} 
+
+$(GTEST_DIR)/src/gtest-all.o: ${GTEST_DIR}/src/gtest-all.cc 
+	@echo "Compiling googletest framework"
+	$(CXX) -I${GTEST_DIR}/include -I${GTEST_DIR} $(GTEST_DEFS) -c $< -o $@
+
+$(GTEST_A): $(GTEST_DIR)/src/gtest-all.o
+	ar -rv $@ $<
+
+# ======================================================================
+
+interp: $(SRCS:.c=.o)
+	@echo "LINK $(EXTRA_LDFLAGS) $^ => $@"
+	@$(CC) $(EXTRA_LDFLAGS) -o $@ $^
+
+lcc: $(LCC)
+	ln -fs $(LCC) $@
+
+vm/unittest.o: $(GTEST_A)
+
+# Building a C file automatically generates dependencies as a side
+# effect.  This only works with `gcc'.
+#
+# The dependency file for `rts/Foo.c' lives at `.deps/rts/Foo.c'.
+#
+%.o: %.c mk/build.mk
+	@echo "CC $(CFLAGS) $< => $@"
+	@$(CC) -c $(INCLUDES) -MD -MF $(patsubst %.c,$(DEPDIR)/%.d,$<) $(CFLAGS) -o $@ $<
+	@cp $(df).d $(df).P; \
+	    sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+	        -e '/^$$/ d' -e 's/$$/ :/' < $(df).d >> $(df).P; \
+	rm -f $(df).d
+
+%.o: %.cc mk/build.mk
+	@echo "CXX $(CXXFLAGS) $< => $@"
+	@$(CXX) -c $(INCLUDES) -I$(GTEST_DIR)/include $(GTEST_DEFS) \
+	        -MD -MF $(patsubst %.cc,$(DEPDIR)/%.d,$<) \
+		$(CXXFLAGS) -o $@ $<
+	@cp $(df).d $(df).P; \
+	    sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+	        -e '/^$$/ d' -e 's/$$/ :/' < $(df).d >> $(df).P; \
+	rm -f $(df).d
+
+VM_SRCS = vm/thread.cc vm/capability.cc vm/memorymanager.cc \
+	  vm/loader.cc vm/fileutils.cc vm/bytecode.cc vm/objects.cc \
+	  vm/miscclosures.cc vm/options.cc vm/jit.cc vm/amd64/fragment.cc \
+	  vm/machinecode.cc vm/assembler.cc vm/ir.cc vm/ir_fold.cc \
+	  vm/time.cc
+
+VM_SRCS_ALL = $(VM_SRCS) vm/main.cc
+
+TEST_FILES := tests/Bc/Bc0016.lcbc tests/Bc/Bc0014.lcbc \
+	tests/Bc/Bc0017.lcbc \
+	tests/Bc/TailCallExact.lcbc tests/Bc/TailCallOverapply.lcbc \
+	tests/Bc/TailCallPap.lcbc tests/Bc/Paps.lcbc \
+	tests/Bc/Gc01.lcbc tests/Bc/Gc02.lcbc tests/Bc/Gc03.lcbc \
+	tests/Bench/Primes.lcbc tests/Bench/Append.lcbc \
+	tests/Bench/SumFromTo1.lcbc tests/Bench/SumFromTo2.lcbc \
+	tests/Bench/SumFromTo3.lcbc tests/Bench/SumFromTo4.lcbc \
+	tests/Bench/SumSquare1.lcbc tests/Bc/SumNoAlloc.lcbc \
+	tests/Bc/SumMemLoad.lcbc tests/Bc/Alloc1.lcbc \
+	tests/Bc/EvalThunk.lcbc tests/Bc/TraceCall.lcbc \
+	tests/Bc/QuotRem.lcbc tests/Bc/SumEvalThunk.lcbc \
+	tests/Bc/SumDict.lcbc tests/Bc/SumCall1.lcbc \
+	tests/Bc/Side0001.lcbc tests/Bc/Side0002.lcbc \
+	tests/Bc/Side0003.lcbc \
+	tests/Bc/RealWorld.lcbc tests/Bc/SharedFail.lcbc \
+	tests/Bc/MultiReturn.lcbc tests/Bc/MultiReturn2.lcbc \
+	tests/Bc/MultiReturn3.lcbc tests/Bc/MultiReturnJit.lcbc
+
+lcvm: $(VM_SRCS:.cc=.o) vm/main.o
+	@echo "LINK $(filter %.o %.a, $^) => $@"
+	@$(CXX) -o $@ $(filter %.o %.a, $^) $(LIBS)
+
+unittest: lcc $(TEST_FILES)
+
+unittest: vm/unittest.o $(GTEST_A) $(VM_SRCS:.cc=.o)
+	@echo "LINK $(filter %.o %.a, $^) => $@"
+	$(CXX) -o $@ $(filter %.o %.a, $^) $(LIBS)
+
+bcdump: vm/bcdump.o $(VM_SRCS:.cc=.o)
+	@echo "LINK $^ => $@"
+	@$(CXX) -o $@ $^ $(LIBS)
+
+.PHONY: test
+test: unittest
+	@./unittest 2> /dev/null # ignore debug output
+
+.PHONY: asmtest irtest
+asmtest: unittest
+	@./unittest --gtest_filter=AsmTest*
+
+irtest: unittest
+	@./unittest --gtest_filter=IRTest*
+
+.PHONY: fixstyle
+fixstyle:
+	astyle --style=java --lineend=linux -s2 --convert-tabs \
+		--preserve-date --indent-labels \
+	        --pad-header --align-pointer=name --pad-oper -n \
+		$(VM_SRCS)
+
+.PHONY: analyse analyze
+analyze: analyse
+analyse: $(VM_SRCS)
+	clang++ --analyze -I$(GTEST_DIR)/include -Ivm $^
+
+utils/genopcodes: utils/genopcodes.o
+	@echo "LINK $^ => $@"
+	@$(CXX) -o $@ $^
+
+utils/print_config: utils/print_config.o
+	@echo "LINK $^ => $@"
+	@$(CC) -o $@ $^
+
+utils/genirfoldmacros: utils/genirfoldmacros.o
+	@echo "LINK $^ => $@"
+	@$(CXX) -o $@ $^
+
+vm/irfoldmacros.hh: vm/ir.hh utils/genirfoldmacros
+	./utils/genirfoldmacros $@
+
+vm/ir_fold.o: vm/irfoldmacros.hh
+
+compiler/Opcodes.h: utils/genopcodes
+	./$< > $@
+
+HSDEPFILE = compiler/.depend
+
+HSFLAGS = -hide-all-packages \
+          -package ghc -package base -package filepath -package process -package directory -package containers \
+          -package ghc-paths -package cmdargs -package mtl -package blaze-builder -package vector \
+          -package utf8-string -package bytestring -package array -package ansi-wl-pprint -package binary \
+          -package uniplate -package hoopl -package value-supply \
+          -package graph-serialize -package temporary \
+          -icompiler \
+          -odir $(HSBUILDDIR) -hidir $(HSBUILDDIR)
+
+$(HSDEPFILE):
+	$(HC) -M $(HSFLAGS) compiler/Main.hs -dep-makefile $(HSDEPFILE)
+
+# include $(HSDEPFILE)
+
+%.hi: %.o
+	@:
+
+%.o: %.hs
+	$(HC) -c $< $(HSFLAGS)
+
+HSSRCS := $(shell find compiler -name '*.hs')
+
+# Fixme: We let the compiler depend on the source files not the .o
+# files.  This actually doesn't always work.  Fortunately,
+#
+#    make clean && make boot && make
+#
+# is pretty quick.
+
+# .PHONY:
+
+$(DIST)/setup-config: lambdachine.cabal
+	$(CABAL) configure --with-compiler=$(HC) --with-hc-pkg=$(HC_PKG)
+
+$(LCC): $(HSSRCS) compiler/Opcodes.h $(DIST)/setup-config
+	@mkdir -p $(HSBUILDDIR)
+	$(CABAL) build
+
+.PHONY: clean-interp
+clean-interp:
+	rm -f $(SRCS:%.c=%.o) utils/*.o interp
+
+.PHONY: clean cleanvm
+clean:
+	rm -f $(SRCS:%.c=%.o) utils/*.o interp compiler/.depend \
+		compiler/lcc lcc $(DIST)/setup-config vm/*.o \
+		unittest lcvm bcdump \
+		utils/genirfoldmacros vm/irfoldmacros.hh
+	rm -rf $(HSBUILDDIR)
+	find . -name '*.gcov' -or -name '*.gcno' -or -name '*.gcda' | xargs rm -f
+	$(MAKE) -C tests clean
+
+cleanvm:
+	rm -f $(VM_SRCS:%.cc=%.o) unittest
+
+.PHONY: distclean
+distclean: clean
+	rm -rf autom4te.cache
+	rm -f config.status configure config.log vm/autoconfig.h Makefile
+
+.PHONY: install-deps
+install-deps:
+	$(CABAL) install --only-dependencies --with-compiler=$(HC) \
+	  --with-hc-pkg=$(HC_PKG)
+# find compiler -name "*.hi" -delete
+
+# Rules for building built-in packages
+
+LCCFLAGS = --dump-bytecode --dump-core-binds
+
+tests/ghc-prim/%.lcbc: tests/ghc-prim/%.hs
+	cd tests/ghc-prim && \
+	$(LCC) $(LCCFLAGS) --package-name=ghc-prim $(patsubst tests/ghc-prim/%, %, $<)
+
+tests/integer-gmp/%.lcbc: tests/integer-gmp/%.hs
+	cd tests/integer-gmp && \
+	$(LCC) $(LCCFLAGS) --package-name=integer-gmp $(patsubst tests/integer-gmp/%, %, $<)
+
+tests/base/%.lcbc: tests/base/%.hs
+	cd tests/base && \
+	$(LCC) $(LCCFLAGS) --package-name=base $(patsubst tests/base/%, %, $<)
+#	@echo "@ = $@, < = $<"
+
+tests/%.lcbc: tests/%.hs
+	@echo "LCC $< => $@"
+	@cd tests && \
+	 $(LCC) $(LCCFLAGS) $(patsubst tests/%, %, $<)
+
+PRIM_MODULES_ghc-prim = GHC/Bool GHC/Types GHC/Ordering GHC/Tuple
+PRIM_MODULES_integer-gmp = GHC/Integer/Type GHC/Integer
+PRIM_MODULES_base = GHC/Base GHC/Classes GHC/Num GHC/List \
+	Control/Exception/Base
+
+PRIM_MODULES = \
+	$(patsubst %,tests/ghc-prim/%.lcbc,$(PRIM_MODULES_ghc-prim)) \
+	$(patsubst %,tests/integer-gmp/%.lcbc,$(PRIM_MODULES_integer-gmp)) \
+	$(patsubst %,tests/base/%.lcbc,$(PRIM_MODULES_base))
+
+unittest: $(PRIM_MODULES)
+
+.PHONY: check
+TESTS ?= .
+check: $(PRIM_MODULES)
+	@ $(MAKE) -C tests check TESTS=$(TESTS) LITARGS=$(LITARGS)
+
+.PHONY: bench
+bench: $(PRIM_MODULES)
+	$(MAKE) -C tests check TESTS=Bench LITARGS=$(LITARGS)
+
+pr:
+	@echo $(PRIM_MODULES)
+
+clean-bytecode:
+	rm -f $(PRIM_MODULES)
+	$(MAKE) -C tests clean
+
+.PHONY: gtest
+gtest: $(GTEST_A)
+
+bench-ghc/%: tests/Bench/%.hs
+	@mkdir -p bench-ghc
+	$(HC) -O2 -fforce-recomp -DBENCH_GHC $(BENCH_HC_OPTS) -rtsopts -o $@ $<
+
+# -include $(SRCS:%.c=$(DEPDIR)/%.P)
+-include $(UTILSRCS:%.cc=$(DEPDIR)/%.P)
+-include $(DEPDIR)/vm/unittest.P
+-include $(VM_SRCS_ALL:%.cc=$(DEPDIR)/%.P)

File lambdachine/output.txt

+LCC tests/Bc/Bc0016.hs => tests/Bc/Bc0016.lcbc
+LCC tests/Bc/Bc0014.hs => tests/Bc/Bc0014.lcbc
+LCC tests/Bc/Bc0017.hs => tests/Bc/Bc0017.lcbc
+LCC tests/Bc/TailCallExact.hs => tests/Bc/TailCallExact.lcbc
+LCC tests/Bc/TailCallOverapply.hs => tests/Bc/TailCallOverapply.lcbc
+LCC tests/Bc/TailCallPap.hs => tests/Bc/TailCallPap.lcbc
+LCC tests/Bc/Paps.hs => tests/Bc/Paps.lcbc
+LCC tests/Bc/Gc01.hs => tests/Bc/Gc01.lcbc
+LCC tests/Bc/Gc02.hs => tests/Bc/Gc02.lcbc
+LCC tests/Bc/Gc03.hs => tests/Bc/Gc03.lcbc
+LCC tests/Bench/Primes.hs => tests/Bench/Primes.lcbc
+LCC tests/Bench/Append.hs => tests/Bench/Append.lcbc
+LCC tests/Bench/SumFromTo1.hs => tests/Bench/SumFromTo1.lcbc
+LCC tests/Bench/SumFromTo2.hs => tests/Bench/SumFromTo2.lcbc
+LCC tests/Bench/SumFromTo3.hs => tests/Bench/SumFromTo3.lcbc
+LCC tests/Bench/SumFromTo4.hs => tests/Bench/SumFromTo4.lcbc
+LCC tests/Bench/SumSquare1.hs => tests/Bench/SumSquare1.lcbc
+LCC tests/Bc/SumNoAlloc.hs => tests/Bc/SumNoAlloc.lcbc
+LCC tests/Bc/SumMemLoad.hs => tests/Bc/SumMemLoad.lcbc
+LCC tests/Bc/Alloc1.hs => tests/Bc/Alloc1.lcbc
+LCC tests/Bc/EvalThunk.hs => tests/Bc/EvalThunk.lcbc
+LCC tests/Bc/TraceCall.hs => tests/Bc/TraceCall.lcbc
+LCC tests/Bc/QuotRem.hs => tests/Bc/QuotRem.lcbc
+LCC tests/Bc/SumEvalThunk.hs => tests/Bc/SumEvalThunk.lcbc
+LCC tests/Bc/SumDict.hs => tests/Bc/SumDict.lcbc
+LCC tests/Bc/SumCall1.hs => tests/Bc/SumCall1.lcbc
+LCC tests/Bc/Side0001.hs => tests/Bc/Side0001.lcbc
+LCC tests/Bc/Side0002.hs => tests/Bc/Side0002.lcbc
+LCC tests/Bc/Side0003.hs => tests/Bc/Side0003.lcbc
+LCC tests/Bc/RealWorld.hs => tests/Bc/RealWorld.lcbc
+LCC tests/Bc/SharedFail.hs => tests/Bc/SharedFail.lcbc
+LCC tests/Bc/MultiReturn.hs => tests/Bc/MultiReturn.lcbc
+LCC tests/Bc/MultiReturn2.hs => tests/Bc/MultiReturn2.lcbc
+LCC tests/Bc/MultiReturn3.hs => tests/Bc/MultiReturn3.lcbc
+LCC tests/Bc/MultiReturnJit.hs => tests/Bc/MultiReturnJit.lcbc
+cd tests/ghc-prim && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=ghc-prim  GHC/Bool.hs
+cd tests/ghc-prim && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=ghc-prim  GHC/Types.hs
+cd tests/ghc-prim && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=ghc-prim  GHC/Ordering.hs
+cd tests/ghc-prim && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=ghc-prim  GHC/Tuple.hs
+cd tests/integer-gmp && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=integer-gmp  GHC/Integer/Type.hs
+cd tests/integer-gmp && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=integer-gmp  GHC/Integer.hs
+cd tests/base && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  GHC/Base.hs
+cd tests/base && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  GHC/Classes.hs
+cd tests/base && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  GHC/Num.hs
+cd tests/base && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  GHC/List.hs
+cd tests/base && \
+	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  Control/Exception/Base.hs
+LINK vm/unittest.o utils/gtest-1.6.0/libgtest.a vm/thread.o vm/capability.o vm/memorymanager.o vm/loader.o vm/fileutils.o vm/bytecode.o vm/objects.o vm/miscclosures.o vm/options.o vm/jit.o vm/amd64/fragment.o vm/machinecode.o vm/assembler.o vm/ir.o vm/ir_fold.o vm/time.o => unittest
+g++ -o unittest vm/unittest.o utils/gtest-1.6.0/libgtest.a vm/thread.o vm/capability.o vm/memorymanager.o vm/loader.o vm/fileutils.o vm/bytecode.o vm/objects.o vm/miscclosures.o vm/options.o vm/jit.o vm/amd64/fragment.o vm/machinecode.o vm/assembler.o vm/ir.o vm/ir_fold.o vm/time.o -lrt 
+[==========] Running 118 tests from 20 test cases.
+[----------] Global test environment set-up.
+[----------] 1 test from ThreadTest
+[ RUN      ] ThreadTest.StartStop
+[       OK ] ThreadTest.StartStop (0 ms)
+[----------] 1 test from ThreadTest (0 ms total)
+
+[----------] 3 tests from MMTest
+[ RUN      ] MMTest.AllocRegion
+[       OK ] MMTest.AllocRegion (0 ms)
+[ RUN      ] MMTest.AllocBasic
+[       OK ] MMTest.AllocBasic (0 ms)
+[ RUN      ] MMTest.AllocBasic2
+[       OK ] MMTest.AllocBasic2 (0 ms)
+[----------] 3 tests from MMTest (0 ms total)
+
+[----------] 6 tests from LoaderTest
+[ RUN      ] LoaderTest.Simple
+[       OK ] LoaderTest.Simple (0 ms)
+[ RUN      ] LoaderTest.DefaultBasePath
+[       OK ] LoaderTest.DefaultBasePath (1 ms)
+[ RUN      ] LoaderTest.Load1
+vm/unittest.cc:67: Failure
+Value of: l.loadModule("GHC.Bool")
+  Actual: false
+Expected: true
+[  FAILED  ] LoaderTest.Load1 (0 ms)
+[ RUN      ] LoaderTest.LoadIdempotent
+vm/unittest.cc:77: Failure
+Value of: l.loadModule(modname)
+  Actual: false
+Expected: true
+[  FAILED  ] LoaderTest.LoadIdempotent (0 ms)
+[ RUN      ] LoaderTest.DebugPrint
+vm/unittest.cc:95: Failure
+Value of: l.loadModule("GHC.Base")
+  Actual: false
+Expected: true
+[  FAILED  ] LoaderTest.DebugPrint (0 ms)
+[ RUN      ] LoaderTest.BuiltinClosures
+vm/unittest.cc:110: Failure
+Value of: l.loadModule("GHC.Base")
+  Actual: false
+Expected: true
+[  FAILED  ] LoaderTest.BuiltinClosures (0 ms)
+[----------] 6 tests from LoaderTest (1 ms total)
+
+[----------] 5 tests from RegSetTest
+[ RUN      ] RegSetTest.fromReg
+[       OK ] RegSetTest.fromReg (0 ms)
+[ RUN      ] RegSetTest.range
+[       OK ] RegSetTest.range (0 ms)
+[ RUN      ] RegSetTest.setClear
+[       OK ] RegSetTest.setClear (0 ms)
+[ RUN      ] RegSetTest.excludeInclude
+[       OK ] RegSetTest.excludeInclude (0 ms)
+[ RUN      ] RegSetTest.pickBotTop
+[       OK ] RegSetTest.pickBotTop (0 ms)
+[----------] 5 tests from RegSetTest (0 ms total)
+
+[----------] 1 test from SpillSetTest
+[ RUN      ] SpillSetTest.test
+[       OK ] SpillSetTest.test (0 ms)
+[----------] 1 test from SpillSetTest (0 ms total)
+
+[----------] 1 test from Flags
+[ RUN      ] Flags.setVal
+[       OK ] Flags.setVal (0 ms)
+[----------] 1 test from Flags (0 ms total)
+
+[----------] 1 test from AllocMachineCode
+[ RUN      ] AllocMachineCode.Simple
+[       OK ] AllocMachineCode.Simple (1 ms)
+[----------] 1 test from AllocMachineCode (1 ms total)
+
+[----------] 1 test from Timer
+[ RUN      ] Timer.PreciseResolution
+[       OK ] Timer.PreciseResolution (3 ms)
+[----------] 1 test from Timer (3 ms total)
+
+[----------] 12 tests from AsmTest
+[ RUN      ] AsmTest.Move
+[       OK ] AsmTest.Move (0 ms)
+[ RUN      ] AsmTest.MoveHiReg
+[       OK ] AsmTest.MoveHiReg (0 ms)
+[ RUN      ] AsmTest.LoadImmU32Pos
+[       OK ] AsmTest.LoadImmU32Pos (0 ms)
+[ RUN      ] AsmTest.LoadImmU32Neg
+[       OK ] AsmTest.LoadImmU32Neg (0 ms)
+[ RUN      ] AsmTest.LoadImmI32Pos
+[       OK ] AsmTest.LoadImmI32Pos (0 ms)
+[ RUN      ] AsmTest.LoadImmI32Neg
+[       OK ] AsmTest.LoadImmI32Neg (0 ms)
+[ RUN      ] AsmTest.LoadImmU64
+[       OK ] AsmTest.LoadImmU64 (0 ms)
+[ RUN      ] AsmTest.LoadImmU64_I32Range
+[       OK ] AsmTest.LoadImmU64_I32Range (0 ms)
+[ RUN      ] AsmTest.LoadMemU64
+[       OK ] AsmTest.LoadMemU64 (0 ms)
+[ RUN      ] AsmTest.StoreMemU64
+[       OK ] AsmTest.StoreMemU64 (0 ms)
+[ RUN      ] AsmTest.StoreMemImmPos
+[       OK ] AsmTest.StoreMemImmPos (1 ms)
+[ RUN      ] AsmTest.StoreMemImmNeg
+[       OK ] AsmTest.StoreMemImmNeg (0 ms)
+[----------] 12 tests from AsmTest (1 ms total)
+
+[----------] 11 tests from IRTest
+[ RUN      ] IRTest.Simple
+[       OK ] IRTest.Simple (0 ms)
+[ RUN      ] IRTest.Slots
+[       OK ] IRTest.Slots (0 ms)
+[ RUN      ] IRTest.Slots2
+[       OK ] IRTest.Slots2 (0 ms)
+[ RUN      ] IRTest.Literals1
+[       OK ] IRTest.Literals1 (0 ms)
+[ RUN      ] IRTest.Literals2
+[       OK ] IRTest.Literals2 (0 ms)
+[ RUN      ] IRTest.Literals3
+[       OK ] IRTest.Literals3 (0 ms)
+[ RUN      ] IRTest.Literals4
+[       OK ] IRTest.Literals4 (0 ms)
+[ RUN      ] IRTest.Literals5
+[       OK ] IRTest.Literals5 (0 ms)
+[ RUN      ] IRTest.Literals6
+[       OK ] IRTest.Literals6 (1 ms)
+[ RUN      ] IRTest.BaseLiterals
+[       OK ] IRTest.BaseLiterals (0 ms)
+[ RUN      ] IRTest.Snapshot1
+[       OK ] IRTest.Snapshot1 (0 ms)
+[----------] 11 tests from IRTest (1 ms total)
+
+[----------] 3 tests from IRTestFold
+[ RUN      ] IRTestFold.FoldAdd
+[       OK ] IRTestFold.FoldAdd (0 ms)
+[ RUN      ] IRTestFold.FoldComm
+[       OK ] IRTestFold.FoldComm (0 ms)
+[ RUN      ] IRTestFold.FoldSub
+[       OK ] IRTestFold.FoldSub (0 ms)
+[----------] 3 tests from IRTestFold (0 ms total)
+
+[----------] 15 tests from ArithTest
+[ RUN      ] ArithTest.Add
+[       OK ] ArithTest.Add (1 ms)
+[ RUN      ] ArithTest.Sub
+[       OK ] ArithTest.Sub (0 ms)
+[ RUN      ] ArithTest.Mul
+[       OK ] ArithTest.Mul (1 ms)
+[ RUN      ] ArithTest.Div
+[       OK ] ArithTest.Div (1 ms)
+[ RUN      ] ArithTest.Rem
+[       OK ] ArithTest.Rem (1 ms)
+[ RUN      ] ArithTest.Mov
+[       OK ] ArithTest.Mov (0 ms)
+[ RUN      ] ArithTest.Neg
+[       OK ] ArithTest.Neg (0 ms)
+[ RUN      ] ArithTest.Not
+[       OK ] ArithTest.Not (0 ms)
+[ RUN      ] ArithTest.BranchLt
+[       OK ] ArithTest.BranchLt (2 ms)
+[ RUN      ] ArithTest.BranchGe
+[       OK ] ArithTest.BranchGe (1 ms)
+[ RUN      ] ArithTest.BranchEq
+[       OK ] ArithTest.BranchEq (1 ms)
+[ RUN      ] ArithTest.BranchNotEq
+[       OK ] ArithTest.BranchNotEq (1 ms)
+[ RUN      ] ArithTest.Alloc1
+[       OK ] ArithTest.Alloc1 (0 ms)
+[ RUN      ] ArithTest.AllocN_3
+[       OK ] ArithTest.AllocN_3 (0 ms)
+[ RUN      ] ArithTest.AllocN_5
+[       OK ] ArithTest.AllocN_5 (1 ms)
+[----------] 15 tests from ArithTest (10 ms total)
+
+[----------] 28 tests from RunFileTest
+[ RUN      ] RunFileTest.eval
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.eval (0 ms)
+[ RUN      ] RunFileTest.Bc0014
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Bc0014 (0 ms)
+[ RUN      ] RunFileTest.Bc0017
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Bc0017 (0 ms)
+[ RUN      ] RunFileTest.TailCallExact
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.TailCallExact (0 ms)
+[ RUN      ] RunFileTest.TailCallOverapply
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.TailCallOverapply (0 ms)
+[ RUN      ] RunFileTest.TailCallPap
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.TailCallPap (0 ms)
+[ RUN      ] RunFileTest.Paps
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Paps (1 ms)
+[ RUN      ] RunFileTest.Gc01
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Gc01 (0 ms)
+[ RUN      ] RunFileTest.Gc02
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Gc02 (0 ms)
+[ RUN      ] RunFileTest.Gc03
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Gc03 (0 ms)
+[ RUN      ] RunFileTest.SumNoAlloc
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.SumNoAlloc (1 ms)
+[ RUN      ] RunFileTest.SumMemLoad
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.SumMemLoad (0 ms)
+[ RUN      ] RunFileTest.Alloc1
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Alloc1 (0 ms)
+[ RUN      ] RunFileTest.EvalThunk
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.EvalThunk (0 ms)
+[ RUN      ] RunFileTest.TraceCall
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.TraceCall (1 ms)
+[ RUN      ] RunFileTest.SumCall1
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.SumCall1 (0 ms)
+[ RUN      ] RunFileTest.QuotRem
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.QuotRem (0 ms)
+[ RUN      ] RunFileTest.SumEvalThunk
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.SumEvalThunk (1 ms)
+[ RUN      ] RunFileTest.SumDict
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.SumDict (0 ms)
+[ RUN      ] RunFileTest.Side0001
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Side0001 (0 ms)
+[ RUN      ] RunFileTest.Side0002
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Side0002 (0 ms)
+[ RUN      ] RunFileTest.Side0003
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.Side0003 (1 ms)
+[ RUN      ] RunFileTest.RealWorld
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.RealWorld (0 ms)
+[ RUN      ] RunFileTest.SharedFail
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.SharedFail (0 ms)
+[ RUN      ] RunFileTest.MultiReturn
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.MultiReturn (1 ms)
+[ RUN      ] RunFileTest.MultiReturn2
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.MultiReturn2 (0 ms)
+[ RUN      ] RunFileTest.MultiReturn3
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.MultiReturn3 (0 ms)
+[ RUN      ] RunFileTest.MultiReturnJit
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] RunFileTest.MultiReturnJit (0 ms)
+[----------] 28 tests from RunFileTest (7 ms total)
+
+[----------] 7 tests from BenchTest
+[ RUN      ] BenchTest.Primes
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] BenchTest.Primes (1 ms)
+[ RUN      ] BenchTest.Append
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] BenchTest.Append (0 ms)
+[ RUN      ] BenchTest.SumFromTo1
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] BenchTest.SumFromTo1 (0 ms)
+[ RUN      ] BenchTest.SumFromTo2
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] BenchTest.SumFromTo2 (0 ms)
+[ RUN      ] BenchTest.SumFromTo3
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] BenchTest.SumFromTo3 (1 ms)
+[ RUN      ] BenchTest.SumFromTo4
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] BenchTest.SumFromTo4 (0 ms)
+[ RUN      ] BenchTest.SumSquare1
+vm/unittest.cc:926: Failure
+Value of: loader->loadWiredInModules()
+  Actual: false
+Expected: true
+vm/unittest.cc:927: Failure
+Value of: loader->loadModule(moduleName)
+  Actual: false
+Expected: true
+vm/unittest.cc:933: Failure
+Value of: entry != NULL
+  Actual: false
+Expected: true
+[  FAILED  ] BenchTest.SumSquare1 (0 ms)
+[----------] 7 tests from BenchTest (2 ms total)
+
+[----------] 1 test from HotCounters
+[ RUN      ] HotCounters.Simple
+[       OK ] HotCounters.Simple (0 ms)
+[----------] 1 test from HotCounters (0 ms total)
+
+[----------] 6 tests from RegAlloc
+[ RUN      ] RegAlloc.Simple1
+[       OK ] RegAlloc.Simple1 (1 ms)
+[ RUN      ] RegAlloc.Simple2
+[       OK ] RegAlloc.Simple2 (8 ms)
+[ RUN      ] RegAlloc.Simple3
+[       OK ] RegAlloc.Simple3 (12 ms)
+[ RUN      ] RegAlloc.Simple4
+[       OK ] RegAlloc.Simple4 (4 ms)
+[ RUN      ] RegAlloc.ManyRegs
+[       OK ] RegAlloc.ManyRegs (10 ms)
+[ RUN      ] RegAlloc.SnapTwice
+[       OK ] RegAlloc.SnapTwice (8 ms)
+[----------] 6 tests from RegAlloc (43 ms total)
+
+[----------] 3 tests from ParallelAssignTest
+[ RUN      ] ParallelAssignTest.testRegTest
+[       OK ] ParallelAssignTest.testRegTest (0 ms)
+[ RUN      ] ParallelAssignTest.testRegTest2
+[       OK ] ParallelAssignTest.testRegTest2 (0 ms)
+[ RUN      ] ParallelAssignTest.SwapRegs1
+[       OK ] ParallelAssignTest.SwapRegs1 (1 ms)
+[----------] 3 tests from ParallelAssignTest (1 ms total)
+
+[----------] 10 tests from TestFragment
+[ RUN      ] TestFragment.Test1
+[       OK ] TestFragment.Test1 (14 ms)
+[ RUN      ] TestFragment.Test2
+[       OK ] TestFragment.Test2 (3 ms)
+[ RUN      ] TestFragment.RestoreSnapSpill
+[       OK ] TestFragment.RestoreSnapSpill (14 ms)
+[ RUN      ] TestFragment.ItblGuard
+[       OK ] TestFragment.ItblGuard (2 ms)
+[ RUN      ] TestFragment.LoadField
+[       OK ] TestFragment.LoadField (8 ms)
+[ RUN      ] TestFragment.DivMod
+[       OK ] TestFragment.DivMod (8 ms)
+[ RUN      ] TestFragment.Mul
+[       OK ] TestFragment.Mul (12 ms)
+[ RUN      ] TestFragment.Alloc1
+[       OK ] TestFragment.Alloc1 (3 ms)
+[ RUN      ] TestFragment.Alloc2
+[       OK ] TestFragment.Alloc2 (3 ms)
+[ RUN      ] TestFragment.Alloc3
+[       OK ] TestFragment.Alloc3 (1 ms)
+[----------] 10 tests from TestFragment (69 ms total)
+
+[----------] 1 test from CallStackTest
+[ RUN      ] CallStackTest.Simple1
+[       OK ] CallStackTest.Simple1 (0 ms)
+[----------] 1 test from CallStackTest (0 ms total)
+
+[----------] 2 tests from BranchTargetBufferTest
+[ RUN      ] BranchTargetBufferTest.Loops1
+[       OK ] BranchTargetBufferTest.Loops1 (0 ms)
+[ RUN      ] BranchTargetBufferTest.Loops2
+[       OK ] BranchTargetBufferTest.Loops2 (0 ms)
+[----------] 2 tests from BranchTargetBufferTest (0 ms total)
+
+[----------] Global test environment tear-down
+[==========] 118 tests from 20 test cases ran. (139 ms total)
+[  PASSED  ] 79 tests.
+[  FAILED  ] 39 tests, listed below:
+[  FAILED  ] LoaderTest.Load1
+[  FAILED  ] LoaderTest.LoadIdempotent
+[  FAILED  ] LoaderTest.DebugPrint
+[  FAILED  ] LoaderTest.BuiltinClosures
+[  FAILED  ] RunFileTest.eval
+[  FAILED  ] RunFileTest.Bc0014
+[  FAILED  ] RunFileTest.Bc0017
+[  FAILED  ] RunFileTest.TailCallExact
+[  FAILED  ] RunFileTest.TailCallOverapply
+[  FAILED  ] RunFileTest.TailCallPap
+[  FAILED  ] RunFileTest.Paps
+[  FAILED  ] RunFileTest.Gc01
+[  FAILED  ] RunFileTest.Gc02
+[  FAILED  ] RunFileTest.Gc03
+[  FAILED  ] RunFileTest.SumNoAlloc
+[  FAILED  ] RunFileTest.SumMemLoad
+[  FAILED  ] RunFileTest.Alloc1
+[  FAILED  ] RunFileTest.EvalThunk
+[  FAILED  ] RunFileTest.TraceCall
+[  FAILED  ] RunFileTest.SumCall1
+[  FAILED  ] RunFileTest.QuotRem
+[  FAILED  ] RunFileTest.SumEvalThunk
+[  FAILED  ] RunFileTest.SumDict
+[  FAILED  ] RunFileTest.Side0001
+[  FAILED  ] RunFileTest.Side0002
+[  FAILED  ] RunFileTest.Side0003
+[  FAILED  ] RunFileTest.RealWorld
+[  FAILED  ] RunFileTest.SharedFail
+[  FAILED  ] RunFileTest.MultiReturn
+[  FAILED  ] RunFileTest.MultiReturn2
+[  FAILED  ] RunFileTest.MultiReturn3
+[  FAILED  ] RunFileTest.MultiReturnJit
+[  FAILED  ] BenchTest.Primes
+[  FAILED  ] BenchTest.Append
+[  FAILED  ] BenchTest.SumFromTo1
+[  FAILED  ] BenchTest.SumFromTo2
+[  FAILED  ] BenchTest.SumFromTo3
+[  FAILED  ] BenchTest.SumFromTo4
+[  FAILED  ] BenchTest.SumSquare1
+
+39 FAILED TESTS

File output.txt

-LCC tests/Bc/Bc0016.hs => tests/Bc/Bc0016.lcbc
-LCC tests/Bc/Bc0014.hs => tests/Bc/Bc0014.lcbc
-LCC tests/Bc/Bc0017.hs => tests/Bc/Bc0017.lcbc
-LCC tests/Bc/TailCallExact.hs => tests/Bc/TailCallExact.lcbc
-LCC tests/Bc/TailCallOverapply.hs => tests/Bc/TailCallOverapply.lcbc
-LCC tests/Bc/TailCallPap.hs => tests/Bc/TailCallPap.lcbc
-LCC tests/Bc/Paps.hs => tests/Bc/Paps.lcbc
-LCC tests/Bc/Gc01.hs => tests/Bc/Gc01.lcbc
-LCC tests/Bc/Gc02.hs => tests/Bc/Gc02.lcbc
-LCC tests/Bc/Gc03.hs => tests/Bc/Gc03.lcbc
-LCC tests/Bench/Primes.hs => tests/Bench/Primes.lcbc
-LCC tests/Bench/Append.hs => tests/Bench/Append.lcbc
-LCC tests/Bench/SumFromTo1.hs => tests/Bench/SumFromTo1.lcbc
-LCC tests/Bench/SumFromTo2.hs => tests/Bench/SumFromTo2.lcbc
-LCC tests/Bench/SumFromTo3.hs => tests/Bench/SumFromTo3.lcbc
-LCC tests/Bench/SumFromTo4.hs => tests/Bench/SumFromTo4.lcbc
-LCC tests/Bench/SumSquare1.hs => tests/Bench/SumSquare1.lcbc
-LCC tests/Bc/SumNoAlloc.hs => tests/Bc/SumNoAlloc.lcbc
-LCC tests/Bc/SumMemLoad.hs => tests/Bc/SumMemLoad.lcbc
-LCC tests/Bc/Alloc1.hs => tests/Bc/Alloc1.lcbc
-LCC tests/Bc/EvalThunk.hs => tests/Bc/EvalThunk.lcbc
-LCC tests/Bc/TraceCall.hs => tests/Bc/TraceCall.lcbc
-LCC tests/Bc/QuotRem.hs => tests/Bc/QuotRem.lcbc
-LCC tests/Bc/SumEvalThunk.hs => tests/Bc/SumEvalThunk.lcbc
-LCC tests/Bc/SumDict.hs => tests/Bc/SumDict.lcbc
-LCC tests/Bc/SumCall1.hs => tests/Bc/SumCall1.lcbc
-LCC tests/Bc/Side0001.hs => tests/Bc/Side0001.lcbc
-LCC tests/Bc/Side0002.hs => tests/Bc/Side0002.lcbc
-LCC tests/Bc/Side0003.hs => tests/Bc/Side0003.lcbc
-LCC tests/Bc/RealWorld.hs => tests/Bc/RealWorld.lcbc
-LCC tests/Bc/SharedFail.hs => tests/Bc/SharedFail.lcbc
-LCC tests/Bc/MultiReturn.hs => tests/Bc/MultiReturn.lcbc
-LCC tests/Bc/MultiReturn2.hs => tests/Bc/MultiReturn2.lcbc
-LCC tests/Bc/MultiReturn3.hs => tests/Bc/MultiReturn3.lcbc
-LCC tests/Bc/MultiReturnJit.hs => tests/Bc/MultiReturnJit.lcbc
-cd tests/ghc-prim && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=ghc-prim  GHC/Bool.hs
-cd tests/ghc-prim && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=ghc-prim  GHC/Types.hs
-cd tests/ghc-prim && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=ghc-prim  GHC/Ordering.hs
-cd tests/ghc-prim && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=ghc-prim  GHC/Tuple.hs
-cd tests/integer-gmp && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=integer-gmp  GHC/Integer/Type.hs
-cd tests/integer-gmp && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=integer-gmp  GHC/Integer.hs
-cd tests/base && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  GHC/Base.hs
-cd tests/base && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  GHC/Classes.hs
-cd tests/base && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  GHC/Num.hs
-cd tests/base && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  GHC/List.hs
-cd tests/base && \
-	/home/ubuntu/lambdachine/dist/build/lcc/lcc --dump-bytecode --dump-core-binds --package-name=base  Control/Exception/Base.hs
-LINK vm/unittest.o utils/gtest-1.6.0/libgtest.a vm/thread.o vm/capability.o vm/memorymanager.o vm/loader.o vm/fileutils.o vm/bytecode.o vm/objects.o vm/miscclosures.o vm/options.o vm/jit.o vm/amd64/fragment.o vm/machinecode.o vm/assembler.o vm/ir.o vm/ir_fold.o vm/time.o => unittest
-g++ -o unittest vm/unittest.o utils/gtest-1.6.0/libgtest.a vm/thread.o vm/capability.o vm/memorymanager.o vm/loader.o vm/fileutils.o vm/bytecode.o vm/objects.o vm/miscclosures.o vm/options.o vm/jit.o vm/amd64/fragment.o vm/machinecode.o vm/assembler.o vm/ir.o vm/ir_fold.o vm/time.o -lrt 
-[==========] Running 118 tests from 20 test cases.
-[----------] Global test environment set-up.
-[----------] 1 test from ThreadTest
-[ RUN      ] ThreadTest.StartStop
-[       OK ] ThreadTest.StartStop (0 ms)
-[----------] 1 test from ThreadTest (0 ms total)
-
-[----------] 3 tests from MMTest
-[ RUN      ] MMTest.AllocRegion
-[       OK ] MMTest.AllocRegion (0 ms)
-[ RUN      ] MMTest.AllocBasic
-[       OK ] MMTest.AllocBasic (0 ms)
-[ RUN      ] MMTest.AllocBasic2
-[       OK ] MMTest.AllocBasic2 (0 ms)
-[----------] 3 tests from MMTest (0 ms total)
-
-[----------] 6 tests from LoaderTest
-[ RUN      ] LoaderTest.Simple
-[       OK ] LoaderTest.Simple (0 ms)
-[ RUN      ] LoaderTest.DefaultBasePath
-[       OK ] LoaderTest.DefaultBasePath (1 ms)
-[ RUN      ] LoaderTest.Load1
-vm/unittest.cc:67: Failure
-Value of: l.loadModule("GHC.Bool")
-  Actual: false
-Expected: true
-[  FAILED  ] LoaderTest.Load1 (0 ms)
-[ RUN      ] LoaderTest.LoadIdempotent
-vm/unittest.cc:77: Failure
-Value of: l.loadModule(modname)
-  Actual: false
-Expected: true
-[  FAILED  ] LoaderTest.LoadIdempotent (0 ms)
-[ RUN      ] LoaderTest.DebugPrint
-vm/unittest.cc:95: Failure
-Value of: l.loadModule("GHC.Base")
-  Actual: false
-Expected: true
-[  FAILED  ] LoaderTest.DebugPrint (0 ms)
-[ RUN      ] LoaderTest.BuiltinClosures
-vm/unittest.cc:110: Failure
-Value of: l.loadModule("GHC.Base")
-  Actual: false
-Expected: true
-[  FAILED  ] LoaderTest.BuiltinClosures (0 ms)
-[----------] 6 tests from LoaderTest (1 ms total)
-
-[----------] 5 tests from RegSetTest
-[ RUN      ] RegSetTest.fromReg
-[       OK ] RegSetTest.fromReg (0 ms)
-[ RUN      ] RegSetTest.range
-[       OK ] RegSetTest.range (0 ms)
-[ RUN      ] RegSetTest.setClear
-[       OK ] RegSetTest.setClear (0 ms)
-[ RUN      ] RegSetTest.excludeInclude
-[       OK ] RegSetTest.excludeInclude (0 ms)
-[ RUN      ] RegSetTest.pickBotTop
-[       OK ] RegSetTest.pickBotTop (0 ms)
-[----------] 5 tests from RegSetTest (0 ms total)
-
-[----------] 1 test from SpillSetTest
-[ RUN      ] SpillSetTest.test
-[       OK ] SpillSetTest.test (0 ms)
-[----------] 1 test from SpillSetTest (0 ms total)
-
-[----------] 1 test from Flags
-[ RUN      ] Flags.setVal
-[       OK ] Flags.setVal (0 ms)
-[----------] 1 test from Flags (0 ms total)
-
-[----------] 1 test from AllocMachineCode
-[ RUN      ] AllocMachineCode.Simple
-[       OK ] AllocMachineCode.Simple (1 ms)
-[----------] 1 test from AllocMachineCode (1 ms total)
-
-[----------] 1 test from Timer
-[ RUN      ] Timer.PreciseResolution
-[       OK ] Timer.PreciseResolution (3 ms)
-[----------] 1 test from Timer (3 ms total)
-
-[----------] 12 tests from AsmTest
-[ RUN      ] AsmTest.Move
-[       OK ] AsmTest.Move (0 ms)
-[ RUN      ] AsmTest.MoveHiReg
-[       OK ] AsmTest.MoveHiReg (0 ms)
-[ RUN      ] AsmTest.LoadImmU32Pos
-[       OK ] AsmTest.LoadImmU32Pos (0 ms)
-[ RUN      ] AsmTest.LoadImmU32Neg
-[       OK ] AsmTest.LoadImmU32Neg (0 ms)
-[ RUN      ] AsmTest.LoadImmI32Pos
-[       OK ] AsmTest.LoadImmI32Pos (0 ms)
-[ RUN      ] AsmTest.LoadImmI32Neg
-[       OK ] AsmTest.LoadImmI32Neg (0 ms)
-[ RUN      ] AsmTest.LoadImmU64
-[       OK ] AsmTest.LoadImmU64 (0 ms)
-[ RUN      ] AsmTest.LoadImmU64_I32Range
-[       OK ] AsmTest.LoadImmU64_I32Range (0 ms)
-[ RUN      ] AsmTest.LoadMemU64
-[       OK ] AsmTest.LoadMemU64 (0 ms)
-[ RUN      ] AsmTest.StoreMemU64
-[       OK ] AsmTest.StoreMemU64 (0 ms)
-[ RUN      ] AsmTest.StoreMemImmPos
-[       OK ] AsmTest.StoreMemImmPos (1 ms)
-[ RUN      ] AsmTest.StoreMemImmNeg
-[       OK ] AsmTest.StoreMemImmNeg (0 ms)
-[----------] 12 tests from AsmTest (1 ms total)
-
-[----------] 11 tests from IRTest
-[ RUN      ] IRTest.Simple
-[       OK ] IRTest.Simple (0 ms)
-[ RUN      ] IRTest.Slots
-[       OK ] IRTest.Slots (0 ms)
-[ RUN      ] IRTest.Slots2
-[       OK ] IRTest.Slots2 (0 ms)
-[ RUN      ] IRTest.Literals1
-[       OK ] IRTest.Literals1 (0 ms)
-[ RUN      ] IRTest.Literals2
-[       OK ] IRTest.Literals2 (0 ms)
-[ RUN      ] IRTest.Literals3
-[       OK ] IRTest.Literals3 (0 ms)
-[ RUN      ] IRTest.Literals4
-[       OK ] IRTest.Literals4 (0 ms)
-[ RUN      ] IRTest.Literals5
-[       OK ] IRTest.Literals5 (0 ms)
-[ RUN      ] IRTest.Literals6
-[       OK ] IRTest.Literals6 (1 ms)
-[ RUN      ] IRTest.BaseLiterals
-[       OK ] IRTest.BaseLiterals (0 ms)
-[ RUN      ] IRTest.Snapshot1
-[       OK ] IRTest.Snapshot1 (0 ms)
-[----------] 11 tests from IRTest (1 ms total)
-
-[----------] 3 tests from IRTestFold
-[ RUN      ] IRTestFold.FoldAdd
-[       OK ] IRTestFold.FoldAdd (0 ms)
-[ RUN      ] IRTestFold.FoldComm
-[       OK ] IRTestFold.FoldComm (0 ms)
-[ RUN      ] IRTestFold.FoldSub
-[       OK ] IRTestFold.FoldSub (0 ms)
-[----------] 3 tests from IRTestFold (0 ms total)
-
-[----------] 15 tests from ArithTest
-[ RUN      ] ArithTest.Add
-[       OK ] ArithTest.Add (1 ms)
-[ RUN      ] ArithTest.Sub
-[       OK ] ArithTest.Sub (0 ms)
-[ RUN      ] ArithTest.Mul
-[       OK ] ArithTest.Mul (1 ms)
-[ RUN      ] ArithTest.Div
-[       OK ] ArithTest.Div (1 ms)
-[ RUN      ] ArithTest.Rem
-[       OK ] ArithTest.Rem (1 ms)
-[ RUN      ] ArithTest.Mov
-[       OK ] ArithTest.Mov (0 ms)
-[ RUN      ] ArithTest.Neg
-[       OK ] ArithTest.Neg (0 ms)
-[ RUN      ] ArithTest.Not
-[       OK ] ArithTest.Not (0 ms)
-[ RUN      ] ArithTest.BranchLt
-[       OK ] ArithTest.BranchLt (2 ms)
-[ RUN      ] ArithTest.BranchGe
-[       OK ] ArithTest.BranchGe (1 ms)
-[ RUN      ] ArithTest.BranchEq
-[       OK ] ArithTest.BranchEq (1 ms)
-[ RUN      ] ArithTest.BranchNotEq
-[       OK ] ArithTest.BranchNotEq (1 ms)
-[ RUN      ] ArithTest.Alloc1
-[       OK ] ArithTest.Alloc1 (0 ms)
-[ RUN      ] ArithTest.AllocN_3
-[       OK ] ArithTest.AllocN_3 (0 ms)
-[ RUN      ] ArithTest.AllocN_5
-[       OK ] ArithTest.AllocN_5 (1 ms)
-[----------] 15 tests from ArithTest (10 ms total)
-
-[----------] 28 tests from RunFileTest
-[ RUN      ] RunFileTest.eval
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.eval (0 ms)
-[ RUN      ] RunFileTest.Bc0014
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Bc0014 (0 ms)
-[ RUN      ] RunFileTest.Bc0017
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Bc0017 (0 ms)
-[ RUN      ] RunFileTest.TailCallExact
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.TailCallExact (0 ms)
-[ RUN      ] RunFileTest.TailCallOverapply
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.TailCallOverapply (0 ms)
-[ RUN      ] RunFileTest.TailCallPap
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.TailCallPap (0 ms)
-[ RUN      ] RunFileTest.Paps
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Paps (1 ms)
-[ RUN      ] RunFileTest.Gc01
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Gc01 (0 ms)
-[ RUN      ] RunFileTest.Gc02
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Gc02 (0 ms)
-[ RUN      ] RunFileTest.Gc03
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Gc03 (0 ms)
-[ RUN      ] RunFileTest.SumNoAlloc
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.SumNoAlloc (1 ms)
-[ RUN      ] RunFileTest.SumMemLoad
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.SumMemLoad (0 ms)
-[ RUN      ] RunFileTest.Alloc1
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Alloc1 (0 ms)
-[ RUN      ] RunFileTest.EvalThunk
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.EvalThunk (0 ms)
-[ RUN      ] RunFileTest.TraceCall
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.TraceCall (1 ms)
-[ RUN      ] RunFileTest.SumCall1
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.SumCall1 (0 ms)
-[ RUN      ] RunFileTest.QuotRem
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.QuotRem (0 ms)
-[ RUN      ] RunFileTest.SumEvalThunk
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.SumEvalThunk (1 ms)
-[ RUN      ] RunFileTest.SumDict
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.SumDict (0 ms)
-[ RUN      ] RunFileTest.Side0001
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Side0001 (0 ms)
-[ RUN      ] RunFileTest.Side0002
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Side0002 (0 ms)
-[ RUN      ] RunFileTest.Side0003
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.Side0003 (1 ms)
-[ RUN      ] RunFileTest.RealWorld
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.RealWorld (0 ms)
-[ RUN      ] RunFileTest.SharedFail
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.SharedFail (0 ms)
-[ RUN      ] RunFileTest.MultiReturn
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.MultiReturn (1 ms)
-[ RUN      ] RunFileTest.MultiReturn2
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.MultiReturn2 (0 ms)
-[ RUN      ] RunFileTest.MultiReturn3
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true
-[  FAILED  ] RunFileTest.MultiReturn3 (0 ms)
-[ RUN      ] RunFileTest.MultiReturnJit
-vm/unittest.cc:926: Failure
-Value of: loader->loadWiredInModules()
-  Actual: false
-Expected: true
-vm/unittest.cc:927: Failure
-Value of: loader->loadModule(moduleName)
-  Actual: false
-Expected: true
-vm/unittest.cc:933: Failure
-Value of: entry != NULL
-  Actual: false
-Expected: true