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] |
On Mon, Jul 6, 2009 at 10:16 PM, Ulrich Drepper<drepper@redhat.com> wrote: > H.J. Lu wrote: >> Since SSE registers are aliases of the lower 128bits of AVX register, >> we only need to restore AVX register if it is available. > > No. ?This would only work if we would have had the AVX registers in the > data structure from day one. ?The current ABI allows audit modules to > modify the lr_xmm array and see the changes being reflected in the > program run. ?You cannot after that fact require that the lr_ymm > registers have to be modified. > > This is why this two-step process is needed. Here is the updated patch with 2 testcases. They are passed under AVX emulator. > >> Since AVX register is just SSE register extended to 256bit, we only >> use the first 8 AVX/SSE registers for passing parameters. > > This makes no sense. ?There are 16 of them and if a function needs more > than 8 it should be able to use it. ?Someone should fix gcc. > The current psABI only uses the first 8 vector registers to pass function parameters. We only eed to save/restore the first 8 vector registers >> Here is the updated patch tested under AVX emulator. > > As said above, the restoring issue has to be addressed. Done. tst-audit5 changes xmm fields. It worked under AVX emulator. > >> It defines >> La_x86_64_vector as 64byte since we will extend 256bit AVX register >> to 512bit in the future. > > OK I guess. Thanks. -- H.J. --- 2009-07-07 H.J. Lu <hongjiu.lu@intel.com> * config.h.in (HAVE_AVX_SUPPORT): New. * config.make.in (config-cflags-avx): New. * configure.in: Substitute libc_cv_cc_avx. * configure: Regenerated. * elf/Makefile (distribute): Add tst-audit4.c tst-auditmod4a.c tst-auditmod4b.c tst-audit5.c tst-auditmod5a.c tst-auditmod5b.c. (tests): Add tst-audit4 tst-audit5 for x86_64. (modules-names): Add tst-auditmod4a tst-auditmod4b tst-auditmod5a tst-auditmod5b. ($(objpfx)tst-audit4): New. ($(objpfx)tst-audit4.out): Likewise. (tst-audit4-ENV): Likewise. ($(objpfx)tst-audit5): Likewise. ($(objpfx)tst-audit5.out): Likewise. (tst-audit5-ENV): Likewise. (CFLAGS-tst-audit4.c): Likewise. (CFLAGS-tst-auditmod4a.c): Likewise. (CFLAGS-tst-auditmod4b.c): Likewise. * elf/tst-audit4.c: New. * elf/tst-audit5.c: Likewise. * elf/tst-auditmod4a.c: Likewise. * elf/tst-auditmod4b.c: Likewise. * elf/tst-auditmod5a.c: Likewise. * elf/tst-auditmod5b.c: Likewise. * sysdeps/x86_64/Makefile (gen-as-const-headers): Add link-defines.sym. * sysdeps/x86_64/bits/link.h (La_x86_64_ymm): New. (La_x86_64_vector): Likewise. (La_x86_64_regs): Append lr_vector. (La_x86_64_retval): Append lr_vector0/lrv_vector1. * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Move saving and restoring SSE registers to ... * sysdeps/x86_64/dl-trampoline.h: This. New. * sysdeps/x86_64/dl-trampoline.S: Include <config.h> and <link-defines.h>. (_dl_runtime_profile): Use LR_SIZE to allocate space for La_x86_64_regs. Allocate extra space and jump to memory at save_and_restore_vector if HAVE_AVX_SUPPORT is defined. (save_and_restore_vector_sse): New. (save_and_restore_vector_avx): Likewise. (check_avx): Likewise. (save_and_restore_vector): Likewise. * sysdeps/x86_64/elf/configure.in: Set libc_cv_cc_avx and HAVE_AVX_SUPPORT. * sysdeps/x86_64/elf/configure: Regenerated. * sysdeps/x86_64/link-defines.sym: New.
Attachment:
libc-avx-4.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |