From patchwork Thu Nov 23 20:00:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 840890 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-467815-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="NVFnAM9G"; 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 3yjVYk4c2rz9s9Y for ; Fri, 24 Nov 2017 07:00:41 +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:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=LEHEQPWkIfibsIxz7aWArOy3WPulKU2R4QQHpTDY4PaKTceLhK pkT+KiZ5bOTwfi1YUM04H+lucr4ao8Iwq3rcogL8zwZSeqbWdAJqSo5kgU/7FLv7 Yq53QDUJEA5K5t+Gj5gBjs4Bf2m4S/uCid2RYH9aKi8usrYrFMtq0aRew= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=4cqEskC7xZvKB5ECevv4NyUxzXY=; b=NVFnAM9GC2ylp4UjU+Tv 1BEAy8kdaWtGCbcBpKPtORvySl4bsCS+yfxEdiW+cvcGl68YjUetAbLv/pArX3hZ jJEpEuyARG35+NNgweyslwXqBfc+rJUp/oyFay2j2JBDsAwt+Cf9blaXgVGXyKZ3 hb9ZxvX7kyDCuDL0ikoBTu8= Received: (qmail 87859 invoked by alias); 23 Nov 2017 20:00:31 -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 87614 invoked by uid 89); 23 Nov 2017 20:00:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No 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, KB_WAM_FROM_NAME_SINGLEWORD, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Nov 2017 20:00:13 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-02.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1eHxfM-0000YP-VC from Tom_deVries@mentor.com ; Thu, 23 Nov 2017 12:00:08 -0800 Received: from [172.30.72.35] (137.202.0.87) by svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 23 Nov 2017 20:00:05 +0000 To: GCC Patches CC: From: Tom de Vries Subject: [sh, committed] Wrap ASM_OUTPUT_ADDR_VEC_ELT in do {} while (0) Message-ID: <4b4ad5b6-a0d7-0ca9-7277-f998b6c07be3@mentor.com> Date: Thu, 23 Nov 2017 21:00:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) Hi, this patch wraps the sh version of ASM_OUTPUT_ADDR_VEC_ELT in "do {} while (0)". This allows the macro to be used in if-then-elses without curly braces. Build for sh. Committed as obvious. Thanks, - Tom [sh] Wrap ASM_OUTPUT_ADDR_VEC_ELT in do {} while (0) 2017-11-23 Tom de Vries * config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)". --- gcc/config/sh/sh.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index f5d80da..82699cd 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1754,12 +1754,13 @@ extern bool current_function_interrupt; } /* Output an absolute table element. */ -#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \ - if (! optimize || TARGET_BIGTABLE) \ - asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); \ - else \ - asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); - +#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \ + do { \ + if (! optimize || TARGET_BIGTABLE) \ + asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); \ + else \ + asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); \ + } while (0) /* A C statement to be executed just prior to the output of assembler code for INSN, to modify the extracted operands so