Remove src/corelib/arch/i386/* and src/corelib/arch/x86_64/*
We do not want to support out-of-line QAtomic* implementations. Remove these from the i386 and x86_64 implementations. Change-Id: Ib6a9614b7b11bf6bccc9054b177357afd83e33e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
67729d05d0
commit
0797676329
@ -1,4 +0,0 @@
|
||||
#
|
||||
# i386 architecture
|
||||
#
|
||||
!*-g++*:!*-icc*:SOURCES += $$QT_ARCH_CPP/qatomic_i386.s
|
@ -1,103 +0,0 @@
|
||||
.text
|
||||
|
||||
.align 4,0x90
|
||||
.globl q_atomic_test_and_set_int
|
||||
q_atomic_test_and_set_int:
|
||||
movl 4(%esp),%ecx
|
||||
movl 8(%esp),%eax
|
||||
movl 12(%esp),%edx
|
||||
lock
|
||||
cmpxchgl %edx,(%ecx)
|
||||
mov $0,%eax
|
||||
sete %al
|
||||
ret
|
||||
.align 4,0x90
|
||||
.type q_atomic_test_and_set_int,@function
|
||||
.size q_atomic_test_and_set_int,.-q_atomic_test_and_set_int
|
||||
|
||||
.align 4,0x90
|
||||
.globl q_atomic_test_and_set_ptr
|
||||
q_atomic_test_and_set_ptr:
|
||||
movl 4(%esp),%ecx
|
||||
movl 8(%esp),%eax
|
||||
movl 12(%esp),%edx
|
||||
lock
|
||||
cmpxchgl %edx,(%ecx)
|
||||
mov $0,%eax
|
||||
sete %al
|
||||
ret
|
||||
.align 4,0x90
|
||||
.type q_atomic_test_and_set_ptr,@function
|
||||
.size q_atomic_test_and_set_ptr,.-q_atomic_test_and_set_ptr
|
||||
|
||||
.align 4,0x90
|
||||
.globl q_atomic_increment
|
||||
q_atomic_increment:
|
||||
movl 4(%esp), %ecx
|
||||
lock
|
||||
incl (%ecx)
|
||||
mov $0,%eax
|
||||
setne %al
|
||||
ret
|
||||
.align 4,0x90
|
||||
.type q_atomic_increment,@function
|
||||
.size q_atomic_increment,.-q_atomic_increment
|
||||
|
||||
.align 4,0x90
|
||||
.globl q_atomic_decrement
|
||||
q_atomic_decrement:
|
||||
movl 4(%esp), %ecx
|
||||
lock
|
||||
decl (%ecx)
|
||||
mov $0,%eax
|
||||
setne %al
|
||||
ret
|
||||
.align 4,0x90
|
||||
.type q_atomic_decrement,@function
|
||||
.size q_atomic_decrement,.-q_atomic_decrement
|
||||
|
||||
.align 4,0x90
|
||||
.globl q_atomic_set_int
|
||||
q_atomic_set_int:
|
||||
mov 4(%esp),%ecx
|
||||
mov 8(%esp),%eax
|
||||
xchgl %eax,(%ecx)
|
||||
ret
|
||||
.align 4,0x90
|
||||
.type q_atomic_set_int,@function
|
||||
.size q_atomic_set_int,.-q_atomic_set_int
|
||||
|
||||
.align 4,0x90
|
||||
.globl q_atomic_set_ptr
|
||||
q_atomic_set_ptr:
|
||||
mov 4(%esp),%ecx
|
||||
mov 8(%esp),%eax
|
||||
xchgl %eax,(%ecx)
|
||||
ret
|
||||
.align 4,0x90
|
||||
.type q_atomic_set_ptr,@function
|
||||
.size q_atomic_set_ptr,.-q_atomic_set_ptr
|
||||
|
||||
.align 4,0x90
|
||||
.globl q_atomic_fetch_and_add_int
|
||||
q_atomic_fetch_and_add_int:
|
||||
mov 4(%esp),%ecx
|
||||
mov 8(%esp),%eax
|
||||
lock
|
||||
xadd %eax,(%ecx)
|
||||
ret
|
||||
.align 4,0x90
|
||||
.type q_atomic_fetch_and_add_int,@function
|
||||
.size q_atomic_fetch_and_add_int,.-q_atomic_fetch_and_add_int
|
||||
|
||||
.align 4,0x90
|
||||
.globl q_atomic_fetch_and_add_ptr
|
||||
q_atomic_fetch_and_add_ptr:
|
||||
mov 4(%esp),%ecx
|
||||
mov 8(%esp),%eax
|
||||
lock
|
||||
xadd %eax,(%ecx)
|
||||
ret
|
||||
.align 4,0x90
|
||||
.type q_atomic_fetch_and_add_ptr,@function
|
||||
.size q_atomic_fetch_and_add_ptr,.-q_atomic_fetch_and_add_ptr
|
@ -345,47 +345,7 @@ template <> struct QBasicAtomicOps<8>: QGenericAtomicOps<QBasicAtomicOps<8> >
|
||||
#define Q_ATOMIC_INT64_FETCH_AND_ADD_IS_NOT_NATIVE
|
||||
|
||||
#else
|
||||
|
||||
extern "C" {
|
||||
Q_CORE_EXPORT int q_atomic_test_and_set_int(volatile int *ptr, int expected, int newval);
|
||||
Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval);
|
||||
Q_CORE_EXPORT int q_atomic_increment(volatile int *ptr);
|
||||
Q_CORE_EXPORT int q_atomic_decrement(volatile int *ptr);
|
||||
Q_CORE_EXPORT int q_atomic_set_int(volatile int *ptr, int newval);
|
||||
Q_CORE_EXPORT void *q_atomic_set_ptr(volatile void *ptr, void *newval);
|
||||
Q_CORE_EXPORT int q_atomic_fetch_and_add_int(volatile int *ptr, int value);
|
||||
Q_CORE_EXPORT void *q_atomic_fetch_and_add_ptr(volatile void *ptr, int value);
|
||||
} // extern "C"
|
||||
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<4>::ref(T &_q_value)
|
||||
{
|
||||
return q_atomic_increment((int *)&_q_value) != 0;
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::deref(T &_q_value)
|
||||
{
|
||||
return q_atomic_decrement((int *)&_q_value) != 0;
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_int((int*)&_q_value, int(expectedValue), int(newValue));
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue)
|
||||
{
|
||||
return T(q_atomic_set_int((int*)&_q_value, int(newValue));
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd)
|
||||
{
|
||||
return T(q_atomic_fetch_and_add_int((int *)&_q_value, valueToAdd * QAtomicAdditiveType<T>::AddScale));
|
||||
}
|
||||
# error "This compiler for i386 is not supported"
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -345,66 +345,7 @@ T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
|
||||
#define Q_ATOMIC_INT64_FETCH_AND_ADD_IS_WAIT_FREE
|
||||
|
||||
#else // !Q_CC_INTEL && !Q_CC_GNU
|
||||
|
||||
extern "C" {
|
||||
Q_CORE_EXPORT int q_atomic_test_and_set_int(volatile int *ptr, int expected, int newval);
|
||||
Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval);
|
||||
Q_CORE_EXPORT int q_atomic_increment(volatile int *ptr);
|
||||
Q_CORE_EXPORT int q_atomic_decrement(volatile int *ptr);
|
||||
Q_CORE_EXPORT int q_atomic_set_int(volatile int *ptr, int newval);
|
||||
Q_CORE_EXPORT void *q_atomic_set_ptr(volatile void *ptr, void *newval);
|
||||
Q_CORE_EXPORT int q_atomic_fetch_and_add_int(volatile int *ptr, int value);
|
||||
Q_CORE_EXPORT void *q_atomic_fetch_and_add_ptr(volatile void *ptr, qptrdiff value);
|
||||
} // extern "C"
|
||||
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<4>::ref(T &_q_value)
|
||||
{
|
||||
return q_atomic_increment((int *)&_q_value) != 0;
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::deref(T &_q_value)
|
||||
{
|
||||
return q_atomic_decrement((int *)&_q_value) != 0;
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_int((int*)&_q_value, int(expectedValue), int(newValue));
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue)
|
||||
{
|
||||
return T(q_atomic_set_int((int*)&_q_value, int(newValue));
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd)
|
||||
{
|
||||
return T(q_atomic_fetch_and_add_int((int *)&_q_value, valueToAdd * QAtomicAdditiveType<T>::AddScale));
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_ptr(&_q_value, (void*)expectedValue, (void*)newValue);
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue)
|
||||
{
|
||||
return T(q_atomic_set_ptr(&_q_value, (void*)newValue);
|
||||
}
|
||||
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd)
|
||||
{
|
||||
return T(q_atomic_fetch_and_add_int(&_q_value, valueToAdd * QAtomicAdditiveType<T>::AddScale));
|
||||
}
|
||||
|
||||
# error "This compiler for x86_64 is not supported"
|
||||
#endif // Q_CC_GNU || Q_CC_INTEL
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -1,4 +0,0 @@
|
||||
#
|
||||
# AMD64 architecture
|
||||
#
|
||||
solaris-cc*:SOURCES += $$QT_ARCH_CPP/qatomic_sun.s
|
@ -1,91 +0,0 @@
|
||||
.code64
|
||||
|
||||
.globl q_atomic_increment
|
||||
.type q_atomic_increment,@function
|
||||
.section .text, "ax"
|
||||
.align 16
|
||||
q_atomic_increment:
|
||||
lock
|
||||
incl (%rdi)
|
||||
setne %al
|
||||
ret
|
||||
.size q_atomic_increment,.-q_atomic_increment
|
||||
|
||||
.globl q_atomic_decrement
|
||||
.type q_atomic_decrement,@function
|
||||
.section .text, "ax"
|
||||
.align 16
|
||||
q_atomic_decrement:
|
||||
lock
|
||||
decl (%rdi)
|
||||
setne %al
|
||||
ret
|
||||
.size q_atomic_decrement,.-q_atomic_decrement
|
||||
|
||||
.globl q_atomic_test_and_set_int
|
||||
.type q_atomic_test_and_set_int, @function
|
||||
.section .text, "ax"
|
||||
.align 16
|
||||
q_atomic_test_and_set_int:
|
||||
movl %esi,%eax
|
||||
lock
|
||||
cmpxchgl %edx,(%rdi)
|
||||
movl $0,%eax
|
||||
sete %al
|
||||
ret
|
||||
.size q_atomic_test_and_set_int, . - q_atomic_test_and_set_int
|
||||
|
||||
.globl q_atomic_set_int
|
||||
.type q_atomic_set_int,@function
|
||||
.section .text, "ax"
|
||||
.align 16
|
||||
q_atomic_set_int:
|
||||
xchgl %esi,(%rdi)
|
||||
movl %esi,%eax
|
||||
ret
|
||||
.size q_atomic_set_int,.-q_atomic_set_int
|
||||
|
||||
.globl q_atomic_fetch_and_add_int
|
||||
.type q_atomic_fetch_and_add_int,@function
|
||||
.section .text, "ax"
|
||||
.align 16
|
||||
q_atomic_fetch_and_add_int:
|
||||
lock
|
||||
xaddl %esi,(%rdi)
|
||||
movl %esi, %eax
|
||||
ret
|
||||
.size q_atomic_fetch_and_add_int,.-q_atomic_fetch_and_add_int
|
||||
|
||||
.globl q_atomic_test_and_set_ptr
|
||||
.type q_atomic_test_and_set_ptr, @function
|
||||
.section .text, "ax"
|
||||
.align 16
|
||||
q_atomic_test_and_set_ptr:
|
||||
movq %rsi,%rax
|
||||
lock
|
||||
cmpxchgq %rdx,(%rdi)
|
||||
movq $0, %rax
|
||||
sete %al
|
||||
ret
|
||||
.size q_atomic_test_and_set_ptr, . - q_atomic_test_and_set_ptr
|
||||
|
||||
.globl q_atomic_set_ptr
|
||||
.type q_atomic_set_ptr,@function
|
||||
.section .text, "ax"
|
||||
.align 16
|
||||
q_atomic_set_ptr:
|
||||
xchgq %rsi,(%rdi)
|
||||
movq %rsi,%rax
|
||||
ret
|
||||
.size q_atomic_set_ptr,.-q_atomic_set_ptr
|
||||
|
||||
.globl q_atomic_fetch_and_add_ptr
|
||||
.type q_atomic_fetch_and_add_ptr,@function
|
||||
.section .text, "ax"
|
||||
.align 16
|
||||
q_atomic_fetch_and_add_ptr:
|
||||
lock
|
||||
xaddq %rsi,(%rdi)
|
||||
movq %rsi,%rax
|
||||
ret
|
||||
.size q_atomic_fetch_and_add_ptr,.-q_atomic_fetch_and_add_ptr
|
Loading…
Reference in New Issue
Block a user