Aldy Hernandez
be223aafde
Add Patrick Marlier to ChangeLog entry.
...
From-SVN: r182912
2012-01-05 14:16:39 +00:00
Aldy Hernandez
1f53a8e6ab
re PR libitm/51171 (XFAIL: libitm.c/reentrant.c execution test)
...
PR other/51171
* testsuite/libitm.c/reentrant.c: Remove xfail.
(thread): Pass x to pure().
From-SVN: r182911
2012-01-05 14:14:29 +00:00
Torvald Riegel
c898f7b85f
libitm: Don't enforce privatization safety if already in serial mode.
...
libitm/
* beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
privatization safety if already in serial mode.
From-SVN: r182676
2011-12-24 01:42:48 +00:00
Torvald Riegel
610e390135
libitm: Fix privatization safety during upgrades to serial mode.
...
libitm/
* beginend.cc (GTM::gtm_thread::restart): Add and handle
finish_serial_upgrade parameter.
* libitm.h (GTM::gtm_thread::restart): Adapt declaration.
* config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
Don't unset reader flag.
(GTM::gtm_rwlock::write_upgrade_finish): New.
* config/posix/rwlock.cc: Same.
* config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
Declare.
* config/posix/rwlock.h: Same.
* method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
flag after commit or after rollback when restarting.
From-SVN: r182675
2011-12-24 01:42:35 +00:00
Torvald Riegel
799142bf74
libitm: Fixed conversion to C++11 atomics.
...
libitm/
* beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
(GTM::gtm_thread::try_commit): Changed memory order.
* config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
as parameter.
* config/linux/x86/futex_bits.h (sys_futex0): Same.
* config/linux/sh/futex_bits.h (sys_futex0): Same.
* config/linux/futex_bits.h (sys_futex0): Same.
* config/linux/futex.cc (futex_wait, futex_wake): Same.
* config/linux/futex.h (futex_wait, futex_wake): Same.
* config/linux/rwlock.h (gtm_rwlock::writers,
gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
ints.
* config/linux/rwlock.cc (gtm_rwlock::read_lock,
gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
gtm_rwlock::write_unlock): Fix memory orders and fences.
* config/posix/rwlock.cc (gtm_rwlock::read_lock,
gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
gtm_rwlock::write_unlock): Same.
* config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
* method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
Add comments.
(gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
gl_wt_dispatch::load, gl_wt_dispatch::store,
gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
orders and fences. Add comments.
From-SVN: r182674
2011-12-24 01:42:20 +00:00
Jakub Jelinek
b0f96e350a
Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
...
* Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
* Makefile.in: Regenerated.
From-SVN: r182593
2011-12-21 17:14:11 +01:00
Kaz Kojima
cc16324749
configure.tgt: Add sh* case.
...
* configure.tgt: Add sh* case.
* config/sh/target.h: New file.
* config/sh/sjlj.S: New file.
* config/linux/sh/futex_bits.h: New file.
From-SVN: r182429
2011-12-17 03:19:40 +00:00
Richard Henderson
aebac0ca06
arm-linux: Add libitm support.
...
* config/arm/hwcap.h, config/arm/hwcap.cc: New files.
* config/arm/sjlj.S, config/arm/target.h: New files.
* config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
(cfi_rel_offset): New.
* config/linux/futex_bits.h: New file.
* config/linux/futex.cc: Include futex_bits.h here...
* config/linux/futex.h: ... not here.
* Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
* configure.ac (ARCH_AM): New conditional.
* Makefile.in, configure: Rebuild.
* configure.tgt: Handle ARM.
From-SVN: r182355
2011-12-14 19:24:05 -08:00
Richard Henderson
5d9d05d349
rwlock.cc (gtm_rwlock::write_lock_generic): Fix signed/unsigned comparison werror.
...
* config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
signed/unsigned comparison werror.
From-SVN: r182302
2011-12-13 12:10:36 -08:00
Richard Henderson
36cfbee133
libitm: Conversion to c++11 atomics.
...
* local_atomic: New file.
* libitm_i.h: Include it.
(gtm_thread::shared_state): Use atomic template.
* beginend.cc (GTM::gtm_clock): Use atomic template.
(global_tid): Use atomic template if 64-bit atomics available.
(gtm_thread::gtm_thread): Update shared_state access.
(gtm_thread::trycommit): Likewise.
(choose_code_path): Update global_tid access.
* method-gl.cc (gl_mg::orec): Use atomic template. Update all users.
* stmlock.h (GTM::gtm_clock): Use atomic template.
(gtm_get_clock, gtm_inc_clock): Update accesses.
* config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
redundant __sync_synchronize after atomic shared_state access.
* config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
(gtm_rwlock::write_lock_generic): Likewise.
(gtm_rwlock::read_unlock): Likewise.
* config/alpha/target.h (atomic_read_barrier): Remove.
(atomic_write_barrier): Remove.
* config/x86/target.h (atomic_read_barrier): Remove.
(atomic_write_barrier): Remove.
From-SVN: r182294
2011-12-13 11:11:25 -08:00
Richard Henderson
062f93f255
Swap the action and jmpbuf arguments to GTM_longjmp
...
On several ABIs, the first register parameter is the same as
the return value register. Moving the action parameter first
avoids the need for register shuffling on these targets.
* libitm_i.h (GTM_longjmp): Swap first and second arguments.
* beginend.c (_ITM_abortTransaction): Update to match.
(GTM::gtm_thread::restart): Likewise.
* config/alpha/sjlj.S (GTM_longjmp): Likewise.
* config/x86/sjlj.S (GTM_longjmp): Likewise.
From-SVN: r181863
2011-11-30 14:29:33 -08:00
Iain Sandoe
bd8aaa863d
Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
...
libitm:
* Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
* Makefile.in: Regenerate.
From-SVN: r181654
2011-11-23 09:46:59 +00:00
Iain Sandoe
8cf36bb3b8
weakref.m4: New file.
...
config:
* weakref.m4: New file.
libitm:
* configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
* alloc_cpp.cc: Generate dummy functions if we don't
HAVE_ELF_STYLE_WEAKREF.
* eh_cpp.cc: Likewise.
* configure: Regenerate.
* aclocal.m4: Likewise.
* config.h.in: Likewise.
* Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
From-SVN: r181618
2011-11-22 14:49:11 +00:00
Iain Sandoe
0b41ebef72
sjlj.S (CONCAT1, [...]): Respond to __USER_LABEL_PREFIX__ for targets that use it.
...
libitm:
* config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
__USER_LABEL_PREFIX__ for targets that use it.
TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
(_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
in portability to non-elf targets.
(GTM_longjmp): LIkewise.
* libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
where required.
From-SVN: r181612
2011-11-22 09:57:19 +00:00
Iain Sandoe
9c9d352aba
memcpy-1.c: Allow for MAP_ANON spelling.
...
libitm:
* testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
* testsuite/libitm.c/memset-1.c: Likewise.
From-SVN: r181611
2011-11-22 09:49:32 +00:00
Andreas Tobler
c6084f681e
Additional fixes for FreeBSD-10 build:
...
/: * libtool.m4: Additional FreeBSD 10 fixes.
boehm-gc/: * configure: Regenerate.
gcc/: * configure: Regenerate.
libffi/: * configure: Regenerate.
libgfortran/: * configure: Regenerate.
libgomp/: * configure: Regenerate.
libitm/: * configure: Regenerate.
libjava/: * configure.ac: Fix some more FreeBSD 10 issues..
* configure: Regenerate.
libjava/libltdl/: * acinclude.m4: Additional FreeBSD 10 fixes.
* configure: Regenerate.
libmudflap/: * configure: Regenerate.
libobjc/: * configure: Regenerate.
libquadmath/: * configure: Regenerate.
libssp/: * configure: Regenerate.
libstdc++-v3/: * configure: Regenerate.
lto-plugin/: * configure: Regenerate.
zlib/: * configure: Regenerate.
From-SVN: r181593
2011-11-21 20:22:35 +01:00
Rainer Orth
adcd36bc3f
Support sun symbol versioning in libitm
...
libitm:
* acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
(LIBITM_ENABLE_SYMVERS): Handle sun style.
* Makefile.am: Handle sun style versioning.
(libitm_la_LINK): Add $(libitm_la_LDFLAGS).
* configure: Regenerate.
* Makefile.in: Regenerate.
contrib:
* make_sunver.pl: Convert '?' in glob patterns to '.'.
From-SVN: r181588
2011-11-21 17:03:50 +00:00
Rainer Orth
59659b5967
Support libitm on Solaris 8 and 9/x86 with Sun as
...
* config/generic/asmcfi.h: Fix comment.
* config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
sequence without .hidden support, error for non-ELF targets.
(GTM_longjmp) [__ELF__]: Only use .hidden if
HAVE_ATTRIBUTE_VISIBILITY.
From-SVN: r181481
2011-11-18 16:15:59 +00:00
Rainer Orth
d846e425c9
Provide all dummy functions in alloc_cpp.cc, eh_cpp.cc
...
* alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
_ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
Dummy functions.
* eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
__cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
From-SVN: r181442
2011-11-17 11:34:33 +00:00
Uros Bizjak
807133470c
re PR bootstrap/51098 (bootstrap failed on avx i686, svn revision 181259 to 181267)
...
PR bootstrap/51098
* acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
* configure: Regenerate.
From-SVN: r181408
2011-11-16 15:51:13 +01:00
H.J. Lu
2841f85e9c
Check ia32 instead of ilp32.
...
2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
From-SVN: r181360
2011-11-14 10:12:24 -08:00
Rainer Orth
8851b42977
libitm port to Tru64 UNIX
...
* config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
.hidden.
(.note.GNU-stack): Only use if __linux__.
* alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
* testsuite/libitm.c/notx.c: Use dg-options "-pthread".
* testsuite/libitm.c/reentrant.c: Likewise.
* testsuite/libitm.c/simple-2.c: Likewise.
* testsuite/libitm.c/txrelease.c: Likewise.
* testsuite/libitm.c++/static_ctor.C: Likewise.
From-SVN: r181262
2011-11-10 17:15:33 +00:00
Richard Henderson
d4b179020b
libitm: Don't add -mavx if the assembler doesn't support avx.
...
* config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
* Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
* configure.ac (ARCH_X86_AVX): New conditional.
* Makefile.in, configure: Rebuild.
From-SVN: r181261
2011-11-10 09:09:04 -08:00
Richard Henderson
430616e7a7
libitm: Work around assembler missing AVX insns.
...
From-SVN: r181246
2011-11-09 16:29:38 -08:00
Richard Henderson
79b1edb6b5
libitm: Remove unused code.
...
In particular, unused code that's presenting portability problems.
From-SVN: r181241
2011-11-09 14:54:55 -08:00
Richard Henderson
8ee9fac21e
libitm: Avoid non-portable x86 branch prediction mnemonic.
...
From-SVN: r181233
2011-11-09 11:51:49 -08:00
Richard Henderson
9bdc63433a
libitm: de-ELF-ize x86/sjlj.S.
...
* config/x86/sjlj.S: Protect elf directives with __ELF__.
Protect .note.GNU-stack with __linux__.
From-SVN: r181229
2011-11-09 10:38:21 -08:00
Richard Henderson
4bdd090f8e
libitm: Configure for gas cfi pseudo ops.
...
* asmcfi.m4: New file.
* configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
* configure, aclocal.m4, config.h.in: Rebuild.
* config/generic/asmcfi.h: New file.
* config/x86/sjlj.S: Use it.
From-SVN: r181224
2011-11-09 10:09:53 -08:00
Richard Henderson
4408b0865b
Fix a darwin10 build problem.
...
local.cc:113:6: error: only weak aliases are supported in this configuration
* local.cc (_ITM_LB): Use a normal call, not a function alias.
From-SVN: r181182
2011-11-08 15:36:33 -08:00
Richard Henderson
3d3b05ff4f
Fix tests for libitm support.
...
From-SVN: r181169
2011-11-08 08:28:30 -08:00
Richard Henderson
01f3428caf
Check for libitm support at top-level.
...
From-SVN: r181168
2011-11-08 08:06:25 -08:00
Rainer Orth
07f03cd348
ChangeLog for last change.
...
From-SVN: r181164
2011-11-08 15:13:00 +00:00
Aldy Hernandez
0a35513e4e
Merge from transactional-memory branch.
...
From-SVN: r181154
2011-11-08 11:13:41 +00:00