summaryrefslogtreecommitdiffstats
path: root/libcutils/arch-x86
diff options
context:
space:
mode:
Diffstat (limited to 'libcutils/arch-x86')
-rw-r--r--libcutils/arch-x86/android_memset16.S7
-rw-r--r--libcutils/arch-x86/android_memset32.S8
-rwxr-xr-x[-rw-r--r--]libcutils/arch-x86/sse2-memset16-atom.S8
-rwxr-xr-x[-rw-r--r--]libcutils/arch-x86/sse2-memset32-atom.S8
4 files changed, 8 insertions, 23 deletions
diff --git a/libcutils/arch-x86/android_memset16.S b/libcutils/arch-x86/android_memset16.S
index b1f09cb..f8b79bd 100644
--- a/libcutils/arch-x86/android_memset16.S
+++ b/libcutils/arch-x86/android_memset16.S
@@ -17,16 +17,9 @@
* Contributed by: Intel Corporation
*/
-#if defined(USE_SSE2)
-
# include "cache_wrapper.S"
# undef __i686
# define USE_AS_ANDROID
# define sse2_memset16_atom android_memset16
# include "sse2-memset16-atom.S"
-#else
-
-# include "memset16.S"
-
-#endif
diff --git a/libcutils/arch-x86/android_memset32.S b/libcutils/arch-x86/android_memset32.S
index 1fb2ffe..6249fce 100644
--- a/libcutils/arch-x86/android_memset32.S
+++ b/libcutils/arch-x86/android_memset32.S
@@ -17,17 +17,9 @@
* Contributed by: Intel Corporation
*/
-#if defined(USE_SSE2)
-
# include "cache_wrapper.S"
# undef __i686
# define USE_AS_ANDROID
# define sse2_memset32_atom android_memset32
# include "sse2-memset32-atom.S"
-#else
-
-# include "memset32.S"
-
-#endif
-
diff --git a/libcutils/arch-x86/sse2-memset16-atom.S b/libcutils/arch-x86/sse2-memset16-atom.S
index cafec82..c2a762b 100644..100755
--- a/libcutils/arch-x86/sse2-memset16-atom.S
+++ b/libcutils/arch-x86/sse2-memset16-atom.S
@@ -86,7 +86,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)
@@ -344,7 +344,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
@@ -362,7 +362,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
@@ -471,7 +471,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
add %ecx, %edx
diff --git a/libcutils/arch-x86/sse2-memset32-atom.S b/libcutils/arch-x86/sse2-memset32-atom.S
index 4a52484..05eb64f 100644..100755
--- a/libcutils/arch-x86/sse2-memset32-atom.S
+++ b/libcutils/arch-x86/sse2-memset32-atom.S
@@ -86,7 +86,7 @@ name: \
# define SETRTNVAL
#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)
@@ -259,7 +259,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
@@ -276,7 +276,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
@@ -386,7 +386,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
add %ecx, %edx