Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: elf/dl-runtime.c

Issue 7828050: Fix alignment for SSE register saving (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* On-demand PLT fixup for shared objects. 1 /* On-demand PLT fixup for shared objects.
2 Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc. 2 Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version. 8 version 2.1 of the License, or (at your option) any later version.
9 9
10 The GNU C Library is distributed in the hope that it will be useful, 10 The GNU C Library is distributed in the hope that it will be useful,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 #if defined(__native_client__) && defined(__x86_64__) 98 #if defined(__native_client__) && defined(__x86_64__)
99 /* We need to save the SSE registers in case something we do 99 /* We need to save the SSE registers in case something we do
100 here clobbers them. An audit library might do it. Our 100 here clobbers them. An audit library might do it. Our
101 calls to __nacl_read_tp (deep inside THREAD_GETMEM and the 101 calls to __nacl_read_tp (deep inside THREAD_GETMEM and the
102 like) might do it. These registers are call-clobbered, but 102 like) might do it. These registers are call-clobbered, but
103 they are also used for passing floating-point arguments, so 103 they are also used for passing floating-point arguments, so
104 the need to survive past the PLT fixup work. */ 104 the need to survive past the PLT fixup work. */
105 typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16))); 105 typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16)));
106 La_x86_64_xmm save_xmm[8]; 106 La_x86_64_xmm save_xmm[8] __attribute__ ((__aligned__ (16)));
107 # define SAVE_XMM(n) \ 107 # define SAVE_XMM(n) \
108 asm volatile ("movdqa %%xmm" #n ", %0" : "=m" (save_xmm[n])) 108 asm volatile ("movdqa %%xmm" #n ", %0" : "=m" (save_xmm[n]))
109 # define RESTORE_XMM(n) \ 109 # define RESTORE_XMM(n) \
110 asm volatile ("movdqa %0, %%xmm" #n :: "m" (save_xmm[n])) 110 asm volatile ("movdqa %0, %%xmm" #n :: "m" (save_xmm[n]))
111 SAVE_XMM (0); 111 SAVE_XMM (0);
112 SAVE_XMM (1); 112 SAVE_XMM (1);
113 SAVE_XMM (2); 113 SAVE_XMM (2);
114 SAVE_XMM (3); 114 SAVE_XMM (3);
115 SAVE_XMM (4); 115 SAVE_XMM (4);
116 SAVE_XMM (5); 116 SAVE_XMM (5);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 afct->ARCH_LA_PLTEXIT (&sym, reloc_result->boundndx, 469 afct->ARCH_LA_PLTEXIT (&sym, reloc_result->boundndx,
470 &l->l_audit[cnt].cookie, 470 &l->l_audit[cnt].cookie,
471 &reloc_result->bound->l_audit[cnt].cookie, 471 &reloc_result->bound->l_audit[cnt].cookie,
472 inregs, outregs, symname); 472 inregs, outregs, symname);
473 } 473 }
474 474
475 afct = afct->next; 475 afct = afct->next;
476 } 476 }
477 #endif 477 #endif
478 } 478 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698