From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 11408 invoked from network); 4 May 1999 10:59:25 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 4 May 1999 10:59:25 -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 GAA27962 for ; Tue, 4 May 1999 06:27:26 -0400 Received: (qmail 14056 invoked from network); 4 May 1999 10:27:24 -0000 Received: from dialpool0146-pri.voicenet.com (HELO voicenet.com) (209.71.85.46) by mail12.voicenet.com with SMTP; 4 May 1999 10:27:23 -0000 Sender: gat@mail.redhat.com Message-ID: <372ED97C.6F79A31C@voicenet.com> Date: Tue, 04 May 1999 07:26:52 -0400 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 Subject: Re: Alpha asm & Linux References: <21ECC6E090DCD21180D20000F809A18B07B643@EXCTAY-02> <372DBD12.BDCFF640@voicenet.com> <372DE314.F18A0469@paralleldata.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Wes Bauske wrote: > Uncle George wrote: > > > > If you snoop around in the kernel code, you can find > examples of how to inline asm in C code. > Yup, thats how u know that that particular ( __asm__) facility is available, as well as __inline__ , there is probably some more esoteric enhancements. > > > gat > > BTW assembler & UNIX has always been difficult > > > > In what way? Take for instance Opcodes. Ever try to figure out how to add "/U" or "/S" or "/V", i'm sure i can find more strangeness if i were to try all the opcodes! Old pdp11/ATT unix assembler jumps/goto's were either a forward ref of backward ref. I cant tell if branch labels is gonna be defined as a local symbol or global. Register conventions ( in __asm__ u gotta know that $9 is s0 ) Yes, frontend & backend "C" linkages. I generally take a "something.c" program with the same arglist an "C" compile with -S. THEN u also observe in the resultant .s file various assembler directives that does who knows what, and if u reserarch l( perservere ) ong enough u will find them based on "dec unix" Debugging - need i say more A particular peeve is that the opcode isn;t always printed out with an Alpha assembler opcode Try matching register conventions with "cc -S", and gdb > The calling interface is more painful > from what I've seen. By splitting the args between > regs and memory, one can make the code faster so > it's a tradeoff in complexity for speed. Also, by > inlining things inside C, Did u mean __asm__ rather than inlineing ? > you can avoid having to > code your own interface. Also, asm for the specific > machine has it's own quirks but no more so than > other machines. Other than that, its just managing > the stack. Dont forget the FP ( no not floating point ), I believe also GP gdb stack traces > What am I not seeing? > Let me also not forget that "please refer to the assembler docs" has always accompanied by most man references. When I see that i also notice a lack of complete assembler docs ( maybe i should say up-to-date assembler docs ). THis is not just endemic of ALPHA/LINUX but of most unix's