From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199903171317.IAA0000020901@amt174.lkg.dec.com> Date: Wed, 17 Mar 1999 08:17:48 -0500 (EST) From: Richard Gorton Subject: Instruction Sets and Alpha (was: CPU instruction list) Piotr wrote: >But, when reading Digital Unix Assembly Programmers Guide (1996) one can >learn about several integer division instructions (divl, divlu etc) on >page 3-15. What is going on? The architecture itself does not provide an integer division instruction. The assembler treats these as macro instructions, and converts those macro instructions into calls to libc routines. >And if my computer has sqrt instruction why my compiler (egcs 1.1) does >not use it (or how to insist on using it)? The hardware sqrt instructions don't show up until the 21264 series chips. Unless you specify which target (at gcc/egcs configure time) to generate code for, the default is to generate the instructions which are currently available for the machine you are building the compiler on ('native'). You _can_ trigger this with -mcpu=ev6. Also, if you want relatively fast sqrt() behavior for machines which do have a hardware sqrt() instruction, you'll need to use -ffast-math as well. Otherwise, there is a bunch of extra code generated. >Generally, how (where) can I obtain a complete list of CPU instructions >for my system? I plan to start assembler programming of some crucial >routines of my computational applications (for example random number >generator). I'm not sure of a good location on-line, but I personally use:         Alpha Architecture Reference Manual         Third Edition         ISBN 1-55558-202-8 According to information near the ISBN number, the url to the publisher is:         http://www.bh.com/ I hope this helps,                 Rick Richard Gorton http://www.digital.com/amt Compaq Computer Corporation All standard disclaimers apply. Reply-to: gorton@scrugs.lkg.dec.com