diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2008-07-03 19:37:45 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-07-03 19:37:45 +0000 |
commit | f92518d7ae62839a8f41fbccf72a9cdc3241f6ae (patch) | |
tree | 7d48228cbb9088d528c307ebedf07fc11c96c8e8 /libgcc | |
parent | d0aede1456bb37d1414e4c5cd60b2a29025c36ec (diff) | |
download | gcc-f92518d7ae62839a8f41fbccf72a9cdc3241f6ae.zip gcc-f92518d7ae62839a8f41fbccf72a9cdc3241f6ae.tar.gz gcc-f92518d7ae62839a8f41fbccf72a9cdc3241f6ae.tar.bz2 |
Makefile.in (libgcc.mvars): Add LIBGCC_SYNC and LIBGCC_SYNC_CFLAGS.
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.
From-SVN: r137431
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 1d2a895..47f304f 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 369c7fe..5718a50 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) |