home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / wizards / 4860 < prev    next >
Encoding:
Text File  |  1992-11-23  |  1.8 KB  |  41 lines

  1. Newsgroups: comp.unix.wizards
  2. 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
  3. From: sinan@carson.u.washington.edu (Sinan Karasu)
  4. Subject: How does one flush register windows in a SPARC?
  5. Message-ID: <1992Nov23.193112.5471@u.washington.edu>
  6. Keywords: shared libraries, Stack,SPARC 
  7. Sender: news@u.washington.edu (USENET News System)
  8. Organization: University of Washington, Seattle
  9. References: <1992Nov23.181550.22863@exu.ericsson.se>
  10. Date: Mon, 23 Nov 1992 19:31:12 GMT
  11. Lines: 28
  12.  
  13.  Hi there WIZARDS,
  14. I have this small problem. I have written a little assembly
  15. language routine that when called with the address of a c function
  16. it save the registers and changes the stack pointer to point
  17. to a global array and then calls the function passed.
  18. when function calls me then I again muck around with registers
  19. and stacks and then return to the original caller. The attempt
  20. here is to duplicate an already existing on a 68040 based
  21. machine , a multithreading operation. Now I am also trying
  22. to code this with multithread librarries on Solaris2. Anyway
  23. I got the code written but then I realized that I am going to
  24. run afoul with the window overflow/underflow traps. Reading
  25. the SPARC architecture manual I suspect that there is a system
  26. call that allows me to flush the registers.
  27. Q: How do I flush registers without switching to supervisor
  28. mode etc...
  29. Q: It appears to me that the window overflow/underflow trap 
  30. service routine would have to remember(on second thought
  31. maybe not) where the register window contents was saved.
  32. Is that true? or is the save/restore sequence in conjunction
  33. with the stack pointer the only mechanism?. 
  34.  
  35. Anyway I'd be glad to know how does one flush the registers.
  36. Thank You
  37. Sinan....
  38.  
  39.  
  40.  
  41.