Message ID | 20150814103330.GA15748@spoyarek.pnq.redhat.com |
---|---|
State | New |
Headers | show |
On Fri, Aug 14, 2015 at 04:03:30PM +0530, Siddhesh Poyarekar wrote: > The change in 0b5395f052ee09cd7e3d219af4e805c38058afb5 replaced calls > to __get_cpu_features@plt followed by a mov from rax to rdx, with a > single macro LOAD_RTLD_GLOBAL_RO_RDX. It is pretty clear that there > was a typo in s_floorf due to which the (now incorrect) mov was not > removed. This patch removes that mov. > It isn't incorrect, just dead move. Ok for me.
On Fri, Aug 14, 2015 at 01:12:04PM +0200, Ondřej Bílka wrote:
> It isn't incorrect, just dead move. Ok for me.
No, it loads an arbitrary value (we don't know what is in %rax at that
point) into %rdx and overwrites the struct address.
Siddhesh
On Fri, Aug 14, 2015 at 4:19 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote: > On Fri, Aug 14, 2015 at 01:12:04PM +0200, Ondřej Bílka wrote: >> It isn't incorrect, just dead move. Ok for me. > > No, it loads an arbitrary value (we don't know what is in %rax at that > point) into %rdx and overwrites the struct address. > Thanks for catching it. I checked in your patch together with the same fix for sysdeps/x86_64/fpu/multiarch/s_nearbyint.S
On 08/14/2015 08:34 AM, H.J. Lu wrote: > On Fri, Aug 14, 2015 at 4:19 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote: >> On Fri, Aug 14, 2015 at 01:12:04PM +0200, Ondřej Bílka wrote: >>> It isn't incorrect, just dead move. Ok for me. >> >> No, it loads an arbitrary value (we don't know what is in %rax at that >> point) into %rdx and overwrites the struct address. >> > > Thanks for catching it. I checked in your patch together with the same > fix for sysdeps/x86_64/fpu/multiarch/s_nearbyint.S Why didn't testing catch this? Is it because this is a multiarch that didn't get tested? c.
On Fri, Aug 14, 2015 at 1:05 PM, Carlos O'Donell <carlos@redhat.com> wrote: > On 08/14/2015 08:34 AM, H.J. Lu wrote: >> On Fri, Aug 14, 2015 at 4:19 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote: >>> On Fri, Aug 14, 2015 at 01:12:04PM +0200, Ondřej Bílka wrote: >>>> It isn't incorrect, just dead move. Ok for me. >>> >>> No, it loads an arbitrary value (we don't know what is in %rax at that >>> point) into %rdx and overwrites the struct address. >>> >> >> Thanks for catching it. I checked in your patch together with the same >> fix for sysdeps/x86_64/fpu/multiarch/s_nearbyint.S > > Why didn't testing catch this? Is it because this is a multiarch that > didn't get tested? RAX contains a valid address, but not the correct address. Since my machine has SSE4.1, any version works. But machines without SSE4.1 may fail.
On 08/14/2015 04:36 PM, H.J. Lu wrote: > On Fri, Aug 14, 2015 at 1:05 PM, Carlos O'Donell <carlos@redhat.com> wrote: >> On 08/14/2015 08:34 AM, H.J. Lu wrote: >>> On Fri, Aug 14, 2015 at 4:19 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote: >>>> On Fri, Aug 14, 2015 at 01:12:04PM +0200, Ondřej Bílka wrote: >>>>> It isn't incorrect, just dead move. Ok for me. >>>> >>>> No, it loads an arbitrary value (we don't know what is in %rax at that >>>> point) into %rdx and overwrites the struct address. >>>> >>> >>> Thanks for catching it. I checked in your patch together with the same >>> fix for sysdeps/x86_64/fpu/multiarch/s_nearbyint.S >> >> Why didn't testing catch this? Is it because this is a multiarch that >> didn't get tested? > > RAX contains a valid address, but not the correct address. Since > my machine has SSE4.1, any version works. But machines without > SSE4.1 may fail. OK, that's what I figured. I'll see what we can do to make this better. Cheers, Carlos.
On Fri, Aug 14, 2015 at 04:49:49PM +0530, Siddhesh Poyarekar wrote: > On Fri, Aug 14, 2015 at 01:12:04PM +0200, Ondřej Bílka wrote: > > It isn't incorrect, just dead move. Ok for me. > > No, it loads an arbitrary value (we don't know what is in %rax at that > point) into %rdx and overwrites the struct address. > sorry, i somewhat looked at moving function address and thought its overwriting it. you are rigth.
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floorf.S b/sysdeps/x86_64/fpu/multiarch/s_floorf.S index f60f662..9d67847 100644 --- a/sysdeps/x86_64/fpu/multiarch/s_floorf.S +++ b/sysdeps/x86_64/fpu/multiarch/s_floorf.S @@ -23,7 +23,6 @@ ENTRY(__floorf) .type __floorf, @gnu_indirect_function LOAD_RTLD_GLOBAL_RO_RDX - movq %rax, %rdx leaq __floorf_sse41(%rip), %rax HAS_CPU_FEATURE (SSE4_1) jnz 2f