public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004]
@ 2016-04-28 14:36 Paul E. Murphy
  2016-04-28 15:37 ` Carlos O'Donell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paul E. Murphy @ 2016-04-28 14:36 UTC (permalink / raw)
  To: libc-alpha, Tulio Magno Quites Machado Filho

A missing instruction was discovered in the compat version of
swapcontext while running the GCC test suite.

2016-04-28  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
	    Segher Boessenkool  <segher@gcc.gnu.org>

	[BZ #20004]
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S:
	(__novec_swapcontext): Add missing load.
---
 sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
index a166dcc..a05a9cc 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
@@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext)
   cmpdi r0,0
   bne	  L(nv_do_sigret)
 
+  ld	r8,.LC__dl_hwcap@toc(r2)
 # ifdef SHARED
 /* Load _rtld-global._dl_hwcap.  */
   ld    r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
-- 
2.4.11

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004]
  2016-04-28 14:36 [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004] Paul E. Murphy
@ 2016-04-28 15:37 ` Carlos O'Donell
  2016-04-28 16:39   ` Paul E. Murphy
  2016-05-03 14:23 ` Tulio Magno Quites Machado Filho
  2016-05-03 15:52 ` Paul E. Murphy
  2 siblings, 1 reply; 6+ messages in thread
From: Carlos O'Donell @ 2016-04-28 15:37 UTC (permalink / raw)
  To: Paul E. Murphy, libc-alpha, Tulio Magno Quites Machado Filho

On 04/28/2016 10:36 AM, Paul E. Murphy wrote:
> A missing instruction was discovered in the compat version of
> swapcontext while running the GCC test suite.
> 
> 2016-04-28  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
> 	    Segher Boessenkool  <segher@gcc.gnu.org>
> 
> 	[BZ #20004]
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S:
> 	(__novec_swapcontext): Add missing load.
> ---
>  sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
> index a166dcc..a05a9cc 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
> @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext)
>    cmpdi r0,0
>    bne	  L(nv_do_sigret)
>  
> +  ld	r8,.LC__dl_hwcap@toc(r2)
>  # ifdef SHARED
>  /* Load _rtld-global._dl_hwcap.  */
>    ld    r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
> 

How did you test this?

-- 
Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004]
  2016-04-28 15:37 ` Carlos O'Donell
@ 2016-04-28 16:39   ` Paul E. Murphy
  2016-04-28 17:58     ` Carlos O'Donell
  0 siblings, 1 reply; 6+ messages in thread
From: Paul E. Murphy @ 2016-04-28 16:39 UTC (permalink / raw)
  To: Carlos O'Donell, libc-alpha, Tulio Magno Quites Machado Filho

On 04/28/2016 10:37 AM, Carlos O'Donell wrote:
> On 04/28/2016 10:36 AM, Paul E. Murphy wrote:
>> A missing instruction was discovered in the compat version of
>> swapcontext while running the GCC test suite.
>>
>> 2016-04-28  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
>> 	    Segher Boessenkool  <segher@gcc.gnu.org>
>>
>> 	[BZ #20004]
>> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S:
>> 	(__novec_swapcontext): Add missing load.
>> ---
>>  sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
>> index a166dcc..a05a9cc 100644
>> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
>> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
>> @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext)
>>    cmpdi r0,0
>>    bne	  L(nv_do_sigret)
>>  
>> +  ld	r8,.LC__dl_hwcap@toc(r2)
>>  # ifdef SHARED
>>  /* Load _rtld-global._dl_hwcap.  */
>>    ld    r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
>>
> 
> How did you test this?

A slightly hacked up, debate-ably correct, example provided by the
makecontext man page, which is modified to explicitly call the old
version.  I directly linked the generated object files.

Without this patch it segfaults.  With it, seemingly expected output.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004]
  2016-04-28 16:39   ` Paul E. Murphy
@ 2016-04-28 17:58     ` Carlos O'Donell
  0 siblings, 0 replies; 6+ messages in thread
