search for: __sync_val_compare_and_swap

Displaying 20 results from an estimated 23 matches for "__sync_val_compare_and_swap".

2009 Jul 01
2
[LLVMdev] build failure on ARM linux
llvm/lib/System/Atomic.cpp contains the call to __sync_val_compare_and_swap that lowers to the missing __sync_val_compare_and_swap_4 GCC intrinsic. The same file contains several other __sync_* calls and all these has to be implemented if we want to be able to compile llvm on linux/ARM with GCC versions below < 4.4 xerxes at labbserver:~/llvm$ grep _sync lib/*/* l...
2009 Jul 01
0
[LLVMdev] build failure on ARM linux
Why is his configure not catching this? It tests for the linkability of these functions on the target arch, and should be detecting their absence if that is actually the case. --Owen On Jul 1, 2009, at 12:50 AM, Xerxes Rånby wrote: > llvm/lib/System/Atomic.cpp contains the call to > __sync_val_compare_and_swap that lowers to the missing > __sync_val_compare_and_swap_4 GCC intrinsic. > > The same file contains several other __sync_* calls and all these has > to be implemented if we want to be able to compile llvm on linux/ARM > with GCC versions below < 4.4 > > xerxes at labbserve...
2009 May 24
2
[LLVMdev] broken Atomic.cpp on Darwin
There is no __sync_synchronize or __sync_val_compare_and_swap on Mac OS X. One might use OSMemoryBarrier or OSAtomicCompareAndSwap32 instead. The patch is attached. - xi -------------- next part -------------- A non-text attachment was scrubbed... Name: patch Type: application/octet-stream Size: 1248 bytes Desc: not available URL: <http://lists.llvm.org...
2009 May 24
2
[LLVMdev] broken Atomic.cpp on Darwin
...CC 4.2. i686-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5566) Should I use something else for LLVM? - xi On Sun, May 24, 2009 at 1:20 AM, Owen Anderson <resistor at mac.com> wrote: > > On May 23, 2009, at 9:41 PM, Xi Wang wrote: > > There is no __sync_synchronize or __sync_val_compare_and_swap on Mac > OS X.  One might use OSMemoryBarrier or OSAtomicCompareAndSwap32 > instead.  The patch is attached. > > Actually, __sync_synchronize and __sync_val_compare_and_swap DO exist on > Darwin, but only if you use Apple's GCC 4.2 (or later), just as it is on > Linux.  We alw...
2009 Nov 16
1
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Prasanth J wrote: > Hi, > > I can able to compile LLVM using armgcc_4.3.3 (codesourcery2009q1..).. > but when i tried to run it on target it shows GCC 4.3.0 version not > found. So i copied the runtime libraries (libc.so and libgcc_s.so) > from the toolchain to the target and exported its path in > LD_LIBRARY_PATH. But when i tried to run any llvm tools on target its >
2009 May 24
0
[LLVMdev] broken Atomic.cpp on Darwin
On May 23, 2009, at 9:41 PM, Xi Wang wrote: > There is no __sync_synchronize or __sync_val_compare_and_swap on Mac > OS X. One might use OSMemoryBarrier or OSAtomicCompareAndSwap32 > instead. The patch is attached. Actually, __sync_synchronize and __sync_val_compare_and_swap DO exist on Darwin, but only if you use Apple's GCC 4.2 (or later), just as it is on Linux. We always want to use...
2009 May 24
0
[LLVMdev] broken Atomic.cpp on Darwin
...(Apple Inc. build 5566) > > Should I use something else for LLVM? > > - xi > > On Sun, May 24, 2009 at 1:20 AM, Owen Anderson <resistor at mac.com> > wrote: >> >> On May 23, 2009, at 9:41 PM, Xi Wang wrote: >> >> There is no __sync_synchronize or __sync_val_compare_and_swap on Mac >> OS X. One might use OSMemoryBarrier or OSAtomicCompareAndSwap32 >> instead. The patch is attached. >> >> Actually, __sync_synchronize and __sync_val_compare_and_swap DO >> exist on >> Darwin, but only if you use Apple's GCC 4.2 (or later), just...
2009 Nov 16
0
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Hi, I can able to compile LLVM using armgcc_4.3.3 (codesourcery2009q1..).. but when i tried to run it on target it shows GCC 4.3.0 version not found. So i copied the runtime libraries (libc.so and libgcc_s.so) from the toolchain to the target and exported its path in LD_LIBRARY_PATH. But when i tried to run any llvm tools on target its crashing with Segmentation fault. What could be the problem
2009 Nov 14
0
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue
...Release executable c-index-test (without symbols) > > > /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: > > > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/Release/bin/c-index-test: > > hidden symbol `__sync_val_compare_and_swap_4' in > > > /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/libgcc.a(linux-atomic.o) > > is referenced by DSO > > > /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: > > fina...
2009 Nov 13
2
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue
...9; > llvm[4]: Linking Release executable c-index-test (without symbols) > /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/Release/bin/c-index-test: > hidden symbol `__sync_val_compare_and_swap_4' in > /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/libgcc.a(linux-atomic.o) > is referenced by DSO > /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: > final link failed: Nonrepresentabl...
2009 Nov 16
3
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Prasanth J wrote: > Hi, > > As you said i downloaded arm toolchain from codesourcery(2009q3 with > gcc 4.4.1 version).. if i use this toolchain i am getting the > following error.. > > make[2]: Entering directory > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis' > llvm[2]: Compiling LoopPass.cpp for Release build > if arm-none-linux-gnueabi-g++
2009 Jun 30
0
[LLVMdev] build failure on ARM linux
Nick Lewycky wrote: > 2009/6/30 Andrew Haley <aph at redhat.com <mailto:aph at redhat.com>> > > Nick Lewycky wrote: > > I'm seeing this new build failure, starting some time yesterday on > ARM: > > Yes. It's just a matter of defining __sync_val_compare_and_swap_4: > > http://gcc.gnu.org/svn/gcc/trunk/gcc/config/arm/linux-atomic.c > > > The program is supposed to define it? LLVM doesn't directly call > __sync_val_compare_and_swap_4, so either the system headers #define > something else to it or gcc lowers another call to tha...
2013 May 14
2
[LLVMdev] Keeping Clang from changing function calls to IR operations: cmpxchg
I'm working on getting the LLVM/projects/Test-Suite/UnitTest to compile for a target that I am developing. There is an example: AtomicOps, that uses calls to: __sync_fetch_and_add __sync_val_compare_and_swap __sync_lock_test_and_set These get converted into llvm IR operations like: atomicrmw cmpxchg Is there any way to keep these as function calls, as they are easier to map to the target's eventual functional then having to deal with atomicrmw and cmpxchg -------------- next part --------------...
2012 Feb 28
0
[LLVMdev] [patch] atomic functions on darwin
...# error No memory fence implementation for your platform! -# endif #endif } @@ -43,6 +53,8 @@ if (result == old_value) *ptr = new_value; return result; +#elif defined(__APPLE__) + return OSAtomicCompareAndSwap32(old_value, new_value, vcast(ptr)); #elif defined(__GNUC__) return __sync_val_compare_and_swap(ptr, old_value, new_value); #elif defined(_MSC_VER) @@ -56,6 +68,8 @@ #if LLVM_HAS_ATOMICS == 0 ++(*ptr); return *ptr; +#elif defined(__APPLE__) + return OSAtomicIncrement32(vcast(ptr)); #elif defined(__GNUC__) return __sync_add_and_fetch(ptr, 1); #elif defined(_MSC_VER) @@ -69,6 +83,...
2009 Jun 30
3
[LLVMdev] build failure on ARM linux
...home/nlewycky/llvm/Debug/lib -o > /home/nlewycky/llvm/Debug/bin/llvmc > /home/nlewycky/llvm/tools/llvmc/driver/Debug/Main.o -lplugin_llvmc_Base > -lplugin_llvmc_Clang \ > > -lpthread -ldl -lm > > /usr/bin/ld: /home/nlewycky/llvm/Debug/bin/llvmc: hidden symbol > `__sync_val_compare_and_swap_4' in > /usr/lib/gcc/arm-linux-gnueabi/4.3.3/libgcc.a(linux-atomic.o) is referenced > by DSO > > /usr/bin/ld: final link failed: Nonrepresentable section on output > > collect2: ld returned 1 exit status > > make[3]: *** [/home/nlewycky/llvm/Debug/bin/llvmc] Error 1 >...
2012 Jul 15
1
[LLVMdev] Errors reported in config.log on linux
....c:187: error: (Each undeclared identifier is reported only once conftest.c:187: error: for each function it appears in.) conftest.cpp:161: error: `finite' was not declared in this scope conftest.cpp:164: error: `__sync_synchronize' was not declared in this scope conftest.cpp:165: error: `__sync_val_compare_and_swap' was not declared in this scope conftest.cpp:166: error: `__sync_add_and_fetch' was not declared in this scope conftest.cpp:167: error: `__sync_sub_and_fetch' was not declared in this scope Warnings: conftest.c:87: warning: conflicting types for built-in function 'strchr' conf...
2013 May 14
0
[LLVMdev] Keeping Clang from changing function calls to IR operations: cmpxchg
...On Tue, May 14, 2013 at 3:46 PM, Dan <westdac at gmail.com> wrote: > > I'm working on getting the LLVM/projects/Test-Suite/UnitTest to compile > for a target that I am developing. > > There is an example: AtomicOps, that uses calls to: > > __sync_fetch_and_add > __sync_val_compare_and_swap > __sync_lock_test_and_set > > These get converted into llvm IR operations like: > > atomicrmw > cmpxchg > > Is there any way to keep these as function calls, as they are easier to > map to the target's eventual functional then having to deal with atomicrmw > and c...
2009 Nov 13
0
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue
...ools/c-index-test' llvm[4]: Linking Release executable c-index-test (without symbols) /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/Release/bin/c-index-test: hidden symbol `__sync_val_compare_and_swap_4' in /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/libgcc.a(linux-atomic.o) is referenced by DSO /home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...c, 1)) +# define atomic_dec_and_test(x) (__sync_add_and_fetch (&(x)->atomic, -1) == 0) # define atomic_add(x, v) ((void) __sync_add_and_fetch(&(x)->atomic, (v))) # define atomic_dec(x, v) ((void) __sync_sub_and_fetch(&(x)->atomic, (v))) # define atomic_cmpxchg(x, oldv, newv) __sync_val_compare_and_swap (&(x)->atomic, oldv, newv) @@ -68,6 +69,7 @@ typedef struct { # define atomic_read(x) AO_load_full(&(x)->atomic) # define atomic_set(x, val) AO_store_full(&(x)->atomic, (val)) # define atomic_inc(x) ((void) AO_fetch_and_add1_full(&(x)->atomic)) +# define atomic_inc_re...
2009 Nov 09
1
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue
Prasanth J skrev: > Hi, > > i am a newbie to llvm architecture. i have been trying to port llvm on > ARM target. i am using the following configuration for cross compiling > llvm. > > ../llvm/configure --host=arm-linux --target=arm-linux > --build=i686-linux --prefix=/opt/llvm-arm/ --enable-optimized > --disable-debug \ > --disable-expensive-checks --disable-doxygen