From patchwork Thu Aug 16 04:49:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitar Dimitrov X-Patchwork-Id: 958093 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-483755-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="vYHifwlx"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dinux.eu header.i=@dinux.eu header.b="Y/up902t"; 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 41rYn00jFTz9s4c for ; Thu, 16 Aug 2018 14:50:43 +1000 (AEST) 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=azB0mpT+Q0rOvbvNHZDUn2EoRUxqLgAKSVkxZJYvKLgfvbs53X70x QmH52E01bHjxDcKqYvJ2dCXqu4cSa2omGSrk3f0YLZC9tLqLDjWdaGI3yiCfX0kb wE54S/k3vAKu8QKRrJG1BraeYBLu6P09o7y1SFDSCIvAFssRpFIRZA= 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=izeO9qHf7YfrhSE5N74OM2Xknm0=; b=vYHifwlxebSFMYNoOCpi yM03emir9zV+TG/jcBQyV3tpukCndxH4TMuKjEI0viyY6M4le8cs9QXWWyv7/lRT FOiKK3x3F1Rfd23tVAeyLi5eGBygGMz1F/fhyKjuaKP17r69+xTvMc1Y93fn3xbg gEiMdsAwys0Tlp3oqxgZo6U= Received: (qmail 98309 invoked by alias); 16 Aug 2018 04:50:32 -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 98142 invoked by uid 89); 16 Aug 2018 04:50:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.5 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=istarget, D*eu, HX-Get-Message-Sender-Via:sk:authent X-HELO: smtp-out1.superhosting.bg Received: from smtp-out1.superhosting.bg (HELO smtp-out1.superhosting.bg) (91.196.127.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Aug 2018 04:50:29 +0000 Received: from server28.superhosting.bg ([193.107.36.199]) by smtp-out1.superhosting.bg with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1fqAEt-0004dR-7m for gcc-patches@gcc.gnu.org; Thu, 16 Aug 2018 07:50:27 +0300 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=wRg+mLMGpMijQ3bjthwa4k/FwKIVhtFMo0uuaYDvUtA=; b=Y/up902tI2SNVE4a852YIgrUzU XXYvPyBCD2QjcaBBzoxHzOyKdcQGdqWSmwu9M2GjfI32sa/JwboaGfV2/w4AXJu5m2bz2nzbO8fGg MUd5FWZXgycBXqTz+4xAYzevtwbe3aDlow5w0iC3TxNd0VQo1vNcYIGMTdhyKE+L9D3jsI1YYYkc3 ROduog2b0e4apKEwVoI9lsXh3shReQykqNdRPjKp3Jw3Flb/7yh5hoNLaQlBtozEhtoytrW64NdUk vqO3Xr/oHv9XOLUFb3gFliXxsnRElp4Znqhm5/SuYMOGIE3UKpRzJZs3FstY2AY+AFtGuz+Y8xKEx bg3LWkxA==; Received: from [95.87.234.74] (port=43018 helo=localhost.localdomain) by server28.superhosting.bg with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fqAEq-0004j3-Vy; Thu, 16 Aug 2018 07:50:27 +0300 From: Dimitar Dimitrov To: gcc-patches@gcc.gnu.org Cc: Dimitar Dimitrov Subject: [PATCH v3 04/10] testsuite: Add check for overflowed IMEM region to testsuite Date: Thu, 16 Aug 2018 07:49:53 +0300 Message-Id: <20180816044959.12320-5-dimitar@dinux.eu> In-Reply-To: <20180816044959.12320-1-dimitar@dinux.eu> References: <20180816044959.12320-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-07-27 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 f5e6bef5dd9..c26d1c73aa0 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -392,6 +392,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 60105eb9fd7..5299aaefcc3 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8833,6 +8833,11 @@ proc check_effective_target_tiny {} { && [check_effective_target_avr_tiny] } { set et_target_tiny_saved 1 } + # PRU Program Counter is 16-bits, and trampolines are not supported. + # Hence directly declare as a tiny target. + if [istarget pru-*-*] { + set et_target_tiny_saved 1 + } } return $et_target_tiny_saved 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] } {