From patchwork Fri Dec 12 20:18:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 420674 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 5FF4B14009B for ; Sat, 13 Dec 2014 07:18: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:subject:in-reply-to:references:date:message-id:mime-version :content-type; q=dns; s=default; b=kaprQiyWwb7itDw60Qza5X/IRRaBX rba36NjgujktKC6NC1qj3N9WM3sKRDnk2LHnWDBRFki99Pg1HCN0dIC8++c//1YM /MvtfHz1+pm27DaK2ceyIJGY8Xwe2sYtmYf/DI7Nx2SNhDTS0Bu9hST1YVMvB7Z6 UCRO5Q3vzK47Fw= 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:subject:in-reply-to:references:date:message-id:mime-version :content-type; s=default; bh=jisp+1Likg7Bg66vkMFCfCNLtUE=; b=nQW m5o1+4yPp2cNF4rrmk5yrb4U8xKv8tloORR+//3T4OCOZ+WNrPO0NKBdd60tR2FH HblAz7xkXDeVRhhgNV4V2U2AZq9/NvluZhIWABzdhsgbcbZP4uZJ+m4k1cd9naJu xU0YxO6FcO5Y/HlVzWdnSCP43LcPaphKiZtQGGqI= Received: (qmail 29162 invoked by alias); 12 Dec 2014 20:18:52 -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 29148 invoked by uid 89); 12 Dec 2014 20:18:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 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; Fri, 12 Dec 2014 20:18:50 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XzWfm-0000iK-Be from Thomas_Schwinge@mentor.com ; Fri, 12 Dec 2014 12:18:46 -0800 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Fri, 12 Dec 2014 20:18:44 +0000 From: Thomas Schwinge To: Bernd Schmidt , Jeff Law , GCC Patches Subject: Re: The nvptx port [10/11+] Target files In-Reply-To: <5460E5AD.6060502@codesourcery.com> References: <54451994.9070209@codesourcery.com> <54451D57.5050803@codesourcery.com> <5447F0E1.7080906@redhat.com> <544FAE8B.5010906@codesourcery.com> <545179C6.4030406@redhat.com> <5460E5AD.6060502@codesourcery.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Fri, 12 Dec 2014 21:18:35 +0100 Message-ID: <877fxw4o6c.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Mon, 10 Nov 2014 17:19:57 +0100, Bernd Schmidt wrote: > I've now committed it, in the following form. > --- /dev/null > +++ b/gcc/config/nvptx/nvptx.h > @@ -0,0 +1,356 @@ > +#define ASM_OUTPUT_ALIGN(FILE, POWER) Committed to trunk in r218689: commit 61f8a1bd770ded96fcff88f3cbc426a23c413992 Author: tschwinge Date: Fri Dec 12 20:14:10 2014 +0000 nvptx: Define valid ASM_OUTPUT_ALIGN. gcc/ * config/nvptx/nvptx.h (ASM_OUTPUT_ALIGN): Define as a C statment. gcc/doc/tm.texi:@defmac ASM_OUTPUT_ALIGN (@var{stream}, @var{power}) gcc/doc/tm.texi-A C statement to output to the stdio stream @var{stream} an assembler gcc/doc/tm.texi-command to advance the location counter to a multiple of 2 to the gcc/doc/tm.texi-@var{power} bytes. @var{power} will be a C expression of type @code{int}. gcc/doc/tm.texi-@end defmac gcc/config/nvptx/nvptx.h:#define ASM_OUTPUT_ALIGN(FILE, POWER) "Empty" is not a C statement, and so in code such as: gcc/dwarf2out.c- if (lsda_encoding == DW_EH_PE_aligned) gcc/dwarf2out.c: ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE)); gcc/dwarf2out.c- dw2_asm_output_data (size_of_encoded_value (lsda_encoding), 0, gcc/dwarf2out.c- "Language Specific Data Area (none)"); gcc/varasm.c- if (align > BITS_PER_UNIT) gcc/varasm.c: ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT)); gcc/varasm.c- assemble_variable_contents (decl, name, dont_output_data); gcc/varasm.c- if (align > 0) gcc/varasm.c: ASM_OUTPUT_ALIGN (asm_out_file, align); gcc/varasm.c- gcc/varasm.c- targetm.asm_out.internal_label (asm_out_file, "LTRAMP", 0); gcc/varasm.c- if (align > BITS_PER_UNIT) gcc/varasm.c: ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT)); gcc/varasm.c- assemble_constant_contents (exp, XSTR (symbol, 0), align); ..., GCC warns: [...]/source-gcc/gcc/dwarf2out.c: In function 'void output_fde(dw_fde_ref, bool, bool, char*, int, char*, bool, int)': [...]/source-gcc/gcc/dwarf2out.c:665:3: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE)); ^ [...]/source-gcc/gcc/varasm.c: In function 'void assemble_variable(tree, int, int, int)': [...]/source-gcc/gcc/varasm.c:2217:2: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT)); ^ [...]/source-gcc/gcc/varasm.c: In function 'rtx_def* assemble_trampoline_template()': [...]/source-gcc/gcc/varasm.c:2603:5: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] ASM_OUTPUT_ALIGN (asm_out_file, align); ^ [...]/source-gcc/gcc/varasm.c: In function 'void output_constant_def_contents(rtx)': [...]/source-gcc/gcc/varasm.c:3413:2: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT)); ^ Also, "use" the values, to get rid of that one: [...]/source-gcc/gcc/final.c: In function 'rtx_insn* final_scan_insn(rtx_insn*, FILE*, int, int, int*)': [...]/source-gcc/gcc/final.c:2450:12: warning: variable 'log_align' set but not used [-Wunused-but-set-variable] int log_align; ^ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218689 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/config/nvptx/nvptx.h | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) Grüße, Thomas diff --git gcc/ChangeLog gcc/ChangeLog index 689c4fd..e5de2c6 100644 --- gcc/ChangeLog +++ gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-12-12 Thomas Schwinge + + * config/nvptx/nvptx.h (ASM_OUTPUT_ALIGN): Define as a C statment. + 2014-12-12 Vladimir Makarov PR target/64110 diff --git gcc/config/nvptx/nvptx.h gcc/config/nvptx/nvptx.h index c222375..5f08ba7 100644 --- gcc/config/nvptx/nvptx.h +++ gcc/config/nvptx/nvptx.h @@ -281,9 +281,17 @@ struct GTY(()) machine_function } \ while (0) -#define ASM_OUTPUT_ALIGN(FILE, POWER) +#define ASM_OUTPUT_ALIGN(FILE, POWER) \ + do \ + { \ + (void) (FILE); \ + (void) (POWER); \ + } \ + while (0) + #define ASM_OUTPUT_SKIP(FILE, N) \ nvptx_output_skip (FILE, N) + #undef ASM_OUTPUT_ASCII #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \ nvptx_output_ascii (FILE, STR, LENGTH);