This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem in pthread_create (allocate_stack inline code) on MIPS.


On Thu, 29 Nov 2007 16:02:04 -0800, "Kaz Kylheku" <kaz@zeugmasystems.com> wrote:
>   # v0 := __default_stacksize     (presumably! Haven't verified this
> global offset)
>     5778:       8f82804c        lw      v0,-32692(gp)
>  
>   # goto 541c
>     577c:       1000ff27        b       541c
> <pthread_create@@GLIBC_2.2+0x7c>
>  
> This is inconsistent register use! The v0 register is wrong, because it
> gets clobbered right away by the instruction at the branch target 541c.
> How can the default stack size ever be used, in the common case?
> 
> This should be loading v1, and jumping back to 5418, so v1 is copied
> into s1.

What is a instruction at 5780?  Is it a "lw s1, nn(v0)" or something,
isn't it?

I suppose LW at 5778 loads an address of __default_stacksize variable
and there should be an another load instruction to load its value.

---
Atsushi Nemoto


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]