From patchwork Fri Jun 15 19:46:45 2018 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: 930245 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Iw6wy74x"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 416snf3kGxz9s29 for ; Sat, 16 Jun 2018 06:40:38 +1000 (AEST) Received: from localhost ([::1]:49280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTvWO-0001XL-4P for incoming@patchwork.ozlabs.org; Fri, 15 Jun 2018 16:40:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTuyL-0000e5-KM for qemu-devel@nongnu.org; Fri, 15 Jun 2018 16:05:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTuyJ-0007r9-Oc for qemu-devel@nongnu.org; Fri, 15 Jun 2018 16:05:25 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:46550) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTuyJ-0007q2-Gq for qemu-devel@nongnu.org; Fri, 15 Jun 2018 16:05:23 -0400 Received: by mail-wr0-x242.google.com with SMTP id v13-v6so10979558wrp.13 for ; Fri, 15 Jun 2018 13:05:23 -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=yrILPOJ717IdscZrrLEHQshZB0FpGtlcfg2RM+PPXiQ=; b=Iw6wy74xd52s3NOErIvlrhy7R8wruLLVI4NGM+rBS0kHmDNsSk3+H2mOyWrVJM4vX2 sSxRu7/481kGViXbmQoS/bxt3402NKXaYFvtYkfgw/5QMYySDO70yRUbDeVBunfzCUWg 4wCAPHVa8ZlmPrjSl92ACQ06Q+u2dSaBy6mZ8= 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=yrILPOJ717IdscZrrLEHQshZB0FpGtlcfg2RM+PPXiQ=; b=lLlXpjOqWV/X7YwxlP6Ri6h7FFYyMOXIjGEW38p87GK9Lh2ELaLXR2KhtNBxX7iKrr rcN07UlsaPrpxmY1mXSMjJrlKnwEhpTbEXa7YM2cfRGLy5YtLnOVT8dexsOtLTDzZEa0 YbkJOaueGdqRfRGHdfdILSAFWXS/UcRdcX6MKVjDD5Y4ml7xl37W2B4+FmkXZnZjqu3P 6v+QgUfiZrdE2iwb4Ru+N+8bQt6m9ICpilBuxCGRJJblnoxlFNkP1ELy69phvJd173UI UhSO64f1YMDSZ9Tn2kJ2rKv2rZ+PNk8U1nKH5bRwvipCwBZQIrBnpCznoTldrs8bxqMo n6Dw== X-Gm-Message-State: APt69E2IumRtdhd0612wpilNSjeQ090TTeLSElxT6GSdskVuM2HiVKaa k7LcaCwHwWYLiZdbfyzRXMkamenXSiY= X-Google-Smtp-Source: ADUXVKLoeSaN1ewrwEY6EDi75Hb13fwYVyz7AT6UiWFw6sU7SJFRXSOIvvR+5Ylxgt5vPSKFInGMlg== X-Received: by 2002:adf:ae09:: with SMTP id x9-v6mr2782000wrc.19.1529093122428; Fri, 15 Jun 2018 13:05:22 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id i46-v6sm17667750wra.36.2018.06.15.13.05.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jun 2018 13:05:14 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 668263E0D8C; Fri, 15 Jun 2018 20:47:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de, peter.maydell@linaro.org Date: Fri, 15 Jun 2018 20:46:45 +0100 Message-Id: <20180615194705.28019-35-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180615194705.28019-1-alex.bennee@linaro.org> References: <20180615194705.28019-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:400c:c0c::242 Subject: [Qemu-devel] [PATCH v7 34/54] tests/tcg/alpha: add Alpha specific 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, Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" These tests did use their own crt.o stub however that is a little stone age so we drop crt.S and just statically link to the cross compilers libraries. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v4 - drop crt.s - drop skipping of threadtest - drop write() hack, include unistd.h v5 - merge fixes --- tests/tcg/alpha/Makefile | 35 --------------------------------- tests/tcg/alpha/Makefile.target | 12 +++++++++++ tests/tcg/alpha/crt.s | 26 ------------------------ tests/tcg/alpha/hello-alpha.c | 2 ++ tests/tcg/alpha/test-cond.c | 1 + tests/tcg/alpha/test-ovf.c | 2 ++ 6 files changed, 17 insertions(+), 61 deletions(-) delete mode 100644 tests/tcg/alpha/Makefile delete mode 100644 tests/tcg/alpha/crt.s diff --git a/tests/tcg/alpha/Makefile b/tests/tcg/alpha/Makefile deleted file mode 100644 index 2b1f03d048..0000000000 --- a/tests/tcg/alpha/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -CROSS=alpha-linux-gnu- -CC=$(CROSS)gcc -AS=$(CROSS)as - -SIM=../../alpha-linux-user/qemu-alpha - -CFLAGS=-O -LINK=$(CC) -o $@ crt.o $< -nostdlib - -TESTS=test-cond test-cmov - -all: hello-alpha $(TESTS) - -hello-alpha: hello-alpha.o crt.o - $(LINK) - -test-cond: test-cond.o crt.o - $(LINK) - -test-cmov.o: test-cond.c - $(CC) -c $(CFLAGS) -DTEST_CMOV -o $@ $< - -test-cmov: test-cmov.o crt.o - $(LINK) - -test-ovf: test-ovf.o crt.o - $(LINK) - -check: $(TESTS) - for f in $(TESTS); do $(SIM) $$f || exit 1; done - -clean: - $(RM) *.o *~ hello-alpha $(TESTS) - -.PHONY: clean all check diff --git a/tests/tcg/alpha/Makefile.target b/tests/tcg/alpha/Makefile.target index bedf1b6444..a585080328 100644 --- a/tests/tcg/alpha/Makefile.target +++ b/tests/tcg/alpha/Makefile.target @@ -2,5 +2,17 @@ # # Alpha specific tweaks +ALPHA_SRC=$(SRC_PATH)/tests/tcg/alpha +VPATH+=$(ALPHA_SRC) + +ALPHA_TESTS=hello-alpha test-cond test-cmov test-ovf +TESTS+=$(ALPHA_TESTS) + +test-cmov: EXTRA_CFLAGS=-DTEST_CMOV +test-cmov: test-cond.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +run-test-cmov: test-cmov + # On Alpha Linux only supports 8k pages EXTRA_RUNS+=run-test-mmap-8192 diff --git a/tests/tcg/alpha/crt.s b/tests/tcg/alpha/crt.s deleted file mode 100644 index 31af8825bc..0000000000 --- a/tests/tcg/alpha/crt.s +++ /dev/null @@ -1,26 +0,0 @@ - .text - - .globl _start - .ent _start,0 -_start: - .frame $15,0,$15 - br $29,1f -1: ldgp $29, 0($29) - .prologue 0 - ldq $27,main($29) !literal!1 - jsr $26,($27) - or $0,$0,$16 - .end _start - - .globl _exit -_exit: - lda $0,1 - callsys - - call_pal 0 - - .globl write -write: - lda $0,4 - callsys - ret diff --git a/tests/tcg/alpha/hello-alpha.c b/tests/tcg/alpha/hello-alpha.c index 79892e6522..84e43b2fc4 100644 --- a/tests/tcg/alpha/hello-alpha.c +++ b/tests/tcg/alpha/hello-alpha.c @@ -1,3 +1,5 @@ +#include + int main (void) { write (1, "hello\n", 6); diff --git a/tests/tcg/alpha/test-cond.c b/tests/tcg/alpha/test-cond.c index 74adffaa69..e625313b3e 100644 --- a/tests/tcg/alpha/test-cond.c +++ b/tests/tcg/alpha/test-cond.c @@ -1,3 +1,4 @@ +#include #ifdef TEST_CMOV diff --git a/tests/tcg/alpha/test-ovf.c b/tests/tcg/alpha/test-ovf.c index 01c80e7525..17892f1e89 100644 --- a/tests/tcg/alpha/test-ovf.c +++ b/tests/tcg/alpha/test-ovf.c @@ -1,3 +1,5 @@ +#include + static long test_subqv (long a, long b) { long res;