This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Save and restore xmm6 in x86-64 _dl_runtime_profile


On Tue, Jun 30, 2009 at 2:17 PM, H.J. Lu<hongjiu.lu@intel.com> wrote:
> _dl_runtime_profile in sysdeps/x86_64/dl-trampoline.S doesn't preserve
> xmm6. ?This patch fixes it and added a testcase.
>
>
> H.J.
> ---
> 2009-06-30 ?H.J. Lu ?<hongjiu.lu@intel.com>
>
> ? ? ? ?* elf/Makefile (distribute): Remove tst-audit.sh. ?Add
> ? ? ? ?tst-audit2.c tst-audit3.c tst-auditmod3a.c tst-auditmod3b.c.
> ? ? ? ?(tests): Add tst-audit3 for x86_64.
> ? ? ? ?(modules-names): Add tst-auditmod3a tst-auditmod3b.
> ? ? ? ?($(objpfx)tst-audit3): New.
> ? ? ? ?($(objpfx)tst-audit3.out): Likewise.
> ? ? ? ?(tst-audit3-ENV): Likewise.
>
> ? ? ? ?* elf/tst-audit3.c: New.
> ? ? ? ?* elf/tst-auditmod3a.c: Likewise.
> ? ? ? ?* elf/tst-auditmod3b.c: Likewise.
>
> ? ? ? ?* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Save
> ? ? ? ?and restore xmm6.
>

> --- /dev/null ? 2009-06-26 17:33:06.493000902 -0700
> +++ elf/tst-auditmod3a.c ? ? ? ?2009-06-30 14:00:28.000000000 -0700
> @@ -0,0 +1,28 @@
> +/* Test case for x86-64 preserved registers in dynamic linker. ?*/
> +
> +#include <stdlib.h>
> +#include <string.h>
> +#include <emmintrin.h>
> +
> +__m128i
> +audit_test (__m128i x0, __m128i x1, __m128i x2, __m128i x3,
> + ? ? ? ? ? __m128i x4, __m128i x5, __m128i x6, __m128i x7)
> +{
> + ?__m128i xmm = _mm_setzero_si128 ();
> +
> + ?printf ("Enter %s\n", __PRETTY_FUNCTION__);
> + ?if (memcmp (&xmm, &x0, sizeof (xmm))
> + ? ? ?|| memcmp (&xmm, &x1, sizeof (xmm))
> + ? ? ?|| memcmp (&xmm, &x2, sizeof (xmm))
> + ? ? ?|| memcmp (&xmm, &x3, sizeof (xmm))
> + ? ? ?|| memcmp (&xmm, &x4, sizeof (xmm))
> + ? ? ?|| memcmp (&xmm, &x5, sizeof (xmm))
> + ? ? ?|| memcmp (&xmm, &x6, sizeof (xmm))
> + ? ? ?|| memcmp (&xmm, &x7, sizeof (xmm)))
> + ? ?{
> + ? ? ?printf ("Failed %s\n", __PRETTY_FUNCTION__);
> + ? ? ?abort ();
> + ? ?}
> +
> + ?return xmm;
> +}
>

Please remove those extra printfs. I added them
for debugging and forgot to remove them.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]