From patchwork Thu Jun 21 06:25:43 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: 139486 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1697215lji; Thu, 21 Jun 2018 00:00:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL0oU1Z2o0WOpi1qRB+q+bNQM+HAbG+kkD/mAOwumia1kVbWg0Zf9BwAF0v1R6e/lTJqmu4 X-Received: by 2002:a0c:e610:: with SMTP id z16-v6mr21163972qvm.246.1529564411907; Thu, 21 Jun 2018 00:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529564411; cv=none; d=google.com; s=arc-20160816; b=bmngnx0c7aSPVW07lY0f+zfJj12QWLoFQFF6SXE5RAvm2IzFeAvgp87a60aae7eywn WlLDuEelRDuueISfwFlQAQIuvHIgmZLd52+AEITb9bVBC0azUC3qEYOOAwI98vht5vAr iLFxRQvhchugTpzYybyM6KKjhKAog2+krr/DPUR3WWVF6hQ04yQ1/i7wjihUzN/1joa/ JGMGIN0qko1rqDx8l2Y9/bbwxggxXAViUGEWSLGk3CODRTXcpqKvooeMT86wUsk2wSgb 6R+TsOdN1U7rLNetdgTqP9kAwgpW0Dd1HdE8pv5tOBkDj63sFECjFljKwn/7p0S258xE ep1Q== 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=jeYa0xrqcHExF60eV7UDxglqXPqm0RzJhXZt2gCn3Mw=; b=iKPUO+0Q1JEsLKjm9t4BOLLyEw71W2nRuiaQBOzn2utMwHNLXj2QVfORjlKH9utrES 3oaIKTowQZ5V2cnndDoHbKWNCaB/FmXn1E3u4NnDtvXKcEw/C2RPV6l6+Kq6yFVRLO2g 1CS58KevgZ7Ngef/RCjWqsFtGDcOYyrnBfKyE7K+ME4Z3C6weadtlDt5GXQlRHgLWjtZ 6/nSNrBUydDNyaBmaQVzi9Epg84tF1+cDD9WfG4bNDMvsFndzkysCYZXh2SvvU1elqPV 2Y9KVIdKNL0t8rdIuCXJPDlejMha+xyFaGnkCCXmvZwjf1Vi+FwTnp+oz6PQjSOGlxaZ 9+Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RDjO1YU0; 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 m123-v6si467409qkc.165.2018.06.21.00.00.11 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 21 Jun 2018 00:00:11 -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=RDjO1YU0; 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]:53413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVtZj-0001eb-AM for patch@linaro.org; Thu, 21 Jun 2018 03:00:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVtI8-0004vZ-FW for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:42:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVtI6-0003Lj-Sk for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:42:00 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:35953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVtI6-0003L8-Kn for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:41:58 -0400 Received: by mail-wm0-x241.google.com with SMTP id v131-v6so3696949wma.1 for ; Wed, 20 Jun 2018 23:41:58 -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=jeYa0xrqcHExF60eV7UDxglqXPqm0RzJhXZt2gCn3Mw=; b=RDjO1YU0dPxlPM33L4VLAgwyS8Fni/DKbH2mzYCI7Zo0jBhH1ESDTa6isfr4iT2syJ 8HsMQ87CSE9/oAua1sbXlHYe77BVN8EzGKFbNhGVZzZ5tzoQm8+B4K0SmZAmoJ5C+z9h N2eYpP33fjFblVe2Msl4L+78E4uxMhpGn9pnA= 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=jeYa0xrqcHExF60eV7UDxglqXPqm0RzJhXZt2gCn3Mw=; b=uLUajFPNqMXTANKCN4CRNIgvtJqBL/Vkj0hpceDialZfK0ykmtZBCfPa2KWFJL8FgL NdBzsUI6IOrS902UBsAFvOqqElQ73qjXbHyo6g6DEJjiV4YxZB7WSc+nqN4xphL2erHl VEj6va1HCYvoqZtGFOUIvMLoAgRK8cx5N23K8vsNoyt/3DWibAq9XjFiOvJI9TrK7gcP dSVroZCFOv92jD4qMUuX7f3LA69PSP2ZF7S717Kng9Pjyf1oO4uKF66tIw11CJlbF/N2 wTwxWNkvuaUwmvEpQPxl2SMsqaxLgDfJEudzL3F1ZXPi+3h28dc4vAhlGmFhB8L2iVyt S+tw== X-Gm-Message-State: APt69E1rOb0cdtAeZ3iQrKCqBQ77GIBKpiazTswGKledhIZbY99MLbQ/ xAtcdIKr5kUd0K2VahU4LsNNPg== X-Received: by 2002:a1c:1414:: with SMTP id 20-v6mr3804139wmu.119.1529563317501; Wed, 20 Jun 2018 23:41:57 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n7-v6sm5072842wrr.39.2018.06.20.23.41.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 23:41:56 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 4F85A3E1009; Thu, 21 Jun 2018 07:26:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 21 Jun 2018 07:25:43 +0100 Message-Id: <20180621062605.941-36-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180621062605.941-1-alex.bennee@linaro.org> References: <20180621062605.941-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:c09::241 Subject: [Qemu-devel] [PULL v2 35/57] 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: agraf@suse.de, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, qemu-devel@nongnu.org, f4bug@amsat.org, cota@braap.org, famz@redhat.com, aurelien@aurel32.net, 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é -- 2.17.1 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;