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
Rainer Orth
e28a3d8bf2
Fix Solaris/x86 libitm build
...
* configure.tgt: Handle i386 like i[456]86.
* config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
take address.
* config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
!HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
From-SVN: r181163
2011-11-08 14:58:57 +00:00
Aldy Hernandez
0a35513e4e
Merge from transactional-memory branch.
...
From-SVN: r181154
2011-11-08 11:13:41 +00:00