From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: scm_remember_upto_here asm volatile Date: Tue, 26 Aug 2003 09:48:10 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87r8398fk5.fsf@zip.com.au> References: <874r4186ty.fsf@zip.com.au> <87znll48wr.fsf@zagadka.ping.de> <87he7rwzox.fsf@zip.com.au> <87znl1ocrn.fsf@zagadka.ping.de> <878ypx2rk3.fsf@zip.com.au> <3F4742BD.9090704@dirk-herrmanns-seiten.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1061869138 22980 80.91.224.253 (26 Aug 2003 03:38:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2003 03:38:58 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 26 05:38:57 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19rUfY-0004Qi-00 for ; Tue, 26 Aug 2003 05:38:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19rUaI-00026N-Us for guile-devel@m.gmane.org; Mon, 25 Aug 2003 23:33:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19rU0e-0000Oq-VG for guile-devel@gnu.org; Mon, 25 Aug 2003 22:56:40 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19rTrb-00040D-IT for guile-devel@gnu.org; Mon, 25 Aug 2003 22:47:50 -0400 Original-Received: from [61.8.0.36] (helo=snoopy.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.20) id 19rTrX-0003tw-8T for guile-devel@gnu.org; Mon, 25 Aug 2003 22:47:15 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.4) with ESMTP id h7PNmO0J013671; Tue, 26 Aug 2003 09:48:25 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h7PNmOkv004562; Tue, 26 Aug 2003 09:48:24 +1000 (EST) Original-Received: from localhost (ppp74.dyn228.pacific.net.au [203.143.228.74]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h7PNmLos024981; Tue, 26 Aug 2003 09:48:22 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19rR4G-0000uu-00; Tue, 26 Aug 2003 09:48:12 +1000 Original-To: Dirk Herrmann Mail-Copies-To: never In-Reply-To: <3F4742BD.9090704@dirk-herrmanns-seiten.de> (Dirk Herrmann's message of "Sat, 23 Aug 2003 12:32:29 +0200") User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2708 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2708 Dirk Herrmann writes: > > would you mind to add an explanation of the syntax of that construct? > For example, what does the "g" mean? Since we don't have many asm > instructions in guile, it is fair to assume that most of the > developers don't know about the exact meaning of that construct. How about the tweak below. No doubt the gcc manual describes the overall syntax better than a bit of a comment could do, the aim I guess would be just to cover the reasoning for why this form does what's wanted in this context. /* In GCC we can force a reference to an SCM with a little do-nothing asm, avoiding 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 similarly. __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, it allows any memory, general register, or immediate operand. The actual asm syntax which comes out for it doesn't matter, we don't want to use it, just ensure the operand is still alive. */ _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel