From patchwork Tue Oct 16 19:35:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitar Dimitrov X-Patchwork-Id: 984998 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=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-487681-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="GyHv4VcM"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dinux.eu header.i=@dinux.eu header.b="Kt8Nqx4A"; dkim-atps=neutral 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 42ZQYR5TMyz9s9h for ; Wed, 17 Oct 2018 06:36:59 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=WbL16t4ttB3va6gzwHhDDYV+sTZyJibA0/2f/cjZHoOTA2PNXLPn/ 5HGemnF8mKUppmVDGZ97RHLar2Jpd+TXqR3URMaxHvB1dcu0a1q4PCP3y3NWu0AU seSb/iP12xqX0Flo4xqOgVJxwi/4aRKd87ZE85Y7yQz/rwWqaJyza0= 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:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=OVNlTNHymML2uBlCPk7X0iGFdUA=; b=GyHv4VcMjrqIL7traK7B T7suYOjhwXiLeOcY6YLJlkJ0cSGE0tEbrV47shtzZcw3CEYjPNj83Z8b3DfGeGjU nNpFhNtgtwOYkkynEgJlDC3+VNF/U7BrTr84googzt/lP0CaYh2DIl5YOjq3ltwu isyt/N+P86wiIwkmVqrymiU= Received: (qmail 93945 invoked by alias); 16 Oct 2018 19:36:46 -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 93795 invoked by uid 89); 16 Oct 2018 19:36:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*eu, H*Ad:D*eu, HX-OutGoing-Spam-Status:score, D*eu X-HELO: server28.superhosting.bg Received: from server28.superhosting.bg (HELO server28.superhosting.bg) (217.174.156.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Oct 2018 19:36:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HcY76O/mfKoIHB8zEjpMpsujjQbCywZmB/294vK6di4=; b=Kt8Nqx4AoifDg2e3gb7r4UwJp+ hRRSVeqLZpBDhLWGauOobWydOidgOSjW0RTLo150HonZHWWJQtvXviEZfksgQJ8FRAGPquB90pMeT bexO+Z3VJ2krkBRexxB1h0hkB1BVHER2Z0UPjq3+dZ54n+uyXJB0k2Ito0y9McFlyssH+UiFt1Xsl Sa2FmVCvcSZqov3vGRY2txCyz6huJ24+4s9OmqTKKPH/tcCWQFdZu3O8s3a087lKD0/zLyKf2hXIc nurjkeili45QlhkvxvgCdlnGBeGGGknWb6GI6VRnYIpiXS87JPttXmluMAbkaQWG0oY0GcxHvKFyq 73/FkKEg==; Received: from [95.87.234.74] (port=55218 helo=localhost.localdomain) by server28.superhosting.bg with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gCV8x-0007tG-Uf; Tue, 16 Oct 2018 22:36:42 +0300 From: Dimitar Dimitrov To: gcc-patches@gcc.gnu.org Cc: Dimitar Dimitrov Subject: [PATCH v5 04/10] testsuite: Add check for overflowed IMEM region to testsuite Date: Tue, 16 Oct 2018 22:35:49 +0300 Message-Id: <20181016193555.25143-5-dimitar@dinux.eu> In-Reply-To: <20181016193555.25143-1-dimitar@dinux.eu> References: <20181016193555.25143-1-dimitar@dinux.eu> X-OutGoing-Spam-Status: No, score=-1.0 X-IsSubscribed: yes PRU architecture supports maximum 256k program memory (IMEM). Some GCC test cases manage to produce executables bigger than that. gcc/testsuite/ChangeLog: 2018-10-08 Dimitar Dimitrov * lib/gcc-dg.exp: Bail on region overflow for tiny targets. * lib/target-utils.exp: Ditto. * lib/target-supports.exp: Declare PRU target as tiny. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/lib/gcc-dg.exp | 5 +++++ gcc/testsuite/lib/target-supports.exp | 5 +++++ gcc/testsuite/lib/target-utils.exp | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index c33a50c0b13..59c10016014 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -394,6 +394,11 @@ proc gcc-dg-prune { system text } { return "::unsupported::memory full" } + if { [regexp "(^|\n)\[^\n\]*: region \[^\n\]* overflowed" $text] + && [check_effective_target_tiny] } { + return "::unsupported::memory full" + } + # Likewise, if we see ".text exceeds local store range" or # similar. if {[string match "spu-*" $system] && \ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 8caea35edff..13e32377885 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8377,6 +8377,11 @@ proc check_effective_target_tiny {} { && [check_effective_target_avr_tiny] } { return 1 } + # PRU Program Counter is 16-bits, and trampolines are not supported. + # Hence directly declare as a tiny target. + if [istarget pru-*-*] { + return 1 + } return 0 }] } diff --git a/gcc/testsuite/lib/target-utils.exp b/gcc/testsuite/lib/target-utils.exp index bd39cc5bc79..732a1827a02 100644 --- a/gcc/testsuite/lib/target-utils.exp +++ b/gcc/testsuite/lib/target-utils.exp @@ -35,6 +35,10 @@ proc ${tool}_check_unsupported_p { output } { && [check_effective_target_tiny] } { return "memory full" } + if { [regexp "(^|\n)\[^\n\]*: region \[^\n\]* overflowed" $output] + && [check_effective_target_tiny] } { + return "memory full" + } if { [istarget spu-*-*] && \ [string match "*exceeds local store*" $output] } {