* PowerPC Port: Question about magic numbers in sigsetjmp.s
@ 2016-04-30 17:55 Dan Parrot
2016-04-30 19:20 ` Bobby Bingham
0 siblings, 1 reply; 3+ messages in thread
From: Dan Parrot @ 2016-04-30 17:55 UTC (permalink / raw)
To: musl
I'm trying to modify the PowerPC port in order to run it on a 64-bit
Little Endian system. I haven't been able to get pthreads to pass the
tests in libc-testsuite and I believe the culprit to be sigsetjmp.s.
I would be grateful for an explanation of the offsets added to register
3 in these two lines in sigsetjmp.s:
stw 5, 448(3)
stw 16, 448+4+8(3)
Thanks.
Dan.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PowerPC Port: Question about magic numbers in sigsetjmp.s
2016-04-30 17:55 PowerPC Port: Question about magic numbers in sigsetjmp.s Dan Parrot
@ 2016-04-30 19:20 ` Bobby Bingham
2016-04-30 20:12 ` Dan Parrot
0 siblings, 1 reply; 3+ messages in thread
From: Bobby Bingham @ 2016-04-30 19:20 UTC (permalink / raw)
To: musl
On Sat, Apr 30, 2016 at 12:55:19PM -0500, Dan Parrot wrote:
> I'm trying to modify the PowerPC port in order to run it on a 64-bit
> Little Endian system. I haven't been able to get pthreads to pass the
I've already submitted a patch to the mailing list to add a ppc64le port.
http://www.openwall.com/lists/musl/2016/03/27/8
I'm about to submit a new version to address the remaining comments that
have been made on it, but it should be close to done.
> tests in libc-testsuite and I believe the culprit to be sigsetjmp.s.
>
> I would be grateful for an explanation of the offsets added to register
> 3 in these two lines in sigsetjmp.s:
>
> stw 5, 448(3)
> stw 16, 448+4+8(3)
>
See this commit: http://git.musl-libc.org/cgit/musl/commit/?id=583e55122e767b1586286a0d9c35e2a4027998ab
The sigjmp_buf structure includes a __jmp_buf at the beginning (see the
definition in include/setjmp.h).
__jmp_buf is 448 bytes large on ppc32 (it should be larger on ppc64).
So, these are accessing the part of the sigjmp_buf beyond the initial
__jmp_buf.
The first line is saving the return address to the __fl member, and the
second line is saving r16 to __ss[2]. The first two elements of __ss
are used by __sigsetjmp_tail to save the signal mask. The remainder of
__ss is unused, so it's a convenient place to spill a register to.
>
> Thanks.
> Dan.
>
>
Bobby
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PowerPC Port: Question about magic numbers in sigsetjmp.s
2016-04-30 19:20 ` Bobby Bingham
@ 2016-04-30 20:12 ` Dan Parrot
0 siblings, 0 replies; 3+ messages in thread
From: Dan Parrot @ 2016-04-30 20:12 UTC (permalink / raw)
To: musl
Thanks for the quick response.
I'll take a look at the patch and comments.
Dan.
-----Original Message-----From: Bobby Bingham <koorogi@koorogi.info>
Reply-to: musl@lists.openwall.com
To: musl@lists.openwall.com
Subject: Re: [musl] PowerPC Port: Question about magic numbers in
sigsetjmp.s
Date: Sat, 30 Apr 2016 14:20:48 -0500
On Sat, Apr 30, 2016 at 12:55:19PM -0500, Dan Parrot wrote:
> I'm trying to modify the PowerPC port in order to run it on a 64-bit
> Little Endian system. I haven't been able to get pthreads to pass the
I've already submitted a patch to the mailing list to add a ppc64le port.
http://www.openwall.com/lists/musl/2016/03/27/8
I'm about to submit a new version to address the remaining comments that
have been made on it, but it should be close to done.
> tests in libc-testsuite and I believe the culprit to be sigsetjmp.s.
>
> I would be grateful for an explanation of the offsets added to register
> 3 in these two lines in sigsetjmp.s:
>
> stw 5, 448(3)
> stw 16, 448+4+8(3)
>
See this commit: http://git.musl-libc.org/cgit/musl/commit/?id=583e55122e767b1586286a0d9c35e2a4027998ab
The sigjmp_buf structure includes a __jmp_buf at the beginning (see the
definition in include/setjmp.h).
__jmp_buf is 448 bytes large on ppc32 (it should be larger on ppc64).
So, these are accessing the part of the sigjmp_buf beyond the initial
__jmp_buf.
The first line is saving the return address to the __fl member, and the
second line is saving r16 to __ss[2]. The first two elements of __ss
are used by __sigsetjmp_tail to save the signal mask. The remainder of
__ss is unused, so it's a convenient place to spill a register to.
>
> Thanks.
> Dan.
>
>
Bobby
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-30 20:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-30 17:55 PowerPC Port: Question about magic numbers in sigsetjmp.s Dan Parrot
2016-04-30 19:20 ` Bobby Bingham
2016-04-30 20:12 ` Dan Parrot
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).