diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-03 19:37:45 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-03 19:37:45 +0000 |
commit | fdbb505aea5c2eea599afbee5ef7ed75295349e9 (patch) | |
tree | 7d48228cbb9088d528c307ebedf07fc11c96c8e8 /libgcc | |
parent | 310c48f2f6ad1ae1b60db8acd72e8ac59ed6e8b4 (diff) | |
download | gcc-fdbb505aea5c2eea599afbee5ef7ed75295349e9.tar.gz |
gcc/
* Makefile.in (libgcc.mvars): Add LIBGCC_SYNC and LIBGCC_SYNC_CFLAGS.
* libgcc-std.ver (GCC_4.4.0): New version, inherited from GCC_4.3.0.
Add synchronization functions.
* config/sync.c: New file.
* config/mips/t-libgcc-mips16 (LIBGCC_SYNC): Define.
(LIBGCC_SYNC_CFLAGS): Likewise.
libgcc/
* Makefile.in: Add support for __sync_* libgcc functions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137431 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 4 | ||||
-rw-r--r-- | libgcc/Makefile.in | 48 |
2 files changed, 52 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 1d2a895e2ac..47f304ff9b0 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2008-07-03 Richard Sandiford <rdsandiford@googlemail.com> + + * Makefile.in: Add support for __sync_* libgcc functions. + 2008-07-03 H.J. Lu <hongjiu.lu@intel.com> * shared-object.mk ($(base)_s$(objext)): Remove -DSHARED. diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 369c7fecb58..5718a501830 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -577,6 +577,54 @@ endif endif +ifeq ($(LIBGCC_SYNC),yes) +libgcc-sync-size-funcs := $(foreach op, add sub or and xor nand, \ + sync_fetch_and_$(op) \ + sync_$(op)_and_fetch) \ + sync_bool_compare_and_swap \ + sync_val_compare_and_swap \ + sync_lock_test_and_set + +libgcc-sync-size-funcs := $(foreach prefix, $(libgcc-sync-size-funcs), \ + $(foreach suffix, 1 2 4 8 16, \ + $(prefix)_$(suffix))) + +libgcc-sync-size-funcs-o = $(patsubst %,%$(objext),$(libgcc-sync-size-funcs)) +$(libgcc-sync-size-funcs-o): %$(objext): $(gcc_srcdir)/config/sync.c + $(gcc_compile) $(LIBGCC_SYNC_CFLAGS) \ + -DFN=`echo "$*" | sed 's/_[^_]*$$//'` \ + -DSIZE=`echo "$*" | sed 's/.*_//'` \ + -c $(gcc_srcdir)/config/sync.c $(vis_hide) +libgcc-objects += $(libgcc-sync-size-funcs-o) + +libgcc-sync-funcs := sync_synchronize + +libgcc-sync-funcs-o = $(patsubst %,%$(objext),$(libgcc-sync-funcs)) +$(libgcc-sync-funcs-o): %$(objext): $(gcc_srcdir)/config/sync.c + $(gcc_compile) $(LIBGCC_SYNC_CFLAGS) \ + -DL$* \ + -c $(gcc_srcdir)/config/sync.c $(vis_hide) +libgcc-objects += $(libgcc-sync-funcs-o) + +ifeq ($(enable_shared),yes) +libgcc-sync-size-funcs-s-o = $(patsubst %,%_s$(objext), \ + $(libgcc-sync-size-funcs)) +$(libgcc-sync-size-funcs-s-o): %_s$(objext): $(gcc_srcdir)/config/sync.c + $(gcc_s_compile) $(LIBGCC_SYNC_CFLAGS) \ + -DFN=`echo "$*" | sed 's/_[^_]*$$//'` \ + -DSIZE=`echo "$*" | sed 's/.*_//'` \ + -c $(gcc_srcdir)/config/sync.c +libgcc-s-objects += $(libgcc-sync-size-funcs-s-o) + +libgcc-sync-funcs-s-o = $(patsubst %,%_s$(objext),$(libgcc-sync-funcs)) +$(libgcc-sync-funcs-s-o): %_s$(objext): $(gcc_srcdir)/config/sync.c + $(gcc_s_compile) $(LIBGCC_SYNC_CFLAGS) \ + -DL$* \ + -c $(gcc_srcdir)/config/sync.c +libgcc-s-objects += $(libgcc-sync-funcs-s-o) +endif +endif + # Build fixed-point support. ifeq ($(fixed_point),yes) |