From: Carlos O'Donell @ 2016-04-28 17:58 UTC (permalink / raw)
  To: Paul E. Murphy, libc-alpha, Tulio Magno Quites Machado Filho

On 04/28/2016 12:39 PM, Paul E. Murphy wrote:
> On 04/28/2016 10:37 AM, Carlos O'Donell wrote:
>> On 04/28/2016 10:36 AM, Paul E. Murphy wrote:
>>> A missing instruction was discovered in the compat version of
>>> swapcontext while running the GCC test suite.
>>>
>>> 2016-04-28  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
>>> 	    Segher Boessenkool  <segher@gcc.gnu.org>
>>>
>>> 	[BZ #20004]
>>> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S:
>>> 	(__novec_swapcontext): Add missing load.
>>> ---
>>>  sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
>>> index a166dcc..a05a9cc 100644
>>> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
>>> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
>>> @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext)
>>>    cmpdi r0,0
>>>    bne	  L(nv_do_sigret)
>>>  
>>> +  ld	r8,.LC__dl_hwcap@toc(r2)
>>>  # ifdef SHARED
>>>  /* Load _rtld-global._dl_hwcap.  */
>>>    ld    r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
>>>
>>
>> How did you test this?
> 
> A slightly hacked up, debate-ably correct, example provided by the
> makecontext man page, which is modified to explicitly call the old
> version.  I directly linked the generated object files.
> 
> Without this patch it segfaults.  With it, seemingly expected output.

Looks good to me then :-)

-- 
Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004]
  2016-04-28 14:36 [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004] Paul E. Murphy
  2016-04-28 15:37 ` Carlos O'Donell
@ 2016-05-03 14:23 ` Tulio Magno Quites Machado Filho
  2016-05-03 15:52 ` Paul E. Murphy
  2 siblings, 0 replies; 6+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2016-05-03 14:23 UTC (permalink / raw)
  To: Paul E. Murphy, libc-alpha

"Paul E. Murphy" <murphyp@linux.vnet.ibm.com> writes:

> A missing instruction was discovered in the compat version of
> swapcontext while running the GCC test suite.
>
> 2016-04-28  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
> 	    Segher Boessenkool  <segher@gcc.gnu.org>
>
> 	[BZ #20004]
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S:
> 	(__novec_swapcontext): Add missing load.

LGTM.

-- 
Tulio Magno

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004]
  2016-04-28 14:36 [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004] Paul E. Murphy
  2016-04-28 15:37 ` Carlos O'Donell
  2016-05-03 14:23 ` Tulio Magno Quites Machado Filho
@ 2016-05-03 15:52 ` Paul E. Murphy
  2 siblings, 0 replies; 6+ messages in thread
From: Paul E. Murphy @ 2016-05-03 15:52 UTC (permalink / raw)
  To: libc-alpha

Committed as cbc06bc486635347ee0da51d04a82eedf51602d5.

On 04/28/2016 09:36 AM, Paul E. Murphy wrote:
> A missing instruction was discovered in the compat version of
> swapcontext while running the GCC test suite.
> 
> 2016-04-28  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
> 	    Segher Boessenkool  <segher@gcc.gnu.org>
> 
> 	[BZ #20004]
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S:
> 	(__novec_swapcontext): Add missing load.
> ---
>  sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
> index a166dcc..a05a9cc 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
> @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext)
>    cmpdi r0,0
>    bne	  L(nv_do_sigret)
> 
> +  ld	r8,.LC__dl_hwcap@toc(r2)
>  # ifdef SHARED
>  /* Load _rtld-global._dl_hwcap.  */
>    ld    r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-03 15:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-28 14:36 [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004] Paul E. Murphy
2016-04-28 15:37 ` Carlos O'Donell
2016-04-28 16:39   ` Paul E. Murphy
2016-04-28 17:58     ` Carlos O'Donell
2016-05-03 14:23 ` Tulio Magno Quites Machado Filho
2016-05-03 15:52 ` Paul E. Murphy

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 read-only IMAP folder(s) and NNTP newsgroup(s).