target-xtensa: allow using core configuration in tests
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 10 Feb 2014 16:20:52 +0000 (20:20 +0400)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 24 Feb 2014 00:47:01 +0000 (04:47 +0400)
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>
30 files changed:
tests/tcg/xtensa/Makefile
tests/tcg/xtensa/macros.inc
tests/tcg/xtensa/test_b.S
tests/tcg/xtensa/test_bi.S
tests/tcg/xtensa/test_boolean.S
tests/tcg/xtensa/test_break.S
tests/tcg/xtensa/test_bz.S
tests/tcg/xtensa/test_clamps.S
tests/tcg/xtensa/test_extui.S
tests/tcg/xtensa/test_fail.S
tests/tcg/xtensa/test_interrupt.S
tests/tcg/xtensa/test_loop.S
tests/tcg/xtensa/test_mac16.S
tests/tcg/xtensa/test_max.S
tests/tcg/xtensa/test_min.S
tests/tcg/xtensa/test_mmu.S
tests/tcg/xtensa/test_mul16.S
tests/tcg/xtensa/test_mul32.S
tests/tcg/xtensa/test_nsa.S
tests/tcg/xtensa/test_pipeline.S
tests/tcg/xtensa/test_quo.S
tests/tcg/xtensa/test_rem.S
tests/tcg/xtensa/test_rst0.S
tests/tcg/xtensa/test_s32c1i.S
tests/tcg/xtensa/test_sar.S
tests/tcg/xtensa/test_sext.S
tests/tcg/xtensa/test_shift.S
tests/tcg/xtensa/test_sr.S
tests/tcg/xtensa/test_timer.S
tests/tcg/xtensa/test_windowed.S

index 1b519cae45aa5f8c836516553b2771427e47395b..38f23b19a7c2a97c392ec4c129d02132da59d946 100644 (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 $@
index ead8528aef1cd849e6ab42a2b7cafd515cff08dc..4ebd30ab86abee273e70739c0aa0195d6e643a12 100644 (file)
@@ -1,3 +1,5 @@
+#include "core-isa.h"
+
 .macro test_suite name
 .data
 status: .word result
index 6cbe5f1fcada714ecc94c2790221035969a86e2f..8e81f956df84633935a9226bc98c26640ce66452 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite b
 
index 6a5f1dffc92af5dc4724820b77ac43a69a74079c..4f94c0c7e6b33cb39487ca365b8ec07bcc2f888d 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite bi
 
index 50e6d2c22a6112f81282d3a4ee6896ae3edd041d..eac40e0973a3cb821053b13fedd14853f4f770bb 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite boolean
 
index 7574cbefc8729e220703d66c0e9ccbbf1f112856..775cd7c260632b569d0a59c8c29383c0a3e2c1fd 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 #define debug_level 6
 #define debug_vector level6
index f9ba6e22e800cedec47fbc5bb8a23180930fa006..b68135011e30fe9b51f79e830c9fe09f4f2056dc 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite bz
 
index c186cc98d840a7c38c56acfb1ad39e709ced028e..3efabfd9d3d92441d952c3c4c113c35de3dbcbf5 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite clamps
 
index 5d55451704c48d343df5a022055c6473d7ed1c86..c32bb824dfd3935375b8f5a5af2049ca13f9534a 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite extui
 
index e8d1b425bc2d71e248c2c212e1cc7c072bc8db9e..1c26d5079038720b02e8d36c039236666d21eb00 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite fail
 
index 68b3ee1492afec6d450416a1981d5456d8c9fddb..334ddab28718f3afaf963aa34cc6c7d9da0a7ddf 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite interrupt
 
index 1c240e8e9bbf1068041c26772f8e0bd53bb5fd73..5755578d01912e80c375def15aa2c05c2238991d 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite loop
 
index 5ddd160ffc96cfaaf1183dcd35ff14a257fe8936..512025d842913027a9f914390408ae7d17c3dc6b 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite mac16
 
index 2534c9d90b6df50cd82f4a20b271d781131fa9a6..3caa207ea5ec79ffacc6696248d052e441eb3870 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite max
 
index 6d9ddeb1aca4d64a7124ff5007a101f2b7300311..551cf591e54e3d051b035306276fedaa52dd0157 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite min
 
index 4bc34e55a0555ade32e2f16df64432f20bee3759..099031fd14f419032de6cfc0dac4265ead0d91d9 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite mmu
 
index bf94376649b8db0ce04f76c60e07a91995009205..98fa7042b504e03f86a1794645102767bcefcaae 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite mul16
 
index fdaf57331b1082448165532b4a7572468ec68da9..b288ead9f6cb3edcc978778334d5136772c795f1 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite mul32
 
index a5fe5debe4eb7a237f4f287eef72a7b3dd0d88cd..479b2e2429f5841aa7f73dedfd6a3ee09464b671 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite nsa
 
index 6be6085fc354b83745beeb1ed418e8b1a1e76d99..f418c11974aa4a67a05f273a8f890d1792613dee 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 .purgem test
 .macro test name
index 12debf1fe02c897086d4f2250881f4c15e2a8c0a..5b3ae383d0cd65e708a9e6f4f904c4a7c3972a5f 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite quo
 
index bb0d5fe202ad03416e352197ed2f9211ad23497b..6357e520d97968fe9a33dfe62d09793d817b2931 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite rem
 
index 3eda565e8a5ec79c9e56a6d387d3230a2ac6cdb8..a73366b1203aceae3e2f5d0385130a1a13002252 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite rst0
 
index 4536015a845ebe49ac1d419c3ce151846196a246..93b575db95ba033caee4ab9898a131a65c11f3ba 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite s32c1i
 
index 40c649ffb8390e6f9f9feb251415758bc935a4c8..b615a55767103592eb35392d7d1519e6171f1bbb 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite sar
 
index 04dc6500c1ad544bad9da0746f60639646529ff0..087a6333a434c52f296575ce3e9338295f8764cc 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite sext
 
index a8e43645b7abeda7805d95aeb4bb6badd63ad6e1..5df9ed4b1e1ebe329e93632ff62430e59d554d00 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite shift
 
index 470c03dae2a118d0f3c16740901b80194d6c6b57..4fac46e80f87069d216236ab5f1d8fac76e544f7 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite sr
 
index 1041cc6658719a6119d49b8ec2922691428325d5..f8c6f7423a965b843f1803fd04e0ed7865fe1d1d 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite timer
 
index cb2d39e1fd3632d58fb152ea1be3ae68784a2878..3de6d3763a83da7b7fa11c1795ca68a6bc433154 100644 (file)
@@ -1,4 +1,4 @@
-.include "macros.inc"
+#include "macros.inc"
 
 test_suite windowed