From patchwork Fri May 25 14:19:07 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: 136915 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp3664466lji; Fri, 25 May 2018 07:29:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLrwbRQcIhwojAeWN6elg/fmb8ApJ6GTTXG4gqXVm6euccdy9CbmCPcWal6wp6jwaxv4bt+ X-Received: by 2002:a0c:95dd:: with SMTP id t29-v6mr2433104qvt.23.1527258557207; Fri, 25 May 2018 07:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527258557; cv=none; d=google.com; s=arc-20160816; b=XLqZ3B8rNb8cLwlRZxWTkYWyv/k4GLDKVVBQK8fPIoTx0WuwMxwHvX9qXZ8BaGMhTY Fw2YwY15l+AtBwWzHg0FjIsjmjMyTxeJ3g/C8urkukJqibbpZnM8OK/fXik48S4aYecy 26u1tbGDBp9GAU2d/VzlhyjZyxIXmajPdYBzaIrDluz1sdyOzIytpyNquGm4RHAJxgYF juPkhTExBSS4cv/BZ1p1yrETD5MxAP7OrD+iiBGJbD//y/kqGrB0zWk/oTiMl4H7zTkO Rp2K2vaCQ3DPk2BVhWOP3rPAnIKZdnqzFyTeej1+1qO0sZOXdonG0Z26MJy3EfBzZb7i f+0g== 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:arc-authentication-results; bh=OK4P3HsaBQrLksTqWWECnHmwCrduw6xPbr2u3lhUlDU=; b=AXWwKwW0SB8DdR1EE2zBzTSTwhpBz5tMRcJPnOZmd9/EgnqyR+jgU/Fr9CPPobpubl BUR4YtsbOzDkIDGfFRpKI1sdA0J/sZ1f5kYBUZ+vHgY5ufSgNrPzQEeFqlYioxRxe9Fq FYe1MtMlOzv1mL3AedLvLwjilOIVaZ06Rd8GH0J7MV8pUS0PQH0d3bT9Fu5Z53n3K+Hx FGD4Cjbk5hRQn4zJfoM7s/mckvPQ8tTN5yox+Cm/oVMKmMGmAkd7TRWSQXwdh4MJdOPd 65Obmb9L3RI6cwHEdSeLZyOLgUk0o7XNhKb8PEGh0AY0HdSB7G+REK9XE2QGElfDeX9+ dueg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=djNyMSAZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p10-v6si1638217qvn.220.2018.05.25.07.29.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 25 May 2018 07:29:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=djNyMSAZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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 ([::1]:44346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMDiW-0000iF-Hy for patch@linaro.org; Fri, 25 May 2018 10:29:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMDZ5-00018J-IB for qemu-devel@nongnu.org; Fri, 25 May 2018 10:19:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMDZ1-0000Xo-JD for qemu-devel@nongnu.org; Fri, 25 May 2018 10:19:31 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:46219) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMDZ1-0000W2-Ce for qemu-devel@nongnu.org; Fri, 25 May 2018 10:19:27 -0400 Received: by mail-wr0-x243.google.com with SMTP id x9-v6so9541693wrl.13 for ; Fri, 25 May 2018 07:19:27 -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=OK4P3HsaBQrLksTqWWECnHmwCrduw6xPbr2u3lhUlDU=; b=djNyMSAZANljAbCyV6L347Jwef+l5FyNs1ICWBnqQ2CakisWiLuKs8s3RuTfeA2Ohk QsTk3j/YEe75McJNnBy0Pv3/ilhCJt4a0E5s+fXJ8pA3W6W8fW4J3e7ZgE7z9zJtNZ79 qjOM6+9ZXpYPB6Bw2Zc6U4LYklJulBvM2+KG8= 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=OK4P3HsaBQrLksTqWWECnHmwCrduw6xPbr2u3lhUlDU=; b=MFUQa7W7XEsbxRsHNa6v1S+8Oqgc1f+BkZtnuLZ4Om2DuXWRJeMy8DPQnnMvZMtuLO 41X2AKc3X8VDKb9z0V4O5O6Rj+RFuBAfL4rNAByQbeM+BkSTfgTzjG9quP6cyhNMnb7h zqN9zr3NtndstjCLh+MACRxSW5rlai23k0Ub2oB0s40bxD/LrWuyophle4L4Ssw2SnrI v9R6669KU9xp8qOtz4cdxOZYz8LxvFcewTRre1Y17EbJ5us4kPTRVK3QMrzrv+rkggyW T+Sak6PsNbj5up3k6mL+2USY/t4yn83ntNAUr1tA8hyRgHcZjWZ00pTI6UDo4uBNfvUk AG/Q== X-Gm-Message-State: ALKqPwfmthQPKycR+3GPUVYELNRFeIdQCdXZdPMd1RimMn3xAyyWIFW6 s61ApSrdSZE6zAMEVra1gF3ruQ== X-Received: by 2002:adf:c7ca:: with SMTP id y10-v6mr2236220wrg.104.1527257966375; Fri, 25 May 2018 07:19:26 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 4-v6sm9837513wmg.8.2018.05.25.07.19.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 May 2018 07:19:14 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 55B743E069A; Fri, 25 May 2018 15:19:11 +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 Date: Fri, 25 May 2018 15:19:07 +0100 Message-Id: <20180525141910.6384-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180525141910.6384-1-alex.bennee@linaro.org> References: <20180525133851.27161-1-alex.bennee@linaro.org> <20180525141910.6384-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::243 Subject: [Qemu-devel] [PATCH v5 36/49] 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+patch=linaro.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 -- 2.17.0 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;