Index: MultiSource/Applications/JM/ldecod/Makefile =================================================================== --- MultiSource/Applications/JM/ldecod/Makefile +++ MultiSource/Applications/JM/ldecod/Makefile @@ -5,6 +5,10 @@ RUN_OPTIONS = -i $(PROJ_SRC_DIR)/data/test.264 -o Output/test_dec.yuv -r $(PROJ_SRC_DIR)/data/test_rec.yuv +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif + include ../../../Makefile.multisrc clean:: Index: MultiSource/Applications/lua/Makefile =================================================================== --- MultiSource/Applications/lua/Makefile +++ MultiSource/Applications/lua/Makefile @@ -6,7 +6,10 @@ loslib.c ltablib.c lstrlib.c loadlib.c linit.c lua.c LDFLAGS += -lm -ifneq ($(ARCH),XCore) + +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +else CPPFLAGS += -DLUA_USE_POSIX endif Index: MultiSource/Applications/minisat/Makefile =================================================================== --- MultiSource/Applications/minisat/Makefile +++ MultiSource/Applications/minisat/Makefile @@ -9,6 +9,9 @@ else ifdef LARGE_PROBLEM_SIZE RUN_OPTIONS = -verbosity=0 $(PROJ_SRC_DIR)/long.cnf +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif else RUN_OPTIONS = -verbosity=0 $(PROJ_SRC_DIR)/short.cnf endif Index: MultiSource/Applications/spiff/Makefile =================================================================== --- MultiSource/Applications/spiff/Makefile +++ MultiSource/Applications/spiff/Makefile @@ -9,5 +9,11 @@ #RUN_OPTIONS = ./one ./two # you get the idea... +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x40000000,-Xmapper,--image-base,-Xmapper,0x40000000" +endif +endif + include ../../Makefile.multisrc Index: MultiSource/Benchmarks/ASCI_Purple/SMG2000/Makefile =================================================================== --- MultiSource/Benchmarks/ASCI_Purple/SMG2000/Makefile +++ MultiSource/Benchmarks/ASCI_Purple/SMG2000/Makefile @@ -12,6 +12,9 @@ RUN_OPTIONS ="-n 30 15 30 -c 0.1 1.0 10.0" else RUN_OPTIONS ="-n 100 40 100 -c 0.1 1.0 10.0" +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x10000000,-Xmapper,--image-base,-Xmapper,0x10000000" +endif endif include ../../../Makefile.multisrc Index: MultiSource/Benchmarks/Bullet/Makefile =================================================================== --- MultiSource/Benchmarks/Bullet/Makefile +++ MultiSource/Benchmarks/Bullet/Makefile @@ -3,8 +3,13 @@ CPPFLAGS += -I$(PROJ_SRC_DIR)/include -DNO_TIME LDFLAGS = -lstdc++ -lm +ifeq ($(ARCH),XCore) +# RUNTIMELIMIT is passed on the command line for xcore +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +else # This test can take more than the default 500s timeout on Thumb1 RUNTIMELIMIT:=1000 +endif include $(LEVEL)/Makefile.config Index: MultiSource/Benchmarks/Fhourstones-3.1/Makefile =================================================================== --- MultiSource/Benchmarks/Fhourstones-3.1/Makefile +++ MultiSource/Benchmarks/Fhourstones-3.1/Makefile @@ -11,4 +11,8 @@ STDIN_FILENAME = $(PROJ_SRC_DIR)/inputs endif +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif + include ../../Makefile.multisrc Index: MultiSource/Benchmarks/NPB-serial/is/Makefile =================================================================== --- MultiSource/Benchmarks/NPB-serial/is/Makefile +++ MultiSource/Benchmarks/NPB-serial/is/Makefile @@ -5,6 +5,10 @@ ifdef SMALL_PROBLEM_SIZE CPPFLAGS = -DSMALL_PROBLEM_SIZE +else +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x20000000,-Xmapper,--image-base,-Xmapper,0x20000000" +endif endif include $(LEVEL)/MultiSource/Makefile.multisrc Index: MultiSource/Benchmarks/Olden/health/Makefile =================================================================== --- MultiSource/Benchmarks/Olden/health/Makefile +++ MultiSource/Benchmarks/Olden/health/Makefile @@ -13,6 +13,9 @@ RUN_OPTIONS = 8 15 1 else RUN_OPTIONS = 9 20 1 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif endif endif Index: MultiSource/Benchmarks/Olden/perimeter/Makefile =================================================================== --- MultiSource/Benchmarks/Olden/perimeter/Makefile +++ MultiSource/Benchmarks/Olden/perimeter/Makefile @@ -10,6 +10,9 @@ RUN_OPTIONS = 9 else RUN_OPTIONS = 10 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif endif endif Index: MultiSource/Benchmarks/Olden/treeadd/Makefile =================================================================== --- MultiSource/Benchmarks/Olden/treeadd/Makefile +++ MultiSource/Benchmarks/Olden/treeadd/Makefile @@ -8,6 +8,9 @@ RUN_OPTIONS = 20 else RUN_OPTIONS = 22 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif endif include $(LEVEL)/MultiSource/Makefile.multisrc Index: MultiSource/Benchmarks/Olden/tsp/Makefile =================================================================== --- MultiSource/Benchmarks/Olden/tsp/Makefile +++ MultiSource/Benchmarks/Olden/tsp/Makefile @@ -10,6 +10,9 @@ RUN_OPTIONS = 102400 else RUN_OPTIONS = 1024000 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif endif endif Index: MultiSource/Benchmarks/Olden/voronoi/Makefile =================================================================== --- MultiSource/Benchmarks/Olden/voronoi/Makefile +++ MultiSource/Benchmarks/Olden/voronoi/Makefile @@ -12,6 +12,9 @@ RUN_OPTIONS = 10000 20 32 7 else RUN_OPTIONS = 100000 20 32 7 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif endif endif HASH_PROGRAM_OUTPUT = 1 Index: MultiSource/Benchmarks/SciMark2-C/Makefile =================================================================== --- MultiSource/Benchmarks/SciMark2-C/Makefile +++ MultiSource/Benchmarks/SciMark2-C/Makefile @@ -3,8 +3,14 @@ CPPFLAGS = LDFLAGS = -lm +ifneq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +# XCore target takes over 9hours to complete medium size problem. +RUNTIMELIMIT := 36000 +else ifdef LARGE_PROBLEM_SIZE RUN_OPTIONS = -large endif +endif include ../../Makefile.multisrc Index: MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile =================================================================== --- MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile +++ MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile @@ -8,6 +8,9 @@ RUN_OPTIONS = 1000 else RUN_OPTIONS = 12000 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x10000000,-Xmapper,--image-base,-Xmapper,0x10000000" +endif endif endif Index: MultiSource/Benchmarks/mafft/Makefile =================================================================== --- MultiSource/Benchmarks/mafft/Makefile +++ MultiSource/Benchmarks/mafft/Makefile @@ -12,6 +12,13 @@ LDFLAGS = -lm FP_TOLERANCE = 0.00001 HASH_PROGRAM_OUTPUT = 1 + +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif +endif + include $(LEVEL)/MultiSource/Makefile.multisrc clean:: Index: MultiSource/Benchmarks/nbench/Makefile =================================================================== --- MultiSource/Benchmarks/nbench/Makefile +++ MultiSource/Benchmarks/nbench/Makefile @@ -6,8 +6,12 @@ include ../../Makefile.multisrc +ifeq ($(ARCH),XCore) +# RUNTIMELIMIT is passed on the command line for xcore +else # This test can take more than the default 500s timeout at -O0. RUNTIMELIMIT:=750 +endif # Always copy NNET.DAT so it's available with SRCDIR != OBJDIR builds. # FIXME: Hack Index: SingleSource/Benchmarks/CoyoteBench/Makefile =================================================================== --- SingleSource/Benchmarks/CoyoteBench/Makefile +++ SingleSource/Benchmarks/CoyoteBench/Makefile @@ -1,5 +1,11 @@ LEVEL = ../../.. LDFLAGS += -lm -lstdc++ +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Misc-C++/Makefile =================================================================== --- SingleSource/Benchmarks/Misc-C++/Makefile +++ SingleSource/Benchmarks/Misc-C++/Makefile @@ -4,4 +4,10 @@ LIBS = -lstdc++ FP_ABSTOLERANCE := 0.01 +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/Makefile @@ -6,10 +6,16 @@ ifdef SMALL_PROBLEM_SIZE CFLAGS += -DSMALL_DATASET +else +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif endif ifeq ($(ARCH),Mips) RUNTIMELIMIT := 2000 +else ifeq ($(ARCH),XCore) +# RUNTIMELIMIT is passed in on the command line else RUNTIMELIMIT := 1000 endif Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/Makefile @@ -6,10 +6,16 @@ ifdef SMALL_PROBLEM_SIZE CFLAGS += -DSMALL_DATASET +else +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif endif ifeq ($(ARCH),Mips) RUNTIMELIMIT := 2000 +else ifeq ($(ARCH),XCore) +# RUNTIMELIMIT is passed in on the command line else RUNTIMELIMIT := 1000 endif Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/Makefile @@ -6,5 +6,9 @@ HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/Makefile @@ -6,5 +6,9 @@ HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/Makefile @@ -6,6 +6,10 @@ ifdef SMALL_PROBLEM_SIZE CFLAGS += -DSMALL_DATASET +else +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x4000000,-Xmapper,--image-base,-Xmapper,0x4000000" +endif endif HASH_PROGRAM_OUTPUT = 1 Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/Makefile @@ -6,5 +6,9 @@ HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/Makefile @@ -6,6 +6,10 @@ ifdef SMALL_PROBLEM_SIZE CFLAGS += -DSMALL_DATASET +else +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x10000000,-Xmapper,--image-base,-Xmapper,0x10000000" +endif endif HASH_PROGRAM_OUTPUT = 1 Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/Makefile @@ -6,5 +6,9 @@ HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/Makefile @@ -6,5 +6,9 @@ HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x8000000,-Xmapper,--image-base,-Xmapper,0x8000000" +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/Makefile =================================================================== --- SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/Makefile +++ SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/Makefile @@ -6,5 +6,9 @@ HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x10000000,-Xmapper,--image-base,-Xmapper,0x10000000" +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Shootout-C++/Makefile =================================================================== --- SingleSource/Benchmarks/Shootout-C++/Makefile +++ SingleSource/Benchmarks/Shootout-C++/Makefile @@ -5,5 +5,11 @@ DIRS=EH +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x10000000,-Xmapper,--image-base,-Xmapper,0x10000000" +endif +endif + LDFLAGS += -lstdc++ include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/Shootout/Makefile =================================================================== --- SingleSource/Benchmarks/Shootout/Makefile +++ SingleSource/Benchmarks/Shootout/Makefile @@ -1,4 +1,8 @@ LEVEL = ../../.. LDFLAGS += -lm +ifeq ($(ARCH),XCore) +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x10000000,-Xmapper,--image-base,-Xmapper,0x10000000" +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: SingleSource/Benchmarks/SmallPT/Makefile =================================================================== --- SingleSource/Benchmarks/SmallPT/Makefile +++ SingleSource/Benchmarks/SmallPT/Makefile @@ -2,8 +2,12 @@ LDFLAGS += -lm -lstdc++ FP_TOLERANCE := 0.001 +ifeq ($(ARCH),XCore) +# RUNTIMELIMIT is passed on the command line for xcore +else # This test can take more than the default 500s timeout at -O0. RUNTIMELIMIT:=1200 +endif include $(LEVEL)/Makefile.config Index: SingleSource/UnitTests/Makefile =================================================================== --- SingleSource/UnitTests/Makefile +++ SingleSource/UnitTests/Makefile @@ -43,6 +43,9 @@ PROGRAMS_TO_SKIP += AtomicOps # XCore does not support init_priority attribute PROGRAMS_TO_SKIP += initp1 +# 2007-04-25-weak contains a branch to zero. +# XCore BLR instruction can only branch 21bits, hence restrict memory to 20bits viz: 0x100000->0x1fffff +TEST_TARGET_FLAGS += "-Wl,-Xmapper,--image-size,-Xmapper,0x100000,-Xmapper,--image-base,-Xmapper,0x100000" endif LDFLAGS += -lstdc++