From: Kevin Ryde <user42@zip.com.au>
Subject: Re: scm_remember_upto_here asm volatile
Date: Thu, 28 Aug 2003 09:49:09 +1000 [thread overview]
Message-ID: <877k4yoe4q.fsf@zip.com.au> (raw)
In-Reply-To: <3F4C3365.60507@dirk-herrmanns-seiten.de> (Dirk Herrmann's message of "Wed, 27 Aug 2003 06:28:21 +0200")
Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> writes:
>
> Well, I still don't know what the "g" means,
Oh, well, it's pretty easy actually, a string for the asm instruction,
then output operands and input operands, with operand constraints
saying what register or memory etc is acceptable. In this case "g" (x)
means an input operand, located anywhere.
> changes in GCC to that syntax,
I wouldn't be too worried about that, asm has been a documented
feature for a long time and unlikely to change in incompatible ways.
It certainly goes back to gcc 2.7.2 in this form, and probably
earlier.
In any case I amended to:
/* In GCC we can force a reference to an SCM by making it an input to an
empty asm. This avoids the code size and slowdown of an actual function
call. Unfortunately there doesn't seem to be any way to do the varargs
scm_remember_upto_here like this.
__volatile__ ensures nothing will be moved across the asm, and it won't
be optimized away (or only if proved unreachable). Constraint "g" can be
used on all processors and allows any memory or general register (or
immediate) operand. The actual asm syntax doesn't matter, we don't want
to use it, just ensure the operand is still alive. See "Extended Asm" in
the GCC manual for more. */
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
prev parent reply other threads:[~2003-08-27 23:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-11 22:19 scm_remember_upto_here asm volatile Kevin Ryde
2003-05-17 20:26 ` Marius Vollmer
2003-05-19 0:24 ` Kevin Ryde
2003-06-01 18:47 ` Marius Vollmer
2003-06-01 19:29 ` Mikael Djurfeldt
2003-08-13 21:09 ` Kevin Ryde
2003-08-23 10:32 ` Dirk Herrmann
2003-08-25 23:48 ` Kevin Ryde
2003-08-27 4:28 ` Dirk Herrmann
2003-08-27 23:49 ` Kevin Ryde [this message]
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877k4yoe4q.fsf@zip.com.au \
--to=user42@zip.com.au \
/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).