Browse Source

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>
pull/6/merge
Max Filippov 12 years ago
parent
commit
a2e67072b7
  1. 11
      tests/tcg/xtensa/Makefile
  2. 2
      tests/tcg/xtensa/macros.inc
  3. 2
      tests/tcg/xtensa/test_b.S
  4. 2
      tests/tcg/xtensa/test_bi.S
  5. 2
      tests/tcg/xtensa/test_boolean.S
  6. 2
      tests/tcg/xtensa/test_break.S
  7. 2
      tests/tcg/xtensa/test_bz.S
  8. 2
      tests/tcg/xtensa/test_clamps.S
  9. 2
      tests/tcg/xtensa/test_extui.S
  10. 2
      tests/tcg/xtensa/test_fail.S
  11. 2
      tests/tcg/xtensa/test_interrupt.S
  12. 2
      tests/tcg/xtensa/test_loop.S
  13. 2
      tests/tcg/xtensa/test_mac16.S
  14. 2
      tests/tcg/xtensa/test_max.S
  15. 2
      tests/tcg/xtensa/test_min.S
  16. 2
      tests/tcg/xtensa/test_mmu.S
  17. 2
      tests/tcg/xtensa/test_mul16.S
  18. 2
      tests/tcg/xtensa/test_mul32.S
  19. 2
      tests/tcg/xtensa/test_nsa.S
  20. 2
      tests/tcg/xtensa/test_pipeline.S
  21. 2
      tests/tcg/xtensa/test_quo.S
  22. 2
      tests/tcg/xtensa/test_rem.S
  23. 2
      tests/tcg/xtensa/test_rst0.S
  24. 2
      tests/tcg/xtensa/test_s32c1i.S
  25. 2
      tests/tcg/xtensa/test_sar.S
  26. 2
      tests/tcg/xtensa/test_sext.S
  27. 2
      tests/tcg/xtensa/test_shift.S
  28. 2
      tests/tcg/xtensa/test_sr.S
  29. 2
      tests/tcg/xtensa/test_timer.S
  30. 2
      tests/tcg/xtensa/test_windowed.S

11
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 $@

2
tests/tcg/xtensa/macros.inc

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

2
tests/tcg/xtensa/test_b.S

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

2
tests/tcg/xtensa/test_bi.S

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

2
tests/tcg/xtensa/test_boolean.S

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

2
tests/tcg/xtensa/test_break.S

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

2
tests/tcg/xtensa/test_bz.S

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

2
tests/tcg/xtensa/test_clamps.S

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

2
tests/tcg/xtensa/test_extui.S

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

2
tests/tcg/xtensa/test_fail.S

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

2
tests/tcg/xtensa/test_interrupt.S

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

2
tests/tcg/xtensa/test_loop.S

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

2
tests/tcg/xtensa/test_mac16.S

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

2
tests/tcg/xtensa/test_max.S

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

2
tests/tcg/xtensa/test_min.S

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

2
tests/tcg/xtensa/test_mmu.S

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

2
tests/tcg/xtensa/test_mul16.S

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

2
tests/tcg/xtensa/test_mul32.S

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

2
tests/tcg/xtensa/test_nsa.S

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

2
tests/tcg/xtensa/test_pipeline.S

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

2
tests/tcg/xtensa/test_quo.S

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

2
tests/tcg/xtensa/test_rem.S

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

2
tests/tcg/xtensa/test_rst0.S

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

2
tests/tcg/xtensa/test_s32c1i.S

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

2
tests/tcg/xtensa/test_sar.S

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

2
tests/tcg/xtensa/test_sext.S

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

2
tests/tcg/xtensa/test_shift.S

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

2
tests/tcg/xtensa/test_sr.S

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

2
tests/tcg/xtensa/test_timer.S

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

2
tests/tcg/xtensa/test_windowed.S

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

Loading…
Cancel
Save