From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 16351 invoked from network); 28 Nov 1999 15:57:31 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 28 Nov 1999 15:57:31 -0000 Received: from radicalmedia.com (eel.radicalmedia.com [204.254.246.9]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id KAA30679 for ; Sun, 28 Nov 1999 10:57:30 -0500 Received: (from phiber@localhost) by radicalmedia.com (8.8.6/8.8.6) id LAA09959; Sun, 28 Nov 1999 11:04:12 -0500 (EST) Message-ID: <19991128110412.J4572@radicalmedia.com> Date: Sun, 28 Nov 1999 11:04:12 -0500 From: Mark Abene To: axp-list@redhat.com, alpha-c@mars.iol.unh.edu Subject: Re: ccc and inline assembly... References: <19991128044211.G4572@radicalmedia.com> <3840F56A.28FC170D@voicenet.com> <3841244B.2ACF6EA6@voicenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <3841244B.2ACF6EA6@voicenet.com>; from Uncle George on Sun, Nov 28, 1999 at 07:47:08AM -0500 Maybe you could enlighten us on what you're trying to accomplish with inline assembly, and I'll try to be more helpful. :) I can't say I've tried copying /usr/include/machine/pal.h from DU, but I somehow doubt the GNU assembler in linux would know what a "PAL_callsys" was supposed to do. We don't have the benefit of DU's assembler macros. But for simple user functions, a #define of an asm block of instructions should work fine, as illustrated in the third example in c_asm.h. I'm guessing you're trying to do something more complex? -Mark On Sun, Nov 28, 1999 at 07:47:08AM -0500, Uncle George wrote: > Tried the example from c-asm.h. No :-/. > even with that i cannot do "asm ( ".weak " "__sigprocmask"); > i cannot tell if .weak is a boo boo, or whatever options there are. > > #include > #if 0 > #include > #endif > > #define QUOTE(s) #s > #define STR(s) QUOTE(s) > #define WRUNIQ(uniq) asm("call_pal " STR(PAL_wruniq), (uniq)) > #define RDUNIQ() asm("call_pal " STR(PAL_rduniq)) > > main() > { > int i = 123456; > int j; > > WRUNIQ(i); > > j = RDUNIQ(); > > printf("i=%d; j=%d\n", i, j); > } > ~ > > > Uncle George wrote: > > > So, i suppose that there is no docs for it. > > > > gat > > > > Mark Abene wrote: > > > > > To whoever asked (I think it was Uncle George), the syntax for inline assembly > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com > >