From 4612b9835cd91fb212d015948a4fd1cd0bfaa251 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 11 Dec 2005 16:25:02 +0000 Subject: [PATCH] Directly use the atomic.S from libroot. This avoids needing to have a file per architecture here. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15495 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../network/ppp/shared/libkernelppp/Jamfile | 8 +- .../network/ppp/shared/libkernelppp/atomic.S | 117 ------------------ 2 files changed, 6 insertions(+), 119 deletions(-) delete mode 100644 src/add-ons/kernel/network/ppp/shared/libkernelppp/atomic.S diff --git a/src/add-ons/kernel/network/ppp/shared/libkernelppp/Jamfile b/src/add-ons/kernel/network/ppp/shared/libkernelppp/Jamfile index 3554b6f2af..4b838d7e96 100644 --- a/src/add-ons/kernel/network/ppp/shared/libkernelppp/Jamfile +++ b/src/add-ons/kernel/network/ppp/shared/libkernelppp/Jamfile @@ -47,5 +47,9 @@ KernelStaticLibrary libkernelppp.a : : -fno-pic ; -SEARCH on [ FGristFiles kernel_cpp.cpp ] = [ FDirName $(HAIKU_TOP) src system kernel util ] ; -SEARCH on [ FGristFiles Locker.cpp ] = [ FDirName $(HAIKU_TOP) src system kernel disk_device_manager ] ; +SEARCH on [ FGristFiles kernel_cpp.cpp ] + = [ FDirName $(HAIKU_TOP) src system kernel util ] ; +SEARCH on [ FGristFiles Locker.cpp ] + = [ FDirName $(HAIKU_TOP) src system kernel disk_device_manager ] ; +SEARCH on [ FGristFiles atomic.S ] + = [ FDirName $(HAIKU_TOP) src system libroot os arch $(TARGET_ARCH) ] ; diff --git a/src/add-ons/kernel/network/ppp/shared/libkernelppp/atomic.S b/src/add-ons/kernel/network/ppp/shared/libkernelppp/atomic.S deleted file mode 100644 index 44a5564d87..0000000000 --- a/src/add-ons/kernel/network/ppp/shared/libkernelppp/atomic.S +++ /dev/null @@ -1,117 +0,0 @@ -/* -** Copyright 2003, Marcus Overhagen. All rights reserved. -** Distributed under the terms of the OpenBeOS license. -** -** Copyright 2001, Travis Geiselbrecht. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ - -#define FUNCTION(x) .global x; .type x,@function; x - -.text - -/* int64 atomic_set64(vint64 *value, int64 newValue) */ -FUNCTION(atomic_set64): - push %ebp - push %ebx - movl 12(%esp), %ebp /* value */ - movl 16(%esp), %ebx /* newValue low */ - movl 20(%esp), %ecx /* newValue high */ -_atomic_set64_1: - movl (%ebp), %eax /* testAgainst low */ - movl 4(%ebp), %edx /* testAgainst high */ - lock - cmpxchg8b (%ebp) - jnz _atomic_set64_1 - pop %ebx - pop %ebp - ret - -/* int64 atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst) */ -FUNCTION(atomic_test_and_set64): - push %ebp - push %ebx - movl 12(%esp), %ebp /* value */ - movl 16(%esp), %ebx /* newValue low */ - movl 20(%esp), %ecx /* newValue high */ - movl 24(%esp), %eax /* testAgainst low */ - movl 28(%esp), %edx /* testAgainst high */ - lock - cmpxchg8b (%ebp) - pop %ebx - pop %ebp - ret - -/* int64 atomic_add64(vint64 *value, int64 addValue) */ -FUNCTION(atomic_add64): - push %ebp - push %ebx - movl 12(%esp), %ebp -_atomic_add64_1: - movl (%ebp), %eax - movl 4(%ebp), %edx - movl %eax, %ebx - movl %edx, %ecx - addl 16(%esp), %ebx - adcl 20(%esp), %ecx - lock - cmpxchg8b (%ebp) - jnz _atomic_add64_1 - pop %ebx - pop %ebp - ret - -/* int64 atomic_and64(vint64 *value, int64 andValue) */ -FUNCTION(atomic_and64): - push %ebp - push %ebx - movl 12(%esp), %ebp -_atomic_and64_1: - movl (%ebp), %eax - movl 4(%ebp), %edx - movl %eax, %ebx - movl %edx, %ecx - andl 16(%esp), %ebx - andl 20(%esp), %ecx - lock - cmpxchg8b (%ebp) - jnz _atomic_and64_1 - pop %ebx - pop %ebp - ret - -/* int64 atomic_or64(vint64 *value, int64 orValue) */ -FUNCTION(atomic_or64): - push %ebp - push %ebx - movl 12(%esp), %ebp -_atomic_or64_1: - movl (%ebp), %eax - movl 4(%ebp), %edx - movl %eax, %ebx - movl %edx, %ecx - orl 16(%esp), %ebx - orl 20(%esp), %ecx - lock - cmpxchg8b (%ebp) - jnz _atomic_or64_1 - pop %ebx - pop %ebp - ret - -/* int64 atomic_get64(vint64 *value) */ -FUNCTION(atomic_get64): - push %ebp - push %ebx - movl 12(%esp), %ebp -_atomic_get64_1: - movl (%ebp), %eax - movl 4(%ebp), %edx - movl %eax, %ebx - movl %edx, %ecx - lock - cmpxchg8b (%ebp) - jnz _atomic_get64_1 - pop %ebx - pop %ebp - ret