mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 19:15:32 +00:00
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:
parent
d0fa1f0df3
commit
a2e67072b7
@ -1,10 +1,11 @@
|
|||||||
-include ../../../config-host.mak
|
-include ../../../config-host.mak
|
||||||
|
|
||||||
CROSS=xtensa-dc232b-elf-
|
CORE=dc232b
|
||||||
|
CROSS=xtensa-$(CORE)-elf-
|
||||||
|
|
||||||
ifndef XT
|
ifndef XT
|
||||||
SIM = ../../../xtensa-softmmu/qemu-system-xtensa
|
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
|
SIMDEBUG = -s -S
|
||||||
else
|
else
|
||||||
SIM = xt-run
|
SIM = xt-run
|
||||||
@ -17,6 +18,8 @@ AS = $(CROSS)gcc -x assembler-with-cpp
|
|||||||
LD = $(CROSS)ld
|
LD = $(CROSS)ld
|
||||||
|
|
||||||
XTENSA_SRC_PATH = $(SRC_PATH)/tests/tcg/xtensa
|
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
|
LDFLAGS = -T$(XTENSA_SRC_PATH)/linker.ld
|
||||||
|
|
||||||
@ -56,10 +59,10 @@ TESTCASES += test_windowed.tst
|
|||||||
all: build
|
all: build
|
||||||
|
|
||||||
%.o: $(XTENSA_SRC_PATH)/%.c
|
%.o: $(XTENSA_SRC_PATH)/%.c
|
||||||
$(CC) -I$(XTENSA_SRC_PATH) $(CFLAGS) -c $< -o $@
|
$(CC) $(XTENSA_INC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%.o: $(XTENSA_SRC_PATH)/%.S
|
%.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
|
%.tst: %.o $(XTENSA_SRC_PATH)/macros.inc $(CRT) Makefile
|
||||||
$(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@
|
$(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "core-isa.h"
|
||||||
|
|
||||||
.macro test_suite name
|
.macro test_suite name
|
||||||
.data
|
.data
|
||||||
status: .word result
|
status: .word result
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite b
|
test_suite b
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite bi
|
test_suite bi
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite boolean
|
test_suite boolean
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
#define debug_level 6
|
#define debug_level 6
|
||||||
#define debug_vector level6
|
#define debug_vector level6
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite bz
|
test_suite bz
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite clamps
|
test_suite clamps
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite extui
|
test_suite extui
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite fail
|
test_suite fail
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite interrupt
|
test_suite interrupt
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite loop
|
test_suite loop
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite mac16
|
test_suite mac16
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite max
|
test_suite max
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite min
|
test_suite min
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite mmu
|
test_suite mmu
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite mul16
|
test_suite mul16
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite mul32
|
test_suite mul32
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite nsa
|
test_suite nsa
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
.purgem test
|
.purgem test
|
||||||
.macro test name
|
.macro test name
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite quo
|
test_suite quo
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite rem
|
test_suite rem
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite rst0
|
test_suite rst0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite s32c1i
|
test_suite s32c1i
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite sar
|
test_suite sar
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite sext
|
test_suite sext
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite shift
|
test_suite shift
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite sr
|
test_suite sr
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite timer
|
test_suite timer
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.include "macros.inc"
|
#include "macros.inc"
|
||||||
|
|
||||||
test_suite windowed
|
test_suite windowed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user