From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 11105 invoked from network); 29 Nov 1999 14:03:29 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 29 Nov 1999 14:03:29 -0000 Received: from voicenet.com (mail12.voicenet.com [207.103.0.6]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id JAA07531 for ; Mon, 29 Nov 1999 09:03:29 -0500 Received: (qmail 4933 invoked from network); 29 Nov 1999 14:03:27 -0000 Received: from dialpool0614-pri.voicenet.com (HELO voicenet.com) (209.71.86.79) by mail12.voicenet.com with SMTP; 29 Nov 1999 14:03:27 -0000 Sender: gat@mail.redhat.com Message-ID: <38427909.EBD24E2E@voicenet.com> Date: Mon, 29 Nov 1999 08:00:57 -0500 From: Uncle George Organization: Big-Endian X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686) MIME-Version: 1.0 To: axp-list@redhat.com CC: 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> <19991128110412.J4572@radicalmedia.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Try: asm( ".weak " "_some_extern_routine"); Mark Abene wrote: > 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 > > > > > > -- > 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