From patchwork Thu May 17 17:47:08 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: 136186 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp256849lji; Thu, 17 May 2018 11:06:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrinfHYJjQwO9JInAjtYdOeWnkFfnaKDKMiySvKIj8LP+10ZRuRcJ3M37mIt7Vx1v725bMf X-Received: by 2002:a37:4e97:: with SMTP id c145-v6mr5980899qkb.151.1526580418953; Thu, 17 May 2018 11:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526580418; cv=none; d=google.com; s=arc-20160816; b=KaMA8yAuzOTOA9tNby5pqVVrNADWuboggnspUFExCt1L9/jt2NA1Pe+sbh/9h5XOgO xJ8/sI0gVc0J1F8FiXTsHErb3+Sz3zlwoy8OyI9//78EkHtUTReF+zc7RjT77/D2Ey3o SRMD1ofQebmvQl4W7RwEpXB/mcEZhD86PSuncjKT2zNxGPtJq9OiECKytO/c/0wmRt4f OtbJtm2+/mSGGIJQzw8ZvfhTZxElzNlA4/HKv2NG1A+OJRZLW+JvfrpsWVZ08iweuYdx tAsx0x/pYtAVv4++HpwGRZCXUu22nbTI95yehU5x5XL/bbuVWynktz8078VZ17yxXJ7P NEAw== 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=WiWSpOOpZqcS3iIbTI9Yo2F9XwLbOgZg0RViuXQBEd4=; b=rcMjCWLTAdjlLBzD7V4ySTH7KiVMz8AbnscZqXY4vM4w7hXxjxjJwWP2UeD1sGBjuu eXZltVQlsmxq0TGzbGuiuM1Vf7oCIYuonCzZjtJ60Z5Z1jLt6IFCx/k7QFaFcCzUfW4h ky5RfZmE5s4ZS4zFdSuke+3eDGg85N7/BVeI0uwybKHtQKppRFd8MtJuAIHuMACZQsig wmD+CIF9Kg9WUWMC0C4Bx2bViQDa/opIHLQ6tn+eiTIDnB7gk3jNv6BYhFNyRRCapfQI rDBw/epVNDpLyBqVSdNcxEYw4hyFCz1JN4xH7SddR3PaPBdQwxYH/bO1toaR9S5Yb2SZ YmcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bnYqUbCP; 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 j28-v6si2092556qvc.191.2018.05.17.11.06.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 17 May 2018 11:06:58 -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=bnYqUbCP; 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]:38537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJNIo-0005xX-Bf for patch@linaro.org; Thu, 17 May 2018 14:06:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJN6Q-0003JK-6G for qemu-devel@nongnu.org; Thu, 17 May 2018 13:54:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJN6N-0007Bc-0D for qemu-devel@nongnu.org; Thu, 17 May 2018 13:54:10 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:43330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJN6M-0007Ai-Ph for qemu-devel@nongnu.org; Thu, 17 May 2018 13:54:06 -0400 Received: by mail-wr0-x242.google.com with SMTP id v15-v6so6548294wrm.10 for ; Thu, 17 May 2018 10:54:06 -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=WiWSpOOpZqcS3iIbTI9Yo2F9XwLbOgZg0RViuXQBEd4=; b=bnYqUbCP9lyKTAx5+UrjjsLK0gLGKp66AolIHO12PDlG3dHZUsYCfiFhr7mPTZRqTP hRpZwNKvPeYGoSJMFYIcTmm7zonasLgTZExGgd6cSMwBs6i5tnIqu68xJgL1qYwGMgKh 1rPeHk1zkaDMxkNcHg69PYT/jm6vB03Q2fQfg= 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=WiWSpOOpZqcS3iIbTI9Yo2F9XwLbOgZg0RViuXQBEd4=; b=hLie4iatMUTf3+YEp1sjfWTI5nfzeK7+16Xsdg+ygsyiGI2D0xDJMdMlc3cl/PUH7t P0EiHKN8o3laDR/aOOTqytn8konEhQ14FeHohfNuN9vRxTkRrH1B6JnFptVNfD7sPTPL /jvI+uyQpSSuOgZCLMjQHenmV7zUsyxNGvjuO5f+FdwOyHJFlW8ruCl9to14Vusg4zhz b3K4QqGBkcH1UC+yi0vDGzL43CvdztVrJcdhZxiG1zPRYzj7vYjK/vLHd5sGkYxQvAgY TVn1GQXtIkbeJT45BDw2GnsFRVCXIw7xS3A/6bksyglD5rCnYaRVQd8byf+ChluaAkCl O3BA== X-Gm-Message-State: ALKqPwfX3+EFxlyJTslus0g0ZIJ8WmZAMdPL+OkUNLL5nfBcdgaJ6WUT 0dfjrAQGivADI+Nl5c5i6D8CBA== X-Received: by 2002:adf:e64b:: with SMTP id b11-v6mr4980141wrn.51.1526579645631; Thu, 17 May 2018 10:54:05 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m15-v6sm5877348wri.8.2018.05.17.10.53.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 May 2018 10:53:58 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 170013E0F65; Thu, 17 May 2018 18:47:22 +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: Thu, 17 May 2018 18:47:08 +0100 Message-Id: <20180517174718.10107-40-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180517174718.10107-1-alex.bennee@linaro.org> References: <20180517174718.10107-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 v4 39/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 --- v4 - drop crt.s - drop skipping of threadtest - drop write() hack, include unistd.h --- tests/tcg/alpha/Makefile | 35 --------------------------------- tests/tcg/alpha/Makefile.target | 15 ++++++++++++++ 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, 20 insertions(+), 61 deletions(-) delete mode 100644 tests/tcg/alpha/Makefile create mode 100644 tests/tcg/alpha/Makefile.target delete mode 100644 tests/tcg/alpha/crt.s -- 2.17.0 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé 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 new file mode 100644 index 0000000000..b253cee1fc --- /dev/null +++ b/tests/tcg/alpha/Makefile.target @@ -0,0 +1,15 @@ +# -*- Mode: makefile -*- +# +# 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 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;