From patchwork Tue Feb 4 08:22:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1233185 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-518845-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=BDi1fWTs; 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 48Bd3k21XczB3vh for ; Tue, 4 Feb 2020 19:22:40 +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 :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=BwqToBWKQd0nAYsKEtF486JCGONhLfYczoe9xmI24TI3zUePic kQTwvcPtxl7mBuFua8fQ+y0RVTRS/9J+udhEes/KFXTX4XDT5pmRG68webQ53MEN UV1oOUyVa8JmNd9aV6LEim7JRl9dTvH/zgLkzk0bcVDgqG3fLKgZUj6L4= 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 :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=0pQKuFQDedAZHSUhF9pIQvNiAgs=; b=BDi1fWTst/9iRE0o42/A /8FD9dhDw4V3QNLraYGtnk2PV3v07PNi5uzumohn8bCJ6i7iFEjJCy4q8Y/jIPQ6 QcYqkvumQTP544hAmmqbS3Mr/1g21hX7v3IZ6OE0+idtOvPYSyy1hgOVX40CpT3T peQffG0nRlyYMCOuqsUIGA8= Received: (qmail 12364 invoked by alias); 4 Feb 2020 08:22: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 12355 invoked by uid 89); 4 Feb 2020 08:22:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Feb 2020 08:22:30 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 65591AF3F; Tue, 4 Feb 2020 08:22:28 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH][OBVIOUS] Fix release checking build of ARM. To: gcc-patches@gcc.gnu.org Cc: Stam Markianos-Wright Message-ID: <1296f567-4214-5201-774b-d3c46530bd57@suse.cz> Date: Tue, 4 Feb 2020 09:22:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 X-IsSubscribed: yes Hi. It's a move of code outside of seltests that are not enabled with --enable-checking=release. @Stam: Can you please take a look at observer warnings related to your code: /home/marxin/Programming/gcc2/gcc/config/arm/arm.c: In function ‘const char* arm_gen_far_branch(rtx_def**, int, const char*, const char*)’: /home/marxin/Programming/gcc2/gcc/config/arm/arm.c:33089:38: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 128 [-Wformat-truncation=] 33089 | snprintf (buffer, sizeof (buffer), "%s%s", branch_format , label_ptr); | ^~~~~~ /home/marxin/Programming/gcc2/gcc/config/arm/arm.c:33089:12: note: ‘snprintf’ output 1 or more bytes (assuming 256) into a destination of size 128 33089 | snprintf (buffer, sizeof (buffer), "%s%s", branch_format , label_ptr); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/marxin/Programming/gcc2/gcc/config/arm/arm.c:33092:38: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 111 and 121 [-Wformat-truncation=] 33092 | snprintf (buffer, sizeof (buffer), "b\t%%l0%d\n%s:", pos_label, label_ptr); | ^~~~~~~~~~~~~~~~ /home/marxin/Programming/gcc2/gcc/config/arm/arm.c:33092:12: note: ‘snprintf’ output between 9 and 274 bytes into a destination of size 128 33092 | snprintf (buffer, sizeof (buffer), "b\t%%l0%d\n%s:", pos_label, label_ptr); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Martin gcc/ChangeLog: 2020-02-04 Martin Liska * config/arm/arm.c (arm_gen_far_branch): Move the function outside of selftests. --- gcc/config/arm/arm.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index b5ae7e3e9ce..fe3bc675b42 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -33041,6 +33041,26 @@ arm_run_selftests (void) } } /* Namespace selftest. */ +#undef TARGET_RUN_TARGET_SELFTESTS +#define TARGET_RUN_TARGET_SELFTESTS selftest::arm_run_selftests +#endif /* CHECKING_P */ + +/* Worker function for TARGET_MD_ASM_ADJUST, while in thumb1 mode. + Unlike the arm version, we do NOT implement asm flag outputs. */ + +rtx_insn * +thumb1_md_asm_adjust (vec &outputs, vec &/*inputs*/, + vec &constraints, + vec &/*clobbers*/, HARD_REG_SET &/*clobbered_regs*/) +{ + for (unsigned i = 0, n = outputs.length (); i < n; ++i) + if (strncmp (constraints[i], "=@cc", 4) == 0) + { + sorry ("asm flags not supported in thumb1 mode"); + break; + } + return NULL; +} /* Generate code to enable conditional branches in functions over 1 MiB. Parameters are: @@ -33075,27 +33095,6 @@ arm_gen_far_branch (rtx * operands, int pos_label, const char * dest, return ""; } -#undef TARGET_RUN_TARGET_SELFTESTS -#define TARGET_RUN_TARGET_SELFTESTS selftest::arm_run_selftests -#endif /* CHECKING_P */ - -/* Worker function for TARGET_MD_ASM_ADJUST, while in thumb1 mode. - Unlike the arm version, we do NOT implement asm flag outputs. */ - -rtx_insn * -thumb1_md_asm_adjust (vec &outputs, vec &/*inputs*/, - vec &constraints, - vec &/*clobbers*/, HARD_REG_SET &/*clobbered_regs*/) -{ - for (unsigned i = 0, n = outputs.length (); i < n; ++i) - if (strncmp (constraints[i], "=@cc", 4) == 0) - { - sorry ("asm flags not supported in thumb1 mode"); - break; - } - return NULL; -} - struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-arm.h"