diff options
author | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-13 22:44:27 +0000 |
---|---|---|
committer | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-13 22:44:27 +0000 |
commit | bac7fba70b55ab8deefd3a72e68cd0a733282fdb (patch) | |
tree | c905c4a14d4f1d7e89745b13416dac4037c5cab2 /boehm-gc | |
parent | df3fc529ce412a7442dee19e2cd1babcb54672d8 (diff) | |
download | linaro-gcc-bac7fba70b55ab8deefd3a72e68cd0a733282fdb.tar.gz linaro-gcc-bac7fba70b55ab8deefd3a72e68cd0a733282fdb.tar.bz2 linaro-gcc-bac7fba70b55ab8deefd3a72e68cd0a733282fdb.zip |
2009-12-09 Matthias Klose <doko@ubuntu.com>
* include/private/gc_locks.h: For __ARM_EABI__ define
GC_test_and_set GC_clear to use the atomic builtins.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155198 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc')
-rw-r--r-- | boehm-gc/ChangeLog | 5 | ||||
-rw-r--r-- | boehm-gc/include/private/gc_locks.h | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index dd87502774c..542ddc1e0b6 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,8 @@ +2009-12-09 Matthias Klose <doko@ubuntu.com> + + * include/private/gc_locks.h: For __ARM_EABI__ define + GC_test_and_set GC_clear to use the atomic builtins. + 2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * Makefile.in: Regenerate. diff --git a/boehm-gc/include/private/gc_locks.h b/boehm-gc/include/private/gc_locks.h index d1bb2e4521a..54cfdb92d37 100644 --- a/boehm-gc/include/private/gc_locks.h +++ b/boehm-gc/include/private/gc_locks.h @@ -207,6 +207,12 @@ # define GC_CLEAR_DEFINED # endif /* ALPHA */ # ifdef ARM32 +# define GC_TEST_AND_SET_DEFINED +# if (__GNUC__>4)||((__GNUC__==4)&&(__GNUC_MINOR__>=5)) && defined(__ARM_EABI__) +# define GC_CLEAR_DEFINED +# define GC_test_and_set(addr) __sync_lock_test_and_set (addr, 1) +# define GC_clear(addr) __sync_lock_release (addr) +# else inline static int GC_test_and_set(volatile unsigned int *addr) { int oldval; /* SWP on ARM is very similar to XCHG on x86. Doesn't lock the @@ -219,7 +225,7 @@ : "memory"); return oldval; } -# define GC_TEST_AND_SET_DEFINED +# endif # endif /* ARM32 */ # ifdef CRIS inline static int GC_test_and_set(volatile unsigned int *addr) { |