From: Steve Graegert <graegerts@gmail.com>
To: Ankit Jain <ankitjain1580@yahoo.com>
Cc: linux prg <linux-c-programming@vger.kernel.org>
Subject: Re: __asm__
Date: Tue, 29 Mar 2005 09:40:17 +0200 [thread overview]
Message-ID: <6a00c8d505032823401b82ce07@mail.gmail.com> (raw)
In-Reply-To: <20050329064829.52787.qmail@web52908.mail.yahoo.com>
On Mon, 28 Mar 2005 22:48:28 -0800 (PST), Ankit Jain
<ankitjain1580@yahoo.com> wrote:
> can anybody tell me when we write like this while
> writing asm construct then what does underscore mean?
>
> __asm__("construct")
Underscores in those contexts usually represent a lanugage extension
and are used to make clear that this contruct may not be part of the
language standard, although a lot of other C compiler may implement
it. GNU C knows about a lot of other extensions like
__attribute__((always_inline)) that is used for function inlining.
> does it have any connection wit volatile?
Yes, it has. It prevents the compiler from modifying the inline asm
code, like reordering of statements and the like. This makes sure,
your code is handled by the compiler as is, so you will be using
__volatile__ most of the time.
Kind Regards
\Steve
--
Steve Graegert <graegerts@gmail.com> // Anyone who considers arithmetical
Software Consultant {C/C++ && .NET} // methods of producing random digits
Mobile: +49 (176) 21 24 88 69 // is, of course, in a state of sin.
Voice: +49 (9131) 71 26 40 9 // -- JOHN VON NEUMANN (1951)
next prev parent reply other threads:[~2005-03-29 7:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-29 6:48 __asm__ Ankit Jain
2005-03-29 7:40 ` Steve Graegert [this message]
2005-04-02 13:18 ` __asm__ Glynn Clements
-- strict thread matches above, loose matches on Subject: below --
2005-03-28 4:44 __asm__ Ankit Jain
2005-03-30 5:29 ` __asm__ Daniel Souza
2001-05-23 6:54 __asm__ Blesson Paul
2001-05-23 7:38 ` __asm__ David Howells
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=6a00c8d505032823401b82ce07@mail.gmail.com \
--to=graegerts@gmail.com \
--cc=ankitjain1580@yahoo.com \
--cc=linux-c-programming@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.