+2013-01-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/i386/i686/cacheinfo.c (__x86_64_data_cache_size): Removed.
+ (__x86_64_raw_data_cache_size): Likewise.
+ (__x86_64_data_cache_size_half): Likewise.
+ (__x86_64_raw_data_cache_size_half): Likewise.
+ (__x86_64_shared_cache_size): Likewise.
+ (__x86_64_raw_shared_cache_size): Likewise.
+ (__x86_64_shared_cache_size_half): Likewise.
+ (__x86_64_raw_shared_cache_size_half): Likewise.
+ * sysdeps/x86_64/cacheinfo.c (__x86_64_data_cache_size): Renamed
+ to ...
+ (__x86_data_cache_size): This.
+ (__x86_64_raw_data_cache_size): Renamed to ...
+ (__x86_raw_data_cache_size): This.
+ (__x86_64_data_cache_size_half): Renamed to ...
+ (__x86_data_cache_size_half): This.
+ (__x86_64_raw_data_cache_size_half): Renamed to ...
+ (__x86_raw_data_cache_size_half): This.
+ (__x86_64_shared_cache_size): Renamed to ...
+ (__x86_shared_cache_size): This.
+ (__x86_64_raw_shared_cache_size): Renamed to ...
+ (__x86_raw_shared_cache_size): This.
+ (__x86_64_shared_cache_size_half): Renamed to ...
+ (__x86_shared_cache_size_half): This.
+ (__x86_64_raw_shared_cache_size_half): Renamed to ...
+ (__x86_raw_shared_cache_size_half): This.
+ * sysdeps/x86_64/memcpy.S: Updated.
+ * sysdeps/x86_64/memset.S: Likewise.
+ * sysdeps/x86_64/multiarch/memcmp-sse4.S: Likewise.
+ * sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise.
+ * sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise.
+
2013-01-04 David S. Miller <davem@davemloft.net>
* sysdeps/sparc/fpu/libm-test-ulps: Update.
-#define __x86_64_data_cache_size __x86_data_cache_size
-#define __x86_64_raw_data_cache_size __x86_raw_data_cache_size
-#define __x86_64_data_cache_size_half __x86_data_cache_size_half
-#define __x86_64_raw_data_cache_size_half __x86_raw_data_cache_size_half
-#define __x86_64_shared_cache_size __x86_shared_cache_size
-#define __x86_64_raw_shared_cache_size __x86_raw_shared_cache_size
-#define __x86_64_shared_cache_size_half __x86_shared_cache_size_half
-#define __x86_64_raw_shared_cache_size_half __x86_raw_shared_cache_size_half
-
#define DISABLE_PREFETCHW
#define DISABLE_PREFERRED_MEMORY_INSTRUCTION
/* Data cache size for use in memory and string routines, typically
L1 size, rounded to multiple of 256 bytes. */
-long int __x86_64_data_cache_size_half attribute_hidden = 32 * 1024 / 2;
-long int __x86_64_data_cache_size attribute_hidden = 32 * 1024;
-/* Similar to __x86_64_data_cache_size_half, but not rounded. */
-long int __x86_64_raw_data_cache_size_half attribute_hidden = 32 * 1024 / 2;
-/* Similar to __x86_64_data_cache_size, but not rounded. */
-long int __x86_64_raw_data_cache_size attribute_hidden = 32 * 1024;
+long int __x86_data_cache_size_half attribute_hidden = 32 * 1024 / 2;
+long int __x86_data_cache_size attribute_hidden = 32 * 1024;
+/* Similar to __x86_data_cache_size_half, but not rounded. */
+long int __x86_raw_data_cache_size_half attribute_hidden = 32 * 1024 / 2;
+/* Similar to __x86_data_cache_size, but not rounded. */
+long int __x86_raw_data_cache_size attribute_hidden = 32 * 1024;
/* Shared cache size for use in memory and string routines, typically
L2 or L3 size, rounded to multiple of 256 bytes. */
-long int __x86_64_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2;
-long int __x86_64_shared_cache_size attribute_hidden = 1024 * 1024;
-/* Similar to __x86_64_shared_cache_size_half, but not rounded. */
-long int __x86_64_raw_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2;
-/* Similar to __x86_64_shared_cache_size, but not rounded. */
-long int __x86_64_raw_shared_cache_size attribute_hidden = 1024 * 1024;
+long int __x86_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2;
+long int __x86_shared_cache_size attribute_hidden = 1024 * 1024;
+/* Similar to __x86_shared_cache_size_half, but not rounded. */
+long int __x86_raw_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2;
+/* Similar to __x86_shared_cache_size, but not rounded. */
+long int __x86_raw_shared_cache_size attribute_hidden = 1024 * 1024;
#ifndef DISABLE_PREFETCHW
/* PREFETCHW support flag for use in memory and string routines. */
-int __x86_64_prefetchw attribute_hidden;
+int __x86_prefetchw attribute_hidden;
#endif
#ifndef DISABLE_PREFERRED_MEMORY_INSTRUCTION
3: SSSE3 instructions
*/
-int __x86_64_preferred_memory_instruction attribute_hidden;
+int __x86_preferred_memory_instruction attribute_hidden;
#endif
/* Intel prefers SSSE3 instructions for memory/string routines
if they are available. */
if ((ecx & 0x200))
- __x86_64_preferred_memory_instruction = 3;
+ __x86_preferred_memory_instruction = 3;
else
- __x86_64_preferred_memory_instruction = 2;
+ __x86_preferred_memory_instruction = 2;
#endif
/* Figure out the number of logical threads that share the
if they are avaiable, otherwise it prefers integer
instructions. */
if ((ecx & 0x200))
- __x86_64_preferred_memory_instruction = 3;
+ __x86_preferred_memory_instruction = 3;
else
- __x86_64_preferred_memory_instruction = 0;
+ __x86_preferred_memory_instruction = 0;
#endif
/* Get maximum extended function. */
__cpuid (0x80000001, eax, ebx, ecx, edx);
/* PREFETCHW || 3DNow! */
if ((ecx & 0x100) || (edx & 0x80000000))
- __x86_64_prefetchw = -1;
+ __x86_prefetchw = -1;
}
#endif
}
if (data > 0)
{
- __x86_64_raw_data_cache_size_half = data / 2;
- __x86_64_raw_data_cache_size = data;
+ __x86_raw_data_cache_size_half = data / 2;
+ __x86_raw_data_cache_size = data;
/* Round data cache size to multiple of 256 bytes. */
data = data & ~255L;
- __x86_64_data_cache_size_half = data / 2;
- __x86_64_data_cache_size = data;
+ __x86_data_cache_size_half = data / 2;
+ __x86_data_cache_size = data;
}
if (shared > 0)
{
- __x86_64_raw_shared_cache_size_half = shared / 2;
- __x86_64_raw_shared_cache_size = shared;
+ __x86_raw_shared_cache_size_half = shared / 2;
+ __x86_raw_shared_cache_size = shared;
/* Round shared cache size to multiple of 256 bytes. */
shared = shared & ~255L;
- __x86_64_shared_cache_size_half = shared / 2;
- __x86_64_shared_cache_size = shared;
+ __x86_shared_cache_size_half = shared / 2;
+ __x86_shared_cache_size = shared;
}
}
L(fasttry): /* first 1/2 L1 */
#ifndef NOT_IN_libc /* only up to this algorithm outside of libc.so */
- mov __x86_64_data_cache_size_half(%rip), %R11_LP
+ mov __x86_data_cache_size_half(%rip), %R11_LP
cmpq %rdx, %r11 /* calculate the smaller of */
cmovaq %rdx, %r11 /* remaining bytes and 1/2 L1 */
#endif
/* Handle large blocks smaller than 1/2 L2. */
L(pretry): /* first 1/2 L2 */
- mov __x86_64_shared_cache_size_half (%rip), %R8_LP
+ mov __x86_shared_cache_size_half (%rip), %R8_LP
cmpq %rdx, %r8 /* calculate the lesser of */
cmovaq %rdx, %r8 /* remaining bytes and 1/2 L2 */
movq %rbx, SAVE3(%rsp)
cfi_rel_offset (%rbx, SAVE3)
- cmpl $0, __x86_64_prefetchw(%rip)
+ cmpl $0, __x86_prefetchw(%rip)
jz L(preloop) /* check if PREFETCHW OK */
.p2align 4
.balign 16
L(byte32sse2_pre):
- mov __x86_64_shared_cache_size(%rip),%r9d # The largest cache size
+ mov __x86_shared_cache_size(%rip),%r9d # The largest cache size
cmp %r9,%r8
ja L(sse2_nt_move_pre)
#jmp L(byte32sse2)
#ifndef USE_MULTIARCH
L(aligned_now):
- cmpl $0x1,__x86_64_preferred_memory_instruction(%rip)
+ cmpl $0x1,__x86_preferred_memory_instruction(%rip)
jg L(SSE_pre)
#endif /* USE_MULTIARCH */
.balign 16
L(8byte_stos_try):
- mov __x86_64_shared_cache_size(%rip),%r9d // ck largest cache size
+ mov __x86_shared_cache_size(%rip),%r9d // ck largest cache size
cmpq %r8,%r9 // calculate the lesser of remaining
cmovaq %r8,%r9 // bytes and largest cache size
jbe L(8byte_stos)
# ifdef DATA_CACHE_SIZE_HALF
mov $DATA_CACHE_SIZE_HALF, %R8_LP
# else
- mov __x86_64_data_cache_size_half(%rip), %R8_LP
+ mov __x86_data_cache_size_half(%rip), %R8_LP
# endif
mov %r8, %r9
shr $1, %r8
# ifdef DATA_CACHE_SIZE_HALF
mov $DATA_CACHE_SIZE_HALF, %R8_LP
# else
- mov __x86_64_data_cache_size_half(%rip), %R8_LP
+ mov __x86_data_cache_size_half(%rip), %R8_LP
# endif
mov %r8, %r9
shr $1, %r8
#ifdef DATA_CACHE_SIZE
mov $DATA_CACHE_SIZE, %RCX_LP
#else
- mov __x86_64_data_cache_size(%rip), %RCX_LP
+ mov __x86_data_cache_size(%rip), %RCX_LP
#endif
cmp %rcx, %rdx
jae L(gobble_mem_fwd)
#ifdef DATA_CACHE_SIZE
mov $DATA_CACHE_SIZE, %RCX_LP
#else
- mov __x86_64_data_cache_size(%rip), %RCX_LP
+ mov __x86_data_cache_size(%rip), %RCX_LP
#endif
shl $1, %rcx
cmp %rcx, %rdx
#ifdef DATA_CACHE_SIZE
cmp $DATA_CACHE_SIZE_HALF, %R9_LP
#else
- cmp __x86_64_data_cache_size_half(%rip), %R9_LP
+ cmp __x86_data_cache_size_half(%rip), %R9_LP
#endif
jae L(gobble_mem_fwd)
sub $0x80, %rdx
#ifdef SHARED_CACHE_SIZE_HALF
mov $SHARED_CACHE_SIZE_HALF, %RCX_LP
#else
- mov __x86_64_shared_cache_size_half(%rip), %RCX_LP
+ mov __x86_shared_cache_size_half(%rip), %RCX_LP
#endif
#ifdef USE_AS_MEMMOVE
mov %rsi, %r9
#ifdef SHARED_CACHE_SIZE_HALF
mov $SHARED_CACHE_SIZE_HALF, %RCX_LP
#else
- mov __x86_64_shared_cache_size_half(%rip), %RCX_LP
+ mov __x86_shared_cache_size_half(%rip), %RCX_LP
#endif
#ifdef USE_AS_MEMMOVE
mov %rdi, %r9
#ifdef SHARED_CACHE_SIZE_HALF
mov $SHARED_CACHE_SIZE_HALF, %RCX_LP
#else
- mov __x86_64_shared_cache_size_half(%rip), %RCX_LP
+ mov __x86_shared_cache_size_half(%rip), %RCX_LP
#endif
cmp %rcx, %rdx
mov %rsi, %r9
#ifdef DATA_CACHE_SIZE_HALF
mov $DATA_CACHE_SIZE_HALF, %RCX_LP
#else
- mov __x86_64_data_cache_size_half(%rip), %RCX_LP
+ mov __x86_data_cache_size_half(%rip), %RCX_LP
#endif
BRANCH_TO_JMPTBL_ENTRY (L(shl_table), %r9, 4)
#ifdef SHARED_CACHE_SIZE_HALF
mov $SHARED_CACHE_SIZE_HALF, %RCX_LP
#else
- mov __x86_64_shared_cache_size_half(%rip), %RCX_LP
+ mov __x86_shared_cache_size_half(%rip), %RCX_LP
#endif
cmp %rcx, %rdx
#ifdef DATA_CACHE_SIZE_HALF
mov $DATA_CACHE_SIZE_HALF, %RCX_LP
#else
- mov __x86_64_data_cache_size_half(%rip), %RCX_LP
+ mov __x86_data_cache_size_half(%rip), %RCX_LP
#endif
BRANCH_TO_JMPTBL_ENTRY (L(shl_table_bwd), %r9, 4)
#ifdef DATA_CACHE_SIZE_HALF
cmp $DATA_CACHE_SIZE_HALF, %RDX_LP
#else
- cmp __x86_64_data_cache_size_half(%rip), %RDX_LP
+ cmp __x86_data_cache_size_half(%rip), %RDX_LP
#endif
lea -128(%rdx), %rdx
jae L(shl_0_gobble_mem_loop)
#ifdef DATA_CACHE_SIZE_HALF
cmp $DATA_CACHE_SIZE_HALF, %RDX_LP
#else
- cmp __x86_64_data_cache_size_half(%rip), %RDX_LP
+ cmp __x86_data_cache_size_half(%rip), %RDX_LP
#endif
lea -128(%rdx), %rdx
jae L(shl_0_gobble_mem_bwd_loop)