public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Bernd Schmidt <bernds@codesourcery.com>,
	Jeff Law <law@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: The nvptx port [10/11+] Target files
Date: Fri, 12 Dec 2014 20:18:00 -0000	[thread overview]
Message-ID: <877fxw4o6c.fsf@kepler.schwinge.homeip.net> (raw)
In-Reply-To: <5460E5AD.6060502@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 5116 bytes --]

Hi!

On Mon, 10 Nov 2014 17:19:57 +0100, Bernd Schmidt <bernds@codesourcery.com> 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 <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
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(-)

diff --git gcc/ChangeLog gcc/ChangeLog
index 689c4fd..e5de2c6 100644
--- gcc/ChangeLog
+++ gcc/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-12  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* config/nvptx/nvptx.h (ASM_OUTPUT_ALIGN): Define as a C statment.
+
 2014-12-12  Vladimir Makarov  <vmakarov@redhat.com>
 
 	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);


Grüße,
 Thomas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

  parent reply	other threads:[~2014-12-12 20:18 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 14:19 The nvptx port [0/11+] Bernd Schmidt
2014-10-20 14:21 ` The nvptx port [1/11+] indirect jumps Bernd Schmidt
2014-10-21 18:29   ` Jeff Law
2014-10-21 21:03     ` Bernd Schmidt
2014-10-21 21:30       ` Jakub Jelinek
2014-10-21 21:37         ` Bernd Schmidt
2014-10-22  8:21           ` Richard Biener
2014-10-22  8:34             ` Jakub Jelinek
2014-10-22  8:37             ` Thomas Schwinge
2014-10-22 10:03               ` Richard Biener
2014-10-22 10:32                 ` Jakub Jelinek
2014-11-04 15:35   ` Bernd Schmidt
2014-11-04 15:43     ` Richard Henderson
2014-10-20 14:22 ` The nvptx port [2/11+] No register allocation Bernd Schmidt
2014-10-20 14:24 ` Bernd Schmidt
2014-10-21 18:36   ` Jeff Law
2014-10-20 14:24 ` The nvptx port [3/11+] Struct returns Bernd Schmidt
2014-10-21 18:41   ` Jeff Law
2014-10-20 14:27 ` The nvptx port [5/11+] Variable declarations Bernd Schmidt
2014-10-21 18:44   ` Jeff Law
2014-10-20 14:27 ` The nvptx port [4/11+] Post-RA pipeline Bernd Schmidt
2014-10-21 18:42   ` Jeff Law
2024-06-28 15:07   ` Document 'pass_postreload' vs. 'pass_late_compilation' (was: The nvptx port [4/11+] Post-RA pipeline) Thomas Schwinge
2014-10-20 14:31 ` The nvptx port [6/11+] Pseudo call args Bernd Schmidt
2014-10-21 18:56   ` Jeff Law
2014-10-20 14:32 ` The nvptx port [8/11+] Write undefined decls Bernd Schmidt
2014-10-21 22:07   ` Jeff Law
2014-10-21 22:30     ` Bernd Schmidt
2014-10-22 18:23       ` Jeff Law
2014-11-05 12:05         ` Bernd Schmidt
2014-11-05 20:05           ` Jeff Law
2014-10-20 14:32 ` The nvptx port [7/11+] Inform the port about call arguments Bernd Schmidt
2014-10-21 21:25   ` Jeff Law
2014-10-21 21:33     ` Bernd Schmidt
2014-10-21 21:55       ` Jeff Law
2014-10-21 22:16         ` Bernd Schmidt
2014-10-22 18:23           ` Jeff Law
2014-10-28 14:57             ` Bernd Schmidt
2014-10-29 23:42               ` Jeff Law
2014-10-20 14:35 ` The nvptx port [9/11+] Epilogues Bernd Schmidt
2014-10-21 22:08   ` Jeff Law
2014-10-20 14:50 ` The nvptx port [10/11+] Target files Bernd Schmidt
2014-10-22 18:12   ` Jeff Law
2014-10-28 15:10     ` Bernd Schmidt
2014-10-29 23:51       ` Jeff Law
2014-10-30  2:53         ` Bernd Schmidt
2014-10-30  3:09           ` Jeff Law
2014-11-10 16:33         ` Bernd Schmidt
2014-11-10 20:06           ` Jakub Jelinek
2014-11-10 20:37             ` H.J. Lu
2014-11-10 20:40             ` H.J. Lu
2014-11-10 20:42               ` Mike Stump
2014-12-12 20:18           ` Thomas Schwinge [this message]
2014-12-23 18:51           ` nvptx-tools and nvptx-newlib (was: The nvptx port [10/11+] Target files) Thomas Schwinge
2015-02-02 15:33             ` Thomas Schwinge
2015-02-04  9:43               ` Jakub Jelinek
2015-02-18  8:50                 ` Thomas Schwinge
2015-02-18  9:03                   ` Jakub Jelinek
2015-07-08 15:03                   ` [nvptx offloading] Only 64-bit configurations are currently supported (was: nvptx-tools and nvptx-newlib) Thomas Schwinge
2015-07-14 20:10                     ` [nvptx offloading] Only 64-bit configurations are currently supported Thomas Schwinge
2015-07-14 20:25                       ` Richard Biener
2021-01-14 18:18                     ` [nvptx libgomp plugin] Build only in supported configurations (was: [nvptx offloading] Only 64-bit configurations are currently supported) Thomas Schwinge
2021-03-04  8:52                       ` [committed] libgomp: Use sizeof(void*) based checks instead of looking through $CC $CFLAGS for -m32/-mx32 Jakub Jelinek
2021-03-22 11:24                         ` Thomas Schwinge
2014-11-04 16:48       ` The nvptx port [10/11+] Target files Richard Henderson
2014-11-04 16:55         ` Bernd Schmidt
2014-11-05 13:07           ` Bernd Schmidt
2014-10-20 14:58 ` The nvptx port [11/11] More tools Bernd Schmidt
2014-10-21  0:16   ` Joseph S. Myers
2014-10-22 20:40   ` Jeff Law
2014-10-22 21:16     ` Bernd Schmidt
2014-10-24 19:52       ` Jeff Law
2014-10-31 21:04   ` Jeff Law
     [not found]     ` <54542050.6010908@codesourcery.com>
2014-11-03 21:49       ` Jeff Law
2014-10-21  8:23 ` The nvptx port [0/11+] Richard Biener
2014-10-21 10:57   ` Bernd Schmidt
2014-10-21 11:27     ` Richard Biener
2014-10-21  9:17 ` Jakub Jelinek
2014-10-21 11:19   ` Bernd Schmidt
2014-11-12 12:36 ` Richard Biener
2014-11-12 21:39   ` Jeff Law
2015-02-18  7:48 ` nvptx-none: Define empty GOMP_SELF_SPECS (was: The nvptx port [0/11+]) Thomas Schwinge
2015-02-18  8:01 ` The nvptx port [0/11+] Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fxw4o6c.fsf@kepler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=bernds@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).