diff options
author | Nick Kralevich <nnk@google.com> | 2011-11-11 15:47:24 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-05-08 11:53:28 -0700 |
commit | 5982e33aca9dde3ba7b2487c4866e52c667485fa (patch) | |
tree | ec1ae8fdcc0d2c0223148c73148c7f96968daebe /libc/arch-x86/string | |
parent | 6cf3c7c50a4b9bc8425562c542f6a3d320db70c3 (diff) | |
download | bionic-5982e33aca9dde3ba7b2487c4866e52c667485fa.zip bionic-5982e33aca9dde3ba7b2487c4866e52c667485fa.tar.gz bionic-5982e33aca9dde3ba7b2487c4866e52c667485fa.tar.bz2 |
Cherry-pick "generate PIC code".
Change-Id: I7d5f2e5663df263493f65e364c959e663fc4d13a
Diffstat (limited to 'libc/arch-x86/string')
-rw-r--r-- | libc/arch-x86/string/sse2-memset5-atom.S | 8 | ||||
-rw-r--r-- | libc/arch-x86/string/ssse3-memcpy5.S | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libc/arch-x86/string/sse2-memset5-atom.S b/libc/arch-x86/string/sse2-memset5-atom.S index 4b7f71b..557c019 100644 --- a/libc/arch-x86/string/sse2-memset5-atom.S +++ b/libc/arch-x86/string/sse2-memset5-atom.S @@ -93,7 +93,7 @@ name: \ # define SETRTNVAL movl DEST(%esp), %eax #endif -#ifdef SHARED +#if (defined SHARED || defined __PIC__) # define ENTRANCE PUSH (%ebx); # define RETURN_END POP (%ebx); ret # define RETURN RETURN_END; CFI_PUSH (%ebx) @@ -313,7 +313,7 @@ L(128bytesormore): PUSH (%ebx) mov $SHARED_CACHE_SIZE, %ebx #else -# ifdef SHARED +# if (defined SHARED || defined __PIC__) call __i686.get_pc_thunk.bx add $_GLOBAL_OFFSET_TABLE_, %ebx mov __x86_shared_cache_size@GOTOFF(%ebx), %ebx @@ -331,7 +331,7 @@ L(128bytesormore): # define RESTORE_EBX_STATE CFI_PUSH (%ebx) cmp $DATA_CACHE_SIZE, %ecx #else -# ifdef SHARED +# if (defined SHARED || defined __PIC__) # define RESTORE_EBX_STATE call __i686.get_pc_thunk.bx add $_GLOBAL_OFFSET_TABLE_, %ebx @@ -436,7 +436,7 @@ L(128bytesormore_nt): jae L(128bytesormore_nt) sfence L(shared_cache_loop_end): -#if defined DATA_CACHE_SIZE || !defined SHARED +#if defined DATA_CACHE_SIZE || !(defined SHARED || defined __PIC__) POP (%ebx) #endif BRANCH_TO_JMPTBL_ENTRY (L(table_16_128bytes)) diff --git a/libc/arch-x86/string/ssse3-memcpy5.S b/libc/arch-x86/string/ssse3-memcpy5.S index b4773df..1bf6d22 100644 --- a/libc/arch-x86/string/ssse3-memcpy5.S +++ b/libc/arch-x86/string/ssse3-memcpy5.S @@ -104,7 +104,7 @@ name: \ #define PUSH(REG) pushl REG; CFI_PUSH (REG) #define POP(REG) popl REG; CFI_POP (REG) -#ifdef SHARED +#if (defined SHARED || defined __PIC__) # define PARMS 8 /* Preserve EBX. */ # define ENTRANCE PUSH (%ebx); # define RETURN_END POP (%ebx); ret @@ -216,7 +216,7 @@ L(48bytesormore): #ifdef SHARED_CACHE_SIZE_HALF cmp $SHARED_CACHE_SIZE_HALF, %ecx #else -# ifdef SHARED +# if (defined SHARED || defined __PIC__) call __i686.get_pc_thunk.bx add $_GLOBAL_OFFSET_TABLE_, %ebx cmp __x86_shared_cache_size_half@GOTOFF(%ebx), %ecx @@ -287,7 +287,7 @@ L(shl_0_gobble): #ifdef DATA_CACHE_SIZE_HALF cmp $DATA_CACHE_SIZE_HALF, %ecx #else -# ifdef SHARED +# if (defined SHARED || defined __PIC__) call __i686.get_pc_thunk.bx add $_GLOBAL_OFFSET_TABLE_, %ebx cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx |