public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: dw <limegreensocks@yahoo.com>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: James Greenhalgh <james.greenhalgh@arm.com>,
	gcc-patches@gcc.gnu.org,  Joseph Myers <joseph@codesourcery.com>,
	Hans-Peter Nilsson <hp@bitrange.com>,
	Andrew Haley <aph@redhat.com>,
	 Richard Sandiford <rdsandiford@googlemail.com>,
	Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Subject: Re: [DOC PATCH] Rewrite docs for inline asm
Date: Tue, 29 Apr 2014 11:07:00 -0000	[thread overview]
Message-ID: <535F834E.2020800@yahoo.com> (raw)
In-Reply-To: <535D8CC3.2000100@yahoo.com>

While I'm waiting to hear back from Gerald about my responses to his 
other corrections, I have answered one question:

> How does the user know what is dialect #0?  Same for the others?
>
> When I originally wrote that section, I didn't know the answer (which 
> is why I left it vague).  Now I think I do, but I'd like someone to 
> confirm.  On my builds of gcc, the dialects are listed (in dialect 
> order) under "Known assembler dialects" in "gcc --target-help".  Can I 
> rely on this enough to put it in the docs? Is there some better source?

First of all, -masm is (currently) only supported on i386: 
http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html

Second, i386 -masm only supports two options: 
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html

So, the inline asm docs could just say "att" and "intel."  However, 
there's a difference between using "intel" and "att" as examples of how 
dialects work, and "hard coding" these names into this section as the 
list of available options.  I'm not keen on putting machine-specific 
info like this into an otherwise machine-neutral section.

Such being the case, I replaced the previously vague paragraph with:

GCC may support multiple assembler dialects (such as "att" or "intel") for
inline assembler. In builds that support this capability, the 
@option{-masm}
option controls which dialect GCC uses as its default. The 
hardware-specific
documentation for the @option{-masm} option contains the list of supported
dialects, as well as the default dialect if the option is not specified. 
This
information may be important to understand, since assembler code that works
correctly when compiled using one dialect will likely fail if compiled 
using
another.

This keeps the machine-specific details with the already 
machine-specific compile options.  While this option only applies to 
i386 currently, this text leaves the option open should some other 
platform make use of it in the future.

Unless someone says otherwise, I'm calling this question resolved.

dw

  reply	other threads:[~2014-04-29 10:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 19:48 dw
2014-04-08 23:17 ` Hans-Peter Nilsson
2014-04-09  5:02   ` Michael Matz
2014-04-09  5:29   ` dw
2014-04-10 21:44     ` dw
2014-04-13  1:47     ` Hans-Peter Nilsson
2014-04-13  9:42       ` dw
2014-04-14  0:46         ` Hans-Peter Nilsson
2014-04-14  6:25           ` dw
2014-04-23  3:44             ` Chung-Ju Wu
2014-04-23  5:52             ` Chung-Ju Wu
2014-04-25 15:45             ` James Greenhalgh
2014-04-25 15:59               ` Andrew Haley
2014-04-27  0:21               ` Gerald Pfeifer
2014-04-27  9:32                 ` Andrew Haley
2014-04-27 11:57                   ` Richard Kenner
2014-04-28  8:57                     ` Andrew Haley
2014-04-27 23:07                 ` dw
2014-04-29 11:07                   ` dw [this message]
2014-04-29 12:55                     ` Richard Earnshaw
2014-04-30  2:38                       ` dw
2014-05-05 20:23                   ` Gerald Pfeifer
2014-05-06  5:12                     ` dw
2014-05-07  5:47                       ` dw
2014-05-06  7:58                     ` Andrew Haley
2014-05-29 10:24                       ` Eric Botcazou
2014-05-29 11:51                         ` Andrew Haley
2014-05-29 21:18                           ` Eric Botcazou
2014-05-07 16:55                     ` Joseph S. Myers
2016-06-17 14:54 ` Andrew Haley

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=535F834E.2020800@yahoo.com \
    --to=limegreensocks@yahoo.com \
    --cc=aph@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=hp@bitrange.com \
    --cc=james.greenhalgh@arm.com \
    --cc=joseph@codesourcery.com \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    --cc=rdsandiford@googlemail.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).