NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-sh3/49597: swapcontext(3) stack pointer problem on NetBSD/sh3



The following reply was made to PR port-sh3/49597; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-sh3/49597: swapcontext(3) stack pointer problem on NetBSD/sh3
Date: Thu, 22 Jan 2015 19:53:23 +0300

 On Thu, Jan 22, 2015 at 16:45:01 +0000, Yasushi Oshima wrote:
 
 > From: Yasushi Oshima <oshima-ya%yagoto-urayama.jp@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: 
 > Subject: Re: port-sh3/49597: swapcontext(3) stack pointer problem on
 >  NetBSD/sh3
 > Date: Fri, 23 Jan 2015 01:42:39 +0900 (JST)
 > 
 >  Thu, 22 Jan 2015 14:55:00 +0000 (UTC) 
 >  Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote'
 >  
 >  >  Have you tested this?
 >  
 >  Yes, but __PIC__ case only. 
 >  
 >  The atf-tests in lib/libc/sys/t_swapcontext and fs/psshfs became
 >  to success by this patch in my environment.
 >    
 >  >  From a quick look, getcontext() captures the state that has not two,
 >  >  but three registers in the stack - including mov.l r4, @-sp in the
 >  >  delay slot of the CALL, doesn't it?
 >  
 [...]
 >  And I've checked this difference of SP is 12 bytes (=3 regs) by gdb 
 >  libc/sys/t_swapcontext test program (in __PIC__ case).
 
 Ah, right, sorry.  You are using live adjusted sp (after r4 is popped)
 to compute the final value, not saved sp from the context.
 
 -uwe
 


Home | Main Index | Thread Index | Old Index