View Single Post

   
  #3 (permalink)  
Old 01-16-2008, 11:34 AM
Marc
 
Posts: n/a
Default Re: Conventions for using the register %g7

"Charles Lindsey" wrote:

> In SPARC systems, what conventions apply to the use og the register %g7?
>
> For example, under Solaris 10 (or under the libc that comes with it), the
> lmutex_unlock function starts off like this:

[...]
> where it is evident that %g7 is a globally understood register (presumably
> pointing to some globally known collection of variables).

[...]
> And I have observed that even my somewhat ancient Sun C compiler never
> seems to make use of %g7.
>
> OTOH, I have another compiler, nothing to do with Sun, that is not aware
> of %g7 being reserved for anything. So as a result I have a program that
> worked fine under Solaris 7, bur breaks in Solaris 10.


This blog post should answer all your questions:

http://blogs.sun.com/morganh/entry/a...king_the_rules

Reply With Quote