diff options
Diffstat (limited to 'tests')
30 files changed, 37 insertions, 32 deletions
diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile index 1b519cae45..38f23b19a7 100644 --- a/tests/tcg/xtensa/Makefile +++ b/tests/tcg/xtensa/Makefile @@ -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 $@ diff --git a/tests/tcg/xtensa/macros.inc b/tests/tcg/xtensa/macros.inc index ead8528aef..4ebd30ab86 100644 --- a/tests/tcg/xtensa/macros.inc +++ b/tests/tcg/xtensa/macros.inc @@ -1,3 +1,5 @@ +#include "core-isa.h" + .macro test_suite name .data status: .word result diff --git a/tests/tcg/xtensa/test_b.S b/tests/tcg/xtensa/test_b.S index 6cbe5f1fca..8e81f956df 100644 --- a/tests/tcg/xtensa/test_b.S +++ b/tests/tcg/xtensa/test_b.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite b diff --git a/tests/tcg/xtensa/test_bi.S b/tests/tcg/xtensa/test_bi.S index 6a5f1dffc9..4f94c0c7e6 100644 --- a/tests/tcg/xtensa/test_bi.S +++ b/tests/tcg/xtensa/test_bi.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite bi diff --git a/tests/tcg/xtensa/test_boolean.S b/tests/tcg/xtensa/test_boolean.S index 50e6d2c22a..eac40e0973 100644 --- a/tests/tcg/xtensa/test_boolean.S +++ b/tests/tcg/xtensa/test_boolean.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite boolean diff --git a/tests/tcg/xtensa/test_break.S b/tests/tcg/xtensa/test_break.S index 7574cbefc8..775cd7c260 100644 --- a/tests/tcg/xtensa/test_break.S +++ b/tests/tcg/xtensa/test_break.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" #define debug_level 6 #define debug_vector level6 diff --git a/tests/tcg/xtensa/test_bz.S b/tests/tcg/xtensa/test_bz.S index f9ba6e22e8..b68135011e 100644 --- a/tests/tcg/xtensa/test_bz.S +++ b/tests/tcg/xtensa/test_bz.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite bz diff --git a/tests/tcg/xtensa/test_clamps.S b/tests/tcg/xtensa/test_clamps.S index c186cc98d8..3efabfd9d3 100644 --- a/tests/tcg/xtensa/test_clamps.S +++ b/tests/tcg/xtensa/test_clamps.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite clamps diff --git a/tests/tcg/xtensa/test_extui.S b/tests/tcg/xtensa/test_extui.S index 5d55451704..c32bb824df 100644 --- a/tests/tcg/xtensa/test_extui.S +++ b/tests/tcg/xtensa/test_extui.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite extui diff --git a/tests/tcg/xtensa/test_fail.S b/tests/tcg/xtensa/test_fail.S index e8d1b425bc..1c26d50790 100644 --- a/tests/tcg/xtensa/test_fail.S +++ b/tests/tcg/xtensa/test_fail.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite fail diff --git a/tests/tcg/xtensa/test_interrupt.S b/tests/tcg/xtensa/test_interrupt.S index 68b3ee1492..334ddab287 100644 --- a/tests/tcg/xtensa/test_interrupt.S +++ b/tests/tcg/xtensa/test_interrupt.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite interrupt diff --git a/tests/tcg/xtensa/test_loop.S b/tests/tcg/xtensa/test_loop.S index 1c240e8e9b..5755578d01 100644 --- a/tests/tcg/xtensa/test_loop.S +++ b/tests/tcg/xtensa/test_loop.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite loop diff --git a/tests/tcg/xtensa/test_mac16.S b/tests/tcg/xtensa/test_mac16.S index 5ddd160ffc..512025d842 100644 --- a/tests/tcg/xtensa/test_mac16.S +++ b/tests/tcg/xtensa/test_mac16.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite mac16 diff --git a/tests/tcg/xtensa/test_max.S b/tests/tcg/xtensa/test_max.S index 2534c9d90b..3caa207ea5 100644 --- a/tests/tcg/xtensa/test_max.S +++ b/tests/tcg/xtensa/test_max.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite max diff --git a/tests/tcg/xtensa/test_min.S b/tests/tcg/xtensa/test_min.S index 6d9ddeb1ac..551cf591e5 100644 --- a/tests/tcg/xtensa/test_min.S +++ b/tests/tcg/xtensa/test_min.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite min diff --git a/tests/tcg/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S index 4bc34e55a0..099031fd14 100644 --- a/tests/tcg/xtensa/test_mmu.S +++ b/tests/tcg/xtensa/test_mmu.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite mmu diff --git a/tests/tcg/xtensa/test_mul16.S b/tests/tcg/xtensa/test_mul16.S index bf94376649..98fa7042b5 100644 --- a/tests/tcg/xtensa/test_mul16.S +++ b/tests/tcg/xtensa/test_mul16.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite mul16 diff --git a/tests/tcg/xtensa/test_mul32.S b/tests/tcg/xtensa/test_mul32.S index fdaf57331b..b288ead9f6 100644 --- a/tests/tcg/xtensa/test_mul32.S +++ b/tests/tcg/xtensa/test_mul32.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite mul32 diff --git a/tests/tcg/xtensa/test_nsa.S b/tests/tcg/xtensa/test_nsa.S index a5fe5debe4..479b2e2429 100644 --- a/tests/tcg/xtensa/test_nsa.S +++ b/tests/tcg/xtensa/test_nsa.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite nsa diff --git a/tests/tcg/xtensa/test_pipeline.S b/tests/tcg/xtensa/test_pipeline.S index 6be6085fc3..f418c11974 100644 --- a/tests/tcg/xtensa/test_pipeline.S +++ b/tests/tcg/xtensa/test_pipeline.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" .purgem test .macro test name diff --git a/tests/tcg/xtensa/test_quo.S b/tests/tcg/xtensa/test_quo.S index 12debf1fe0..5b3ae383d0 100644 --- a/tests/tcg/xtensa/test_quo.S +++ b/tests/tcg/xtensa/test_quo.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite quo diff --git a/tests/tcg/xtensa/test_rem.S b/tests/tcg/xtensa/test_rem.S index bb0d5fe202..6357e520d9 100644 --- a/tests/tcg/xtensa/test_rem.S +++ b/tests/tcg/xtensa/test_rem.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite rem diff --git a/tests/tcg/xtensa/test_rst0.S b/tests/tcg/xtensa/test_rst0.S index 3eda565e8a..a73366b120 100644 --- a/tests/tcg/xtensa/test_rst0.S +++ b/tests/tcg/xtensa/test_rst0.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite rst0 diff --git a/tests/tcg/xtensa/test_s32c1i.S b/tests/tcg/xtensa/test_s32c1i.S index 4536015a84..93b575db95 100644 --- a/tests/tcg/xtensa/test_s32c1i.S +++ b/tests/tcg/xtensa/test_s32c1i.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite s32c1i diff --git a/tests/tcg/xtensa/test_sar.S b/tests/tcg/xtensa/test_sar.S index 40c649ffb8..b615a55767 100644 --- a/tests/tcg/xtensa/test_sar.S +++ b/tests/tcg/xtensa/test_sar.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite sar diff --git a/tests/tcg/xtensa/test_sext.S b/tests/tcg/xtensa/test_sext.S index 04dc6500c1..087a6333a4 100644 --- a/tests/tcg/xtensa/test_sext.S +++ b/tests/tcg/xtensa/test_sext.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite sext diff --git a/tests/tcg/xtensa/test_shift.S b/tests/tcg/xtensa/test_shift.S index a8e43645b7..5df9ed4b1e 100644 --- a/tests/tcg/xtensa/test_shift.S +++ b/tests/tcg/xtensa/test_shift.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite shift diff --git a/tests/tcg/xtensa/test_sr.S b/tests/tcg/xtensa/test_sr.S index 470c03dae2..4fac46e80f 100644 --- a/tests/tcg/xtensa/test_sr.S +++ b/tests/tcg/xtensa/test_sr.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite sr diff --git a/tests/tcg/xtensa/test_timer.S b/tests/tcg/xtensa/test_timer.S index 1041cc6658..f8c6f7423a 100644 --- a/tests/tcg/xtensa/test_timer.S +++ b/tests/tcg/xtensa/test_timer.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite timer diff --git a/tests/tcg/xtensa/test_windowed.S b/tests/tcg/xtensa/test_windowed.S index cb2d39e1fd..3de6d3763a 100644 --- a/tests/tcg/xtensa/test_windowed.S +++ b/tests/tcg/xtensa/test_windowed.S @@ -1,4 +1,4 @@ -.include "macros.inc" +#include "macros.inc" test_suite windowed |