Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 30 Apr 2016 14:20:48 -0500
From: Bobby Bingham <>
Subject: Re: PowerPC Port: Question about magic numbers in sigsetjmp.s

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.

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:

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

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.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.