From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 28457 invoked from network); 4 May 1999 19:44:45 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 4 May 1999 19:44:45 -0000 Received: from paralleldata.com (smtp.paralleldata.com [38.153.145.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id PAA09949 for ; Tue, 4 May 1999 15:12:35 -0400 Received: by paralleldata.com from localhost (router,SLMail V2.5); Tue, 04 May 1999 14:16:30 -0500 Received: by paralleldata.com from paralleldata.com (207.158.82.247::mail daemon; unverified,SLMail V2.5); Tue, 04 May 1999 14:16:29 -0500 Sender: "Wsb" Message-ID: <372F388F.2954208C@paralleldata.com> Date: Tue, 04 May 1999 13:12:31 -0500 From: "Wes Bauske" Organization: Parallel Data Systems X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.2.3 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> <372ED97C.6F79A31C@voicenet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Uncle George wrote: > > Wes Bauske wrote: > > > 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! OK, that falls under the quirks of the given machine. Looking at gcc output should show you how to do that. Just set the appropriate flag "-mieee", and see how it differs from a non-flagged run. In general, I have no interest in the various trap modes since they hurt performance and about the only reason I'd use asm is to get better performance. > 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. I thought there was a specific declaration to make a symbol external.(.globl) Otherwise it's local. > Register conventions ( in __asm__ u gotta know that $9 is s0 ) Is there no way to make your own register names on Alphas? I used to use things like "F4 equ 4" on MVS many moons ago keep my eyeballs straight when using FP instructions. > 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" So, Alpha Linux is a halfbreed, part GNU, and part DEC UNIX. Need both doc sets. > 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 > Haven't written anything so large lately that I couldn't just stare at it for a while and see what the problem was. From looking at gcc asm output, I didn't see anything particularly unusual, but then I could have missed it. > > 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 ? Both. > > > 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 ), Frame pointer > I believe also GP Global pointer > 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 > In general, I agree finding asm docs is more difficult on UNIX. Mostly due to the fact almost no application programmers need them. I grabbed copies off one of Digital's old sites for their asm progammer's guide and the Architecture reference and they've so far explained everything I needed to know. Try: http://www.partner.digital.com/www-swdev/pages/Home/TECH/documents/Digital_UNIX/V4.0/Digital_UNIX_Bookshelf.html http://www.partner.digital.com/www-swdev/pages/Home/TECH/documents/alpha_cookbook/biblio.htm Might be newer stuff out there but they show most stuff. Wes