Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 Pyramid OSx-3.0 85/11/15; site pyramid.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!pyramid!csg From: csg@pyramid.UUCP (Carl S. Gutekunst) Newsgroups: net.arch Subject: Re: Addressing modes Message-ID: <141@pyramid.UUCP> Date: Thu, 6-Mar-86 03:17:49 EST Article-I.D.: pyramid.141 Posted: Thu Mar 6 03:17:49 1986 Date-Received: Sat, 8-Mar-86 02:27:38 EST References: <946@garfield.UUCP> <2900001@ztivax.UUCP> Reply-To: csg@pyramid.UUCP (Carl S. Gutekunst) Organization: Pyramid Technology Corp., Mountain View, CA Lines: 29 Summary: Yes we program in assembler, but very little. In article <2900001@ztivax.UUCP> david@ztivax.UUCP writes: >However, cliff, a good question you have implied: Does anyone do assembler >programming on RISC machines? > >For example: Is UNIX on RISC entirely in C? How do >the stack recovery mechanisms work? Interrupted / failed instructions? >CPU mode register control manipulation (if applicable)? For Pyramid's RISC CPU, we do need to do a little programming in Assembler -- very little, actually. The first few words of all interrupt handlers are written in assmbler, as are a few error handlers. But most of these prompty call C functions to do the real work. Even the lowest-level I/O can be done from C. I'd suspect the same is true of other commercial RISC processors. A microcosmic but interesting comment on RISC comes from our string libc functions, which some of the local speed freques have implemented in assmbler. Even with just the peephole optimizer, the only real difference between the compiler's versions and the optimal hand assembly versions is a handful of extraneous instructions that get executed once. RISC machines just don't have any clever kludges in the instruction set for moving bytes faster than what the compiler can easily figure out for itself. I've generally seen this carry over to more complex task as well. Whether this is a Good Thing or a Bad Thing, I'll let the rest of you debate. I'm one of those good ol' assmbler hackers. Programming in assmbler on a RISC machine is extremely boring. But it seems to make the compilers happy. :-) -- Carl S. Gutekunst {allegra,cmcl2,decwrl,hplabs,topaz,ut-sally}!pyramid!csg Pyramid Technology Corp, Mountain View, CA +1 415 965 7200