Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!husc6!rice!sun-spots-request From: srs!matt@uunet.uu.net (Matt Goheen) Newsgroups: comp.sys.sun Subject: Moving data in/out of memory on a Sparc Keywords: SunOS Message-ID: <759@brazos.Rice.edu> Date: 31 Jul 89 19:02:36 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 21 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 93, message 9 of 16 Put simply, what is the FASTEST way to move data in/out of a Sparc chip's registers? Put complexly and in much detail: We need to fill as many registers as are available with 32 bit integers from memory. The data in memory can be laid out in whatever way is necessary to speed access (most likely contiguously but perhaps not). >From my limited experience with Sparc assembly, it would seem that on the 4/110, there are 8 global, 8 local, 8 input and 8 output registers. Can we use them all from an assembly routine as long as we restore the necessary ones before we return? It looks to me that loading double words into register pairs using inline code is the fastest method (using the ldd instruction), am I wrong (probably)? This would be for a 4/110, would anything change if it were for a Sparcstation (different memory subsystem)? How about other Sun Sparc systems? Thanks to any and all respondents, your assistance is greatly appreciated, Matt Goheen matt@srs.uucp matt%srs.uucp@harvard.harvard.edu