Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!newstop!sun!sun-bb!khb From: khb@chiba.kbierman@sun.com (Keith Bierman - SPD Advanced Languages) Newsgroups: comp.arch Subject: Re: Integer/Multiply/Divide on Sparc Message-ID: Date: 2 Jan 90 20:13:28 GMT References: <158@csinc.UUCP> <787@stat.fsu.edu> <42701@lll-winken.LLNL.GOV> <788@stat.fsu.edu> <42737@lll-winken.LLNL.GOV> Sender: news@sun.Eng.Sun.COM Organization: Sun Microsystems Lines: 46 In-reply-to: brooks@maddog.llnl.gov's message of 30 Dec 89 21:06:48 GMT -- Tim Olson comments: .... integer mult in hw >If they do, then they are not Instruction Set compatible. My copy of the SPARC architecture manual lists only a MULScc (Multiply Step and I don't recall supersets being outlawed in the v7 (currently distributed spec) document. Let's assume some random company wants to add integer multiply to their SPARC box. Say some mythical company SolB. SolB spins their own chip. With their own compilers they can obviously generate whatever they want ... but what about all that Sun code ? What about binary compatibility ? When the Sun compilers can't optimize away an integer multiply they generate a subroutine call (typically .mul as suggested in the v7 document). So replacing .mul in the local versions of libc.so and libc.a would do the trick nicely. Many (most ?) codes are dynamically linked, so they get the speedup automatically. Those that are statically linked, will have to be relinked for speedup. What about that nasty subroutine call overhead ? Well if you don't care about your code running on those evil Sun boxes, you can provide (or your user's can crack open their copies of the Floating Point Programmer's Guide) a .il template which will cause the .mul subroutine call to be replaced with the native instruction. -- Keith H. Bierman |*My thoughts are my own. !! kbierman@sun.com It's Not My Fault | MTS --Only my work belongs to Sun* I Voted for Bill & | Advanced Languages/Floating Point Group Opus | "When the going gets Weird .. the Weird turn PRO" "There is NO defense against the attack of the KILLER MICROS!" Eugene Brooks