From patchwork Thu Jun 8 19:45:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 773469 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wkGBR04BZz9s76 for ; Fri, 9 Jun 2017 05:46:06 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="wfX40WWF"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=Z9X5FnXnQL8MFz9zJ zevNul0d/l1dlspW+mWiOwKC2dcpDjwjnUUA+vCCv924efD1yCMaeuqNMCsuQ1cp JlS/jCFtj7ny0omPk5ifkCxIwEaDaKa9Q1vo5VbI9MK29pi2whrv9CjWUHfGvpqc 9Fzm5dAVbkZvXlCs3M+AOAyXGI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=v3XQzJNyCmykehK/shyT+wj pd/4=; b=wfX40WWFk1SXLXuI1/aDaSkXeMNLclEOb+Cyw000KrkE/WJp0t1ywlO P/l7o2Zt0OcXEqdsrbPo08tMiNv4ohFmdJS+B6TwW/0iyJx5lA9FUp3eZDzA06Qf hRpW7zKgksiFkj6oKJ+BV2mjIiDaaX8F1iUV5dDjFc+RMYf7t7vI= Received: (qmail 88856 invoked by alias); 8 Jun 2017 19:45:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 88618 invoked by uid 89); 8 Jun 2017 19:45:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Jun 2017 19:45:46 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80AA94E4D4; Thu, 8 Jun 2017 19:45:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 80AA94E4D4 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 80AA94E4D4 Received: from tucnak.zalov.cz (ovpn-117-9.ams2.redhat.com [10.36.117.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 26AE31817E; Thu, 8 Jun 2017 19:45:48 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v58Jjk6O023628; Thu, 8 Jun 2017 21:45:47 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v58JjjQo023627; Thu, 8 Jun 2017 21:45:45 +0200 Date: Thu, 8 Jun 2017 21:45:45 +0200 From: Jakub Jelinek To: Uros Bizjak , Kirill Yukhin , Alexander Ivchenko Cc: Ilya Enkovich , GCC Patches Subject: [PATCH] Fix mpx testcases (Re: [CHKP] Fix for PR79990) Message-ID: <20170608194545.GE2154@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes On Tue, May 09, 2017 at 03:29:40PM +0200, Alexander Ivchenko wrote: > 2017-05-09 Alexander Ivchenko > > * gcc.target/i386/mpx/hard-reg-2-lbv.c: New test. > * gcc.target/i386/mpx/hard-reg-2-nov.c: New test. > * gcc.target/i386/mpx/hard-reg-2-ubv.c: New test. These tests fail for me on i686, without -msse2 there is no "xmm0" register one can use. The following patch fixes it, tested on x86_64-linux and i686-linux, ok for trunk? 2017-06-08 Jakub Jelinek * gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp" instead of "rsp" for -m32. * gcc.target/i386/mpx/hard-reg-2-lbv.c: Require sse2_runtime effective target, add -msse2 to dg-options. * gcc.target/i386/mpx/hard-reg-2-nov.c: Likewise. * gcc.target/i386/mpx/hard-reg-2-ubv.c: Likewise. Jakub --- gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c.jj 2015-03-10 16:56:41.000000000 +0100 +++ gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c 2017-06-08 21:37:00.357993146 +0200 @@ -13,7 +13,11 @@ int rd (int *p, int i) int mpx_test (int argc, const char **argv) { +#ifdef __x86_64__ register int *frame __asm__("rsp"); +#else + register int *frame __asm__("esp"); +#endif rd (frame, 1); return 0; --- gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c.jj 2017-06-08 17:53:25.000000000 +0200 +++ gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c 2017-06-08 21:37:23.772718716 +0200 @@ -1,6 +1,6 @@ -/* { dg-do run } */ +/* { dg-do run { target sse2_runtime } } */ /* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ #define SHOULDFAIL --- gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c.jj 2017-06-08 17:53:25.000000000 +0200 +++ gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c 2017-06-08 21:37:35.517581062 +0200 @@ -1,5 +1,5 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ +/* { dg-do run { target sse2_runtime } } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ #include "mpx-check.h" --- gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c.jj 2017-06-08 17:53:25.000000000 +0200 +++ gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c 2017-06-08 21:37:49.910412372 +0200 @@ -1,6 +1,6 @@ -/* { dg-do run } */ +/* { dg-do run { target sse2_runtime } } */ /* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ #define SHOULDFAIL