target-xtensa: allow using core configuration in tests

Add path to the core configuration directory to test build command and
replace .include asm directive with #include to enable preprocessing.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
Max Filippov 2014-02-10 20:20:52 +04:00
parent d0fa1f0df3
commit a2e67072b7
30 changed files with 37 additions and 32 deletions

View File

@ -1,10 +1,11 @@
-include ../../../config-host.mak
CROSS=xtensa-dc232b-elf-
CORE=dc232b
CROSS=xtensa-$(CORE)-elf-
ifndef XT
SIM = ../../../xtensa-softmmu/qemu-system-xtensa
SIMFLAGS = -M sim -cpu dc232b -nographic -semihosting $(EXTFLAGS) -kernel
SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting $(EXTFLAGS) -kernel
SIMDEBUG = -s -S
else
SIM = xt-run
@ -17,6 +18,8 @@ AS = $(CROSS)gcc -x assembler-with-cpp
LD = $(CROSS)ld
XTENSA_SRC_PATH = $(SRC_PATH)/tests/tcg/xtensa
INCLUDE_DIRS = $(XTENSA_SRC_PATH) $(SRC_PATH)/target-xtensa/core-$(CORE)
XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS))
LDFLAGS = -T$(XTENSA_SRC_PATH)/linker.ld
@ -56,10 +59,10 @@ TESTCASES += test_windowed.tst
all: build
%.o: $(XTENSA_SRC_PATH)/%.c
$(CC) -I$(XTENSA_SRC_PATH) $(CFLAGS) -c $< -o $@
$(CC) $(XTENSA_INC) $(CFLAGS) -c $< -o $@
%.o: $(XTENSA_SRC_PATH)/%.S
$(AS) -Wa,-I,$(XTENSA_SRC_PATH) $(ASFLAGS) -c $< -o $@
$(CC) $(XTENSA_INC) $(ASFLAGS) -c $< -o $@
%.tst: %.o $(XTENSA_SRC_PATH)/macros.inc $(CRT) Makefile
$(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@

View File

@ -1,3 +1,5 @@
#include "core-isa.h"
.macro test_suite name
.data
status: .word result

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite b

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite bi

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite boolean

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
#define debug_level 6
#define debug_vector level6

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite bz

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite clamps

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite extui

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite fail

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite interrupt

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite loop

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite mac16

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite max

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite min

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite mmu

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite mul16

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite mul32

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite nsa

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
.purgem test
.macro test name

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite quo

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite rem

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite rst0

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite s32c1i

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite sar

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite sext

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite shift

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite sr

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite timer

View File

@ -1,4 +1,4 @@
.include "macros.inc"
#include "macros.inc"
test_suite windowed