home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!caen!saimiri.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!carson.u.washington.edu!sinan
- From: sinan@carson.u.washington.edu (Sinan Karasu)
- Subject: How does one flush register windows in a SPARC?
- Message-ID: <1992Nov23.193112.5471@u.washington.edu>
- Keywords: shared libraries, Stack,SPARC
- Sender: news@u.washington.edu (USENET News System)
- Organization: University of Washington, Seattle
- References: <1992Nov23.181550.22863@exu.ericsson.se>
- Date: Mon, 23 Nov 1992 19:31:12 GMT
- Lines: 28
-
- Hi there WIZARDS,
- I have this small problem. I have written a little assembly
- language routine that when called with the address of a c function
- it save the registers and changes the stack pointer to point
- to a global array and then calls the function passed.
- when function calls me then I again muck around with registers
- and stacks and then return to the original caller. The attempt
- here is to duplicate an already existing on a 68040 based
- machine , a multithreading operation. Now I am also trying
- to code this with multithread librarries on Solaris2. Anyway
- I got the code written but then I realized that I am going to
- run afoul with the window overflow/underflow traps. Reading
- the SPARC architecture manual I suspect that there is a system
- call that allows me to flush the registers.
- Q: How do I flush registers without switching to supervisor
- mode etc...
- Q: It appears to me that the window overflow/underflow trap
- service routine would have to remember(on second thought
- maybe not) where the register window contents was saved.
- Is that true? or is the save/restore sequence in conjunction
- with the stack pointer the only mechanism?.
-
- Anyway I'd be glad to know how does one flush the registers.
- Thank You
- Sinan....
-
-
-
-