From patchwork Tue Mar 12 17:09:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 160157 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp13375557jad; Tue, 12 Mar 2019 10:38:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxOv63rohEsrpgBM3LkfH/Irsbm0/vLVKgw730Lahti9/JznIgeyUdd0xt13cwmxOZ2zx7 X-Received: by 2002:a0d:ca47:: with SMTP id m68mr13773294ywd.217.1552412327322; Tue, 12 Mar 2019 10:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552412327; cv=none; d=google.com; s=arc-20160816; b=TilmqXTb1n5ULcjCAUOyfUnmxeozF8FutYST+biX0kXqZKVWE5+0bz0RhONqd7k/bd FpavPeJj5lrbStMQCizeKmIoM/fpNEGPErS+x4gEeb12baG6mHbmlrq7wtWAomqrAJSn T5fNVxWN4s08CKA0ysRgCXJD0i0d/NsA6+Vjamhosv91VAjBVFDG7i4eg9Fjzacc4aEJ 5fs+30ri/81PxV1yekJUT/gbqrWPXtGLJAi32eJoX259e28JeSlE8jzz/3chhm38Up5N PtNLkGFzmeAyD9Wr9kFl+R11y7DwPVRoEjfOAB12AjxNXHlUORF69gGtxIHFWTGSXfs0 vR+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=WfX9u8xi2Ou3qZgXk5DZ/ahAT5TsywCrJVvvreILrXw=; b=AFXXbI7mb0kDHOTGRibRNw6p+6B55JJf8HuOSfVtDWPS9+IDr5J3FCcYlu2OYn1KP+ 2Q/RsydfCjgghB1/H39BskSQNK1TTGvoJUHmp8+bMJ5LBOws9XicjJUIB5F8MmCuQbAB 2DAbCymPIllJg4dWs+lMnhvWj3HvLnhNoYiT1Jfmd3XvOYeC/1yqDkmbbfTJxDXXSOvP 8tSIdS4datwYuWNlVdYzZWgQQaAUOj3BiqKHuqWRz0UA928dLv8/XTvQJfwF7par0lRy EFTy7Nb7R8367eLsYqczVBTxZ1NzTpwW6dt34h7TprxSfbMQDOJal88FsZcO/DcCTW6y JCew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ywjPANb8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r126si5671662ywf.15.2019.03.12.10.38.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 12 Mar 2019 10:38:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ywjPANb8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:56544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3lMU-0006GX-OL for patch@linaro.org; Tue, 12 Mar 2019 13:38:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3l2v-0005Wi-AJ for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:18:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3kuQ-00076p-Ne for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:09:47 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:51896) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3kuQ-00075s-Fj for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:09:46 -0400 Received: by mail-wm1-x32e.google.com with SMTP id n19so3509335wmi.1 for ; Tue, 12 Mar 2019 10:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WfX9u8xi2Ou3qZgXk5DZ/ahAT5TsywCrJVvvreILrXw=; b=ywjPANb8SJztgOCKzOiHDqZJsPBwZ1oMSSNoqYURGijEJqG+7ZTVmUA19t+80Ad40p 6IpT8V1JMfFIhSKQoqH9cwRJvdA/K50oBCCKQF4sA79WNRONo/hfJBiaeab3Xzn6xU1x rvuMOTX3fupQCvX4A05cGGCA/kcFsxNHuVYI+c4/r4YvzRayQoKkmTtL7n9AnVjnqh4R 6RRe4kx/ly+6JWqAf0m1G/Yf6IMZRxI/LKgRM6lf8lTG2tKDFdBybhl6cocyk1NZ/uk3 5tfnSggz5mTHu7CpiusAvMpg0snNL5pL5gaoj8oTEh4/f2EfoXtf6JSdyRtGwDsmVdrI onOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WfX9u8xi2Ou3qZgXk5DZ/ahAT5TsywCrJVvvreILrXw=; b=lhxwP0VxBrT9XcU4Rw8XjPUQwrSio0Wubd1uVebWuG7MUFO5Ro0ZCLL5FERml99Gqy 2P5270r/7gsta4XNR5yoMKbyqFRxghCSmy/edzTxqgPKJkYYVagumHkNB30TlY/tsWnQ jZMdU0odNhkYk8Ek7RDSvffmU+icY4ROsElDl7jjX74o+1grG9P9hcG5ZmwfLIWXaHFv SbdTyI2YytmkhCc4ZzqwiPqwtC6+OPmliKknmlltaTgdpRReu0hD/PmvviVVvLzr+b0U YlugMq+6gn2SxxiI4/Zb/89JC0PYyQcPwX9FVTBYefIdtCinrJOOeTpEdN8j8kDJHUDO fYrA== X-Gm-Message-State: APjAAAWm/BCtItkh328Tc+ZZLtH3P4KCULjvRpGqwkvJE58GcVDSoTyG YY4vfEHGEfRZS3zOhXoJN+j2iokqaQc= X-Received: by 2002:a1c:2743:: with SMTP id n64mr574747wmn.143.1552410585246; Tue, 12 Mar 2019 10:09:45 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s12sm3052553wro.67.2019.03.12.10.09.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 10:09:43 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0B3E61FF9A; Tue, 12 Mar 2019 17:09:32 +0000 (UTC) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 12 Mar 2019 17:09:18 +0000 Message-Id: <20190312170931.25013-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190312170931.25013-1-alex.bennee@linaro.org> References: <20190312170931.25013-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e Subject: [Qemu-devel] [PULL 13/26] tests/tcg/xtensa: enable system tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée -- 2.20.1 diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile deleted file mode 100644 index 2bd4491769..0000000000 --- a/tests/tcg/xtensa/Makefile +++ /dev/null @@ -1,102 +0,0 @@ --include ../../../config-host.mak - -CORE=dc232b -CROSS=xtensa-$(CORE)-elf- - -ifndef XT -SIM = ../../../xtensa-softmmu/qemu-system-xtensa -SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS) -kernel -SIMDEBUG = -s -S -else -SIM = xt-run -SIMFLAGS = --xtensa-core=DC_B_232L --exit_with_target_code $(EXTFLAGS) -SIMDEBUG = --gdbserve=0 -endif - -HOST_CC = gcc -CC = $(CROSS)gcc -AS = $(CROSS)gcc -x assembler-with-cpp -LD = $(CROSS)ld - -ASFLAGS = -Wa,--no-absolute-literals -vectors_ASFLAGS = -mtext-section-literals - -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 = -Tlinker.ld - -CRT = crt.o vectors.o - -TESTCASES += test_b.tst -TESTCASES += test_bi.tst -TESTCASES += test_boolean.tst -TESTCASES += test_break.tst -TESTCASES += test_bz.tst -TESTCASES += test_cache.tst -TESTCASES += test_clamps.tst -TESTCASES += test_extui.tst -TESTCASES += test_fail.tst -TESTCASES += test_flix.tst -TESTCASES += test_fp0_arith.tst -TESTCASES += test_fp0_conv.tst -TESTCASES += test_fp1.tst -TESTCASES += test_fp_cpenable.tst -TESTCASES += test_interrupt.tst -TESTCASES += test_loop.tst -TESTCASES += test_lsc.tst -TESTCASES += test_mac16.tst -TESTCASES += test_max.tst -TESTCASES += test_min.tst -TESTCASES += test_mmu.tst -TESTCASES += test_mul16.tst -TESTCASES += test_mul32.tst -TESTCASES += test_nsa.tst -TESTCASES += test_phys_mem.tst -ifdef XT -TESTCASES += test_pipeline.tst -endif -TESTCASES += test_quo.tst -TESTCASES += test_rem.tst -TESTCASES += test_rst0.tst -TESTCASES += test_s32c1i.tst -TESTCASES += test_sar.tst -TESTCASES += test_sext.tst -TESTCASES += test_shift.tst -TESTCASES += test_sr.tst -TESTCASES += test_timer.tst -TESTCASES += test_windowed.tst - -all: build - -linker.ld: $(XTENSA_SRC_PATH)/linker.ld.S - $(HOST_CC) $(XTENSA_INC) -E -P $< -o $@ - -%.o: $(XTENSA_SRC_PATH)/%.c - $(CC) $(XTENSA_INC) $(CFLAGS) -c $< -o $@ - -%.o: $(XTENSA_SRC_PATH)/%.S - $(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) -c $< -o $@ - -%.tst: %.o linker.ld $(XTENSA_SRC_PATH)/macros.inc $(CRT) Makefile - $(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@ - -build: $(TESTCASES) - -check: $(addprefix run-, $(TESTCASES)) - -run-%.tst: %.tst - $(SIM) $(SIMFLAGS) ./$< - -run-test_fail.tst: test_fail.tst - ! $(SIM) $(SIMFLAGS) ./$< - -debug-%.tst: %.tst - $(SIM) $(SIMDEBUG) $(SIMFLAGS) ./$< - -host-debug-%.tst: %.tst - gdb --args $(SIM) $(SIMFLAGS) ./$< - -clean: - $(RM) -fr $(TESTCASES) $(CRT) linker.ld diff --git a/tests/tcg/xtensa/Makefile.softmmu-target b/tests/tcg/xtensa/Makefile.softmmu-target new file mode 100644 index 0000000000..86bb47db77 --- /dev/null +++ b/tests/tcg/xtensa/Makefile.softmmu-target @@ -0,0 +1,42 @@ +# +# Xtensa softmmu tests +# + +ifneq ($(TARGET_WORDS_BIGENDIAN),y) + +XTENSA_SRC = $(SRC_PATH)/tests/tcg/xtensa +XTENSA_ALL = $(filter-out $(XTENSA_SRC)/linker.ld.S,$(wildcard $(XTENSA_SRC)/*.S)) +XTENSA_TESTS = $(patsubst $(XTENSA_SRC)/%.S, %, $(XTENSA_ALL)) +# Filter out common blobs and broken tests +XTENSA_BROKEN_TESTS = crt vectors test_boolean test_pipeline test_fail +XTENSA_USABLE_TESTS = $(filter-out $(XTENSA_BROKEN_TESTS), $(XTENSA_TESTS)) + +# add to the list of tests +TESTS += $(XTENSA_USABLE_TESTS) +VPATH += $(XTENSA_SRC) + +CORE=dc232b +QEMU_OPTS+=-M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS) -kernel + +INCLUDE_DIRS = $(SRC_PATH)/target/xtensa/core-$(CORE) +XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS)) + +vectors_ASFLAGS = -mtext-section-literals +ASFLAGS = -Wa,--no-absolute-literals +LDFLAGS = -Tlinker.ld -nostartfiles -nostdlib + +CRT = crt.o vectors.o + +linker.ld: linker.ld.S + $(CC) $(XTENSA_INC) -E -P $< -o $@ + +$(XTENSA_USABLE_TESTS): linker.ld macros.inc $(CRT) Makefile.softmmu-target + +# special rule for common blobs +%.o: %.S + $(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) -c $< -o $@ + +%: %.S + $(CC) $(XTENSA_INC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT) + +endif