max at bruningsystems.com ??: > Brian Xu - Sun Microsystems - Beijing China wrote: > >> Greg Price ??: >> >>> >> I still have the question that who produces those 'bias area' and when? >> >> >> > When the stack pointer is initialized for a thread when the thread is > created, > the bias is subtracted to get an initial stack pointer value. Again, > see the code > in thread_load() which is (at least) one place where the stack pointer > is initialized. > I saw the code you referred. It is only about the thread init. then how about the following calls in the thread? >> It is obvious that before or just after the 'save' instruction, the >> %sp has been moved to the bottom of the bias. so it must be the 'call' >> or the 'save' instruction that does it. I want to know. >> >> > No. The save instruction doesn't need to do anything with the stack > pointer as far as the > bias is concerned. The bias is already "in" the stack pointer when the > save is executed. > The call also does not need to do anything with the stack pointer. It > is only when code > needs to access/store data on the stack, and when the thread is > initialized, that the > bias value needs to be used. > I think it is only the case for the first call in the thread. For the following calls, there must somewhere that implicitly modify the %sp.
Thanks, Brian > max > > _______________________________________________ > mdb-discuss mailing list > mdb-discuss at opensolaris.org >