PR c++/55262
[official-gcc.git] / libitm / ChangeLog
blobbad2c8d586af5b92804dcbf6b59225de1b43b436
1 2012-11-09  Torvald Riegel  <triegel@redhat.com>
3         * beginend.cc (htm_fastpath): New.
4         (gtm_thread::begin_transaction, _ITM_commitTransaction,
5         _ITM_commitTransactionEH): Add HTM fastpath handling.
6         * config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
7         * config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
8         * config/x86/target.h (htm_available, htm_init, htm_begin_success,
9         htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
10         * configure.tgt: Add -mrtm to XCFLAGS.
11         * method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
12         (gtm_thread::serialirr_mode): Add HTM fastpath handling.
13         * libitm_i.h (htm_fastpath, dispatch_htm): Declare.
14         * retry.cc (parse_default_method): Add HTM method parsing.
15         (gtm_thread::number_of_threads_changed): Use HTM by default if
16         available.
18 2012-11-04  Thomas Schwinge  <thomas@codesourcery.com>
20         * configure: Regenerate.
22 2012-10-31  Richard Henderson  <rth@redhat.com>
24         * acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
25         * configure.ac: Use it.
26         * config.h.in, configure: Rebuild.
27         * testsuite/Makefile.in: Rebuild.
29 2012-10-24  Torvald Riegel  <triegel@redhat.com>
31         * libitm.texi: Clarify ABI requirements for data-logging functions.
33 2012-10-24  Torvald Riegel  <triegel@redhat.com>
35         * retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
36         it requires serial mode instead of assuming that for certain
37         dispatchs.
38         * dispatch.h (abi_dispatch::requires_serial): New.
39         (abi_dispatch::abi_dispatch): Adapt.
40         * method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
41         * method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
42         * method-serial.cc (serialirr_dispatch::serialirr_dispatch,
43         serial_dispatch::serial_dispatch,
44         serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
46 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
48         * config/x86/target.h (struct gtm_jmpbuf): Merge x86_64
49         and ia32 declarations some more.
50         * config/x86/sjlj.S (_ITM_beginTransaction): Move ret to common code.
52 2012-09-20  Jakub Jelinek  <jakub@redhat.com>
54         PR other/43620
55         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
56         * configure: Regenerate.
57         * Makefile.in: Regenerate.
59 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
61         * configure: Regenerated.
63 2012-07-31  Uros Bizjak  <ubizjak@gmail.com>
65         * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.
67 2012-05-21  Patrick Marlier  <patrick.marlier@gmail.com>
69         * eh_cpp.cc: Fix __cxa_end_catch declaration.
71 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
73         * configure: Regenerated.
75 2012-04-04  H.J. Lu  <hongjiu.lu@intel.com>
77         PR libitm/52854
78         * config/x86/target.h (gtm_jmpbuf): Replace long with long long
79         for x86-64.
81 2012-04-03  Tristan Gingold  <gingold@adacore.com>
83         * configure: Regenerate.
85 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
87         PR bootstrap/52812
88         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
90 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
92         * testsuite/lib/libitm.exp: load fortran-modules.exp
94 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
96         * configure.tgt (*-*-irix6*): Remove.
98 2012-03-13  Torvald Riegel  <triegel@redhat.com>
100         PR libitm/52526
101         * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
102         wake-up.
104 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
106         * configure.tgt (*-*-osf*): Remove.
107         * configure: Regenerate.
109 2012-03-05  Torvald Riegel  <triegel@redhat.com>
111         * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
112         memtransfer/memset if size isn't larger than zero.
114 2012-03-02  Torvald Riegel  <triegel@redhat.com>
116         * libitm.texi: Link to specification and add a usage example.
118 2012-02-24  Torvald Riegel  <triegel@redhat.com>
120         * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
121         default dispatch for more than 1 thread to ml_wt.
123 2012-02-20  Torvald Riegel  <triegel@redhat.com>
125         * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
127 2012-02-20  Torvald Riegel  <triegel@redhat.com>
129         * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
131 2012-02-20  Torvald Riegel  <triegel@redhat.com>
133         * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
134         serial mode corner cases made obsolete by prior gtm_rwlock changes.
135         (gl_wt_dispatch.rollback): Same.
137 2012-02-20  Torvald Riegel  <triegel@redhat.com>
139         * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
141 2012-02-20  Torvald Riegel  <triegel@redhat.com>
143         * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
144         for RfW src.  Optimize number of calls to gtm_thr.
146 2012-02-20  Torvald Riegel  <triegel@redhat.com>
148         * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
149         acquisition to ...
150         * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
151         (default_dispatch): Make atomic.
152         (GTM::gtm_thread::set_default_dispatch): Access atomically.
153         (GTM::gtm_thread::decide_retry_strategy): Access atomically and
154         use decide_begin_dispatch() if default_dispatch might have changed.
155         (GTM::gtm_thread::number_of_threads_changed): Initialize
156         default_dispatch here.
158 2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
159             Patrick Marlier  <patrick.marlier@gmail.com>
161         PR libitm/52220
162         * alloc_cpp.cc: No dummy definitions for darwin.
163         * eh_cpp.cc: Likewise.
165 2012-02-14  Richard Henderson  <rth@redhat.com>
167         * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
169 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
171         * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
173 2012-02-14  Torvald Riegel  <triegel@redhat.com>
175         * libitm_i.h (GTM::gtm_rwlog_entry): New.
176         (GTM::gtm_thread): Add read and write logs.
177         (GTM::dispatch_ml_wt): Declare.
178         * retry.cc (parse_default_method): Support ml_wt.
179         * method-ml.cc: New file.
180         * Makefile.am: Add method-ml.cc.
181         * Makefile.in: Regenerate.
183 2012-02-14  Torvald Riegel  <triegel@redhat.com>
185         * dispatch.h (GTM::abi_dispatch::supports): New.
186         (GTM::method_group::reinit): New.
187         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
188         (GTM::gtm_thread::number_of_threads_changed): Check that the method
189         supports the current situation.
191 2012-02-14  Torvald Riegel  <triegel@redhat.com>
193         * util.cc (GTM::xcalloc): New.
194         * common.h (GTM::xcalloc): Declare.
196 2012-02-14  Eric Botcazou  <ebotcazou@adacore.com>
198         * config/sparc/target.h (cpu_relax): Read from CC register.
199         * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
201 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
203         * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
205 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
207         * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
208         * config/sparc/cacheline.h: New file.
209         * config/sparc/target.h: Likewise.
210         * config/sparc/sjlj.S: Likewise.
211         * config/linux/sparc/futex_bits.h: Likewise.
213 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
215         * configure.ac (link_itm): Fix comment.
216         * configure: Regenerate.
217         * testsuite/lib/libitm.exp: Do not pass -litm for the link.
219 2012-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
221         PR libitm/51822
222         * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
223         Correct libgomp references.
225 2012-01-24  Torvald Riegel  <triegel@redhat.com>
227         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
228         wake-up.
230 2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
232         * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
233         end of structure.
234         * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
235         offset values.  Do not copy return address.  Decrement stack
236         by 56 bytes only.
237         (GTM_longjump) [__x86_64__]: Update offset values.
239 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
241         PR libitm/51830
242         * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
243         the first function argument to %eax.
245 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
247         * libitm.h (_ITM_getThreadnum): Remove.
248         * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
250 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
252         * clearcap.map: New file.
253         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
254         * configure.ac: Call it.
255         Clear HWCAP_LDFLAGS if defaulting to -mavx.
256         * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
257         * configure: Regenerate.
258         * Makefile.in: Regenerate.
259         * testsuite/Makefile.in: Regenerate.
261 2012-01-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
263         PR libitm/51173
264         * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
265         include, exclude options.
267 2012-01-14  Torvald Riegel  <triegel@redhat.com>
269         * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
270         rolling back.
271         * containers.h (GTM::vector::set_size): New.
273 2012-01-14  Torvald Riegel  <triegel@redhat.com>
275         PR libitm/51855
276         * config/generic/tls.h (GTM::mask_stack_top): New.
277         (GTM::mask_stack_bottom): Declare.
278         * config/generic/tls.c (GTM::mask_stack_bottom): New.
279         * local.cc (gtm_undolog::rollback): Filter out any updates that
280         overlap the libitm stack.  Add current transaction as parameter.
281         * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
282         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
283         * testsuite/libitm.c/stackundo.c: New test.
285 2012-01-10  Richard Henderson  <rth@redhat.com>
287         * libitm_i.h (_Unwind_DeleteException): Declare weak.
288         * eh_cpp.cc (_Unwind_DeleteException): Define for
289         !HAVE_ELF_STYLE_WEAKREF.
291 2012-01-08  Torvald Riegel  <triegel@redhat.com>
293         * local.cc (GTM_LB): Use GTM::gtm_undolog.
294         (GTM::gtm_thread::drop_references_undolog): Remove.
295         (GTM::gtm_thread::commit_undolog,
296         GTM::gtm_thread::rollback_undolog): Move to ...
297         * libitm_i.h (GTM::gtm_undolog): ...here. New.
298         (GTM::gtm_undolog_entry): Remove.
299         (GTM::gtm_thread): Adapt.
300         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
301         (GTM::gtm_thread::trycommit): Adapt.
302         * method-serial.cc (serial_dispatch::log): Adapt.
303         * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
304         (gl_wt_dispatch::store): Fix likely/unlikely.
305         * containers.h (GTM::vector::resize): Add additional_capacity
306         parameter and handle it.
307         (GTM::vector::resize_noinline): New/adapt.
308         (GTM::vector::push): New.
310 2012-01-06  Richard Henderson  <rth@redhat.com>
312         * configure.tgt: Support powerpc-linux and powerpc-darwin.
313         * config/linux/powerpc/futex_bits.h: New file.
314         * config/powerpc/cacheline.h: New file.
315         * config/powerpc/sjlj.S: New file.
316         * config/powerpc/target.h: New file.
317         * config/generic/asmcfi.h (cfi_offset): New.
318         (cfi_restore, cfi_undefined): New.
320 2012-01-05  Aldy Hernandez  <aldyh@redhat.com>
322         PR other/51171
323         * testsuite/libitm.c/reentrant.c: Remove xfail.
324         (thread): Pass x to pure().
325         From Patrik Marlier <patrick.marlier@gmail.com>.
327 2011-12-24  Torvald Riegel  <triegel@redhat.com>
329         * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
330         privatization safety if already in serial mode.
332 2011-12-24  Torvald Riegel  <triegel@redhat.com>
334         * beginend.cc (GTM::gtm_thread::restart): Add and handle
335         finish_serial_upgrade parameter.
336         * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
337         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
338         Don't unset reader flag.
339         (GTM::gtm_rwlock::write_upgrade_finish): New.
340         * config/posix/rwlock.cc: Same.
341         * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
342         Declare.
343         * config/posix/rwlock.h: Same.
344         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
345         flag after commit or after rollback when restarting.
347 2011-12-24  Torvald Riegel  <triegel@redhat.com>
349         * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
350         (GTM::gtm_thread::try_commit): Changed memory order.
351         * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
352         as parameter.
353         * config/linux/x86/futex_bits.h (sys_futex0): Same.
354         * config/linux/sh/futex_bits.h (sys_futex0): Same.
355         * config/linux/futex_bits.h (sys_futex0): Same.
356         * config/linux/futex.cc (futex_wait, futex_wake): Same.
357         * config/linux/futex.h (futex_wait, futex_wake): Same.
358         * config/linux/rwlock.h (gtm_rwlock::writers,
359         gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
360         ints.
361         * config/linux/rwlock.cc (gtm_rwlock::read_lock,
362         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
363         gtm_rwlock::write_unlock): Fix memory orders and fences.
364         * config/posix/rwlock.cc (gtm_rwlock::read_lock,
365         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
366         gtm_rwlock::write_unlock): Same.
367         * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
368         * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
369         gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
370         Add comments.
371         (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
372         gl_wt_dispatch::load, gl_wt_dispatch::store,
373         gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
374         orders and fences.  Add comments.
376 2011-12-21  Jakub Jelinek  <jakub@redhat.com>
378         * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
379         * Makefile.in: Regenerated.
381 2011-12-17  Kaz Kojima  <kkojima@gcc.gnu.org>
383         * configure.tgt: Add sh* case.
384         * config/sh/target.h: New file.
385         * config/sh/sjlj.S: New file.
386         * config/linux/sh/futex_bits.h: New file.
388 2011-12-14  Richard Henderson  <rth@redhat.com>
390         * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
391         * config/arm/sjlj.S, config/arm/target.h: New files.
392         * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
393         (cfi_rel_offset): New.
394         * config/linux/futex_bits.h: New file.
395         * config/linux/futex.cc: Include futex_bits.h here...
396         * config/linux/futex.h: ... not here.
397         * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
398         * configure.ac (ARCH_AM): New conditional.
399         * Makefile.in, configure: Rebuild.
400         * configure.tgt: Handle ARM.
402 2011-12-13  Richard Henderson  <rth@redhat.com>
404         * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
405         signed/unsigned comparison werror.
407         * local_atomic: New file.
408         * libitm_i.h: Include it.
409         (gtm_thread::shared_state): Use atomic template.
410         * beginend.cc (GTM::gtm_clock): Use atomic template.
411         (global_tid): Use atomic template if 64-bit atomics available.
412         (gtm_thread::gtm_thread): Update shared_state access.
413         (gtm_thread::trycommit): Likewise.
414         (choose_code_path): Update global_tid access.
415         * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
416         * stmlock.h (GTM::gtm_clock): Use atomic template.
417         (gtm_get_clock, gtm_inc_clock): Update accesses.
418         * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
419         redundant __sync_synchronize after atomic shared_state access.
420         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
421         (gtm_rwlock::write_lock_generic): Likewise.
422         (gtm_rwlock::read_unlock): Likewise.
423         * config/alpha/target.h (atomic_read_barrier): Remove.
424         (atomic_write_barrier): Remove.
425         * config/x86/target.h (atomic_read_barrier): Remove.
426         (atomic_write_barrier): Remove.
428 2011-11-30  Richard Henderson  <rth@redhat.com>
430         * libitm_i.h (GTM_longjmp): Swap first and second arguments.
431         * beginend.c (_ITM_abortTransaction): Update to match.
432         (GTM::gtm_thread::restart): Likewise.
433         * config/alpha/sjlj.S (GTM_longjmp): Likewise.
434         * config/x86/sjlj.S (GTM_longjmp): Likewise.
436 2011-11-23  Iain Sandoe  <iains@gcc.gnu.org>
438         * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
439         * Makefile.in: Regenerate.
441 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
443         * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
444         * alloc_cpp.cc: Generate dummy functions if we don't
445         HAVE_ELF_STYLE_WEAKREF.
446         * eh_cpp.cc: Likewise.
447         * configure: Regenerate.
448         * aclocal.m4:  Likewise.
449         * config.h.in: Likewise.
450         * Makefile.in: Likewise.
451         * testsuite/Makefile.in: Likewise.
453 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
455         * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
456         __USER_LABEL_PREFIX__ for targets that use it.
457         (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
458         (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
459         in portability to non-elf targets.
460         (GTM_longjmp): Likewise.
461         * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
462         where required.
464 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
466         * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
467         * testsuite/libitm.c/memset-1.c: Likewise.
469 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
471         * configure: Regenerate.
473 2011-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
475         * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
476         (LIBITM_ENABLE_SYMVERS): Handle sun style.
477         * Makefile.am: Handle sun style versioning.
478         (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
479         * configure: Regenerate.
480         * Makefile.in: Regenerate.
482 2011-11-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
484         * config/generic/asmcfi.h: Fix comment.
485         * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
486         sequence without .hidden support, error for non-ELF targets.
487         (GTM_longjmp) [__ELF__]: Only use .hidden if
488         HAVE_ATTRIBUTE_VISIBILITY.
490 2011-11-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
492         * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
493         _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
494         Dummy functions.
495         * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
496         __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
498 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
500         PR bootstrap/51098
501         * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
502         * configure: Regenerate.
504 2011-11-14  H.J. Lu  <hongjiu.lu@intel.com>
506         * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
508 2011-11-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
510         * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
511         .hidden.
512         (.note.GNU-stack): Only use if __linux__.
513         * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
514         * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
515         * testsuite/libitm.c/reentrant.c: Likewise.
516         * testsuite/libitm.c/simple-2.c: Likewise.
517         * testsuite/libitm.c/txrelease.c: Likewise.
518         * testsuite/libitm.c++/static_ctor.C: Likewise.
520 2011-11-10  Richard Henderson  <rth@redhat.com>
522         * config/x86/x86_avx.cc: Remove #undef __AVX__ hack.  Tidy comments.
523         * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
524         * configure.ac (ARCH_X86_AVX): New conditional.
525         * Makefile.in, configure: Rebuild.
527 2011-11-09  Richard Henderson  <rth@redhat.com>
529         * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
530         * configure.ac: Use it.
531         * config.h.in, configure: Rebuild.
532         * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
534 2011-11-09  Richard Henderson  <rth@redhat.com>
536         * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
537         * config/alpha/unaligned.h: Remove file.
538         * config/generic/unaligned.h: Remove file.
539         * config/x86/unaligned.h: Remove file.
540         * config/generic/cachepage.h: Remove file.
541         * config/posix/cachepage.cc: Remove file.
542         * config/generic/cacheline.cc: Remove file.
543         * config/x86/cacheline.cc: Remove file.
544         * config/generic/cacheline.h (gtm_cacheline): Remove the
545         store_mask, copy_mask, copy_mask_wb methods.
546         * config/x86/cacheline.h: Likewise.
547         * config/alpha/cacheline.h: Fall back to generic after setting size.
548         * config/generic/tls.cc (gtm_mask_stack): Remove.
549         * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
550         (GTM_vpalignr_table): Remove.
551         * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
552         (GTM_pshift_table): Remove.
553         * config/libitm_i.h: Don't include cachepage.h.
554         * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
555         * Makefile.in, testsuite/Makefile.in: Rebuild.
557 2011-11-09  Richard Henderson  <rth@redhat.com>
559         * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
560         to emit branch prediction hint.
562         * config/x86/sjlj.S: Protect elf directives with __ELF__.
563         Protect .note.GNU-stack with __linux__.
565         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
566         * configure, aclocal.m4, config.h.in: Rebuild.
567         * config/generic/asmcfi.h: New file.
568         * config/x86/sjlj.S: Use it.
570 2011-11-08  Richard Henderson  <rth@redhat.com>
572         * local.cc (_ITM_LB): Use a normal call, not a function alias.
574 2011-11-08  Richard Henderson  <rth@redhat.com>
576         * configure.tgt: Test correct directory for supported cpus.
578         * configure.ac: Exit if unsupported.
579         * configure: Rebuild.
580         * configure.tgt: Delete boilerplate from libgomp for unsupported
581         targets.  Set UNSUPPORTED for unsupported targets.
583 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
585         * configure.tgt: Handle i386 like i[456]86.
586         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
587         take address.
588         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
589         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
591 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
593         * method-wbetl.cc: Update copyright notice.
594         * aatree.cc: Same.
595         * util.cc: Same.
596         * libitm.h: Same.
597         * memset.cc: Same.
598         * eh_cpp.cc: Same.
599         * barrier.tpl: Same.
600         * useraction.cc: Same.
601         * stmlock.h: Same.
602         * memcpy.cc: Same.
603         * common.h: Same.
604         * config/generic/tls.cc: Same.
605         * config/generic/cacheline.h: Same.
606         * config/generic/cachepage.h: Same.
607         * config/generic/cacheline.cc: Same.
608         * config/generic/unaligned.h: Same.
609         * config/x86/cacheline.h: Same.
610         * config/x86/cacheline.cc: Same.
611         * config/x86/unaligned.h: Same.
612         * config/alpha/cacheline.h: Same.
613         * config/alpha/unaligned.h: Same.
614         * config/alpha/sjlj.S: Same.
615         * config/posix/cachepage.cc: Same.
616         * config/linux/futex.h: Same.
617         * config/linux/alpha/futex_bits.h: Same.
619 2011-11-04  Torvald Riegel  <triegel@redhat.com>
621         * libitm.texi: No cover text and invariant sections.
623 2011-11-03  Richard Henderson  <rth@redhat.com>
625         * local_type_traits: New file.
626         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
628 2011-11-03  Richard Henderson  <rth@redhat.com>
630         * configure.ac: Don't test for gfortran.
631         * configure: Rebuild.
633         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
634         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
636 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
638         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
639         * testsuite/libitm.c/memset-1.c: Same.
640         * testsuite/libitm.c/c.exp: Same.
641         * testsuite/lib/libitm-dg.exp: Same.
642         * testsuite/lib/libitm.exp: Same.
643         * testsuite/libitm.c++/c++.exp: Same.
645 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
647         * testsuite/config/default.exp: Update copyright date.
648         * configure.ac: Add copyright info.
649         * configure.tgt: Same.
651 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
653         * testsuite/libitm.c/reentrant.c: XFAIL.
654         * testsuite/libitm.c++/static_ctor.C: XFAIL.
656 2011-10-29  Torvald Riegel  <triegel@redhat.com>
658         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
659         handle aborts.
660         (_ITM_abortTransaction): Handle aborts of outer transactions.
661         * libitm_i.h: Same.
662         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
663         * libitm.texi: Document aborts of outer transactions.
664         * testsuite/libitm.c/cancel.c: New file.
666 2011-10-19  Torvald Riegel  <triegel@redhat.com>
668         * testsuite/*: Change __transaction to __transaction_atomic or
669         __transaction_relaxed.
671 2011-10-19  Torvald Riegel  <triegel@redhat.com>
673         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
674         (gtm_thr): Same.
676 2011-10-19  Torvald Riegel  <triegel@redhat.com>
678         * libitm_i.h: Add gl_wt dispatch.
679         * retry.cc (parse_default_method): Same.
680         * method-gl.cc: New file.
681         * Makefile.am: Use method-gl.cc.
682         * Makefile.in: Rebuild.
684 2011-10-19  Torvald Riegel  <triegel@redhat.com>
686         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
687         safety if requested by a TM method.
688         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
689         privatization safety.
690         * method-serial.cc: Same.
692 2011-10-19  Torvald Riegel  <triegel@redhat.com>
694         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
695         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
696         undolog-related member functions from *_local to *_undolog.
697         * local.cc (gtm_thread::commit_undolog): Same.
698         * beginend.cc (GTM::gtm_thread::trycommit): Same.
699         (GTM::gtm_thread::rollback): Roll back undolog before
700         dispatch-specific rollback.
702 2011-10-19  Torvald Riegel  <triegel@redhat.com>
704         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
705         re-initialization of the current method group.
706         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
708 2011-10-19  Torvald Riegel  <triegel@redhat.com>
710         * alloc.cc (commit_allocations_2): Do not free transaction-local
711         memory when committing a nested transaction.
713 2011-10-19  Torvald Riegel  <triegel@redhat.com>
715         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
716         serial-irrevocable dispatch, not serial.
718 2011-10-19  Torvald Riegel  <triegel@redhat.com>
720         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
721         declarations.
722         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
723         * method-serial.cc: Implement begin_or_restart().
724         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
725         dispatch-specific begin_or_restart().
726         (GTM::gtm_thread::restart): Same.
728 2011-08-23  Torvald Riegel  <triegel@redhat.com>
730         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
731         restarting without switching to serial mode.
732         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
733         transaction state. Choose closed-nesting alternative if available.
734         (GTM::gtm_thread::set_default_dispatch): New.
735         (parse_default_method): New.
736         (GTM::gtm_thread::number_of_threads_changed): New.
737         * method-serial.cc (GTM::serial_mg): New method group class.
738         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
739         fini.
740         (GTM::serial_dispatch): Same.
741         (GTM::serialirr_onwrite_dispatch): Same.
742         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
743         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
744         registered threads.
745         (GTM::gtm_thread::gtm_thread): Same.
746         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
747         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
748         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
749         choose dispatch but set state according to dispatch here.
750         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
751         (GTM::method_group): New class.
752         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
753         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
754         * libitm.texi: Document TM methods, method groups, method life cycle.
755         Rename method sets to method groups.
757 2011-08-23  Torvald Riegel  <triegel@redhat.com>
759         * config/x86/tls.h: Moved to ...
760         * config/linux/x86/tls.h: ... here.
762 2011-08-23  Torvald Riegel  <triegel@redhat.com>
764         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
765         Add X32 support.
766         * config/x86/sjlj.S: Same.
768 2011-08-19  Torvald Riegel  <triegel@redhat.com>
770         * config/linux/rwlock.h: New file.
771         * config/linux/rwlock.c: New file.
772         * configure.ac: Reenable futex support (undo SVN rev 157758).
773         * Makefile.am: Same.
774         * configure.tgt: Same.
775         * config/linux/alpha/futex_bits.h: Same.
776         * config/linux/futex.h: Same. Return number of woken processes.
777         * config/linux/futex.cc: Same.
778         (futex_wait): Remove spinning.
779         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
780         Use __x86_64__ instead of __LP64__.
781         * aclocal.m4: Include generic futex checks.
782         * configure: Rebuild.
783         * Makefile.in: Rebuild.
784         * testsuite/Makefile.in: Rebuild.
785         * beginend.cc: Include pthread.h.
786         * config/posix/cachepage.cc: Same.
788 2011-08-12  Torvald Riegel  <triegel@redhat.com>
790         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
791         (abi_disp, set_abi_disp): Move to tx's TLS slot.
792         (set_gtm_thr): New.
793         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
794         (set_gtm_thr): New.
795         (GTM::gtm_thread::thread_num): Removed.
796         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
797         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
798         tx-to-thread renaming.
799         * beginend.cc: Adapted to tx-to-thread renaming.
800         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
801         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
802         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
803         gtm_transaction to gtm_thread.
804         (_ITM_getThreadnum): Removed. Not supported anymore.
805         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
806         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
807         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
808         gtm_tx-to-gtm_thr renaming if necessary.
809         * eh_cpp.cc: Same.
810         * local.cc: Same.
811         * retry.cc: Same.
812         * clone.cc: Same.
813         * alloc.cc: Same.
814         * alloc_c.cc: Same.
815         * alloc_cpp.cc: Same.
816         * method-serial.cc: Same.
817         * config/generic/tls.cc: Same.
818         * config/posix/rwlock.h (gtm_rwlock): Same.
819         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
821 2011-08-12  Torvald Riegel  <triegel@redhat.com>
823         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
824         implementation.
825         (gtm_rwlock::read_unlock): Same.
826         (gtm_rwlock::write_lock_generic): New. Generalized from ...
827         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
828         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
829         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
830         w_upgrade. Replaced by per-transaction flags (in shared_state).
831         Added c_confirmed_writers.
832         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
833         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
834         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
835         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
836         * beginend.cc (GTM::gtm_transaction::begin_transaction,
837         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
838         * libitm.texi: Document locking conventions and implementations in
839         libitm.
841 2011-08-12  Torvald Riegel  <triegel@redhat.com>
843         * libitm_i.h (next_tx): Add list of all threads' transaction.
844         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
845         transaction with list of transactions and ...
846         (thread_exit_handler): ... deregister here.
847         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
848         * config/x86/target.h: Same.
850 2011-08-12  Torvald Riegel  <triegel@redhat.com>
852         * testsuite/libitm.c++/static_ctor.C: New file.
854 2011-08-12  Torvald Riegel  <triegel@redhat.com>
856         * testsuite/libitm.c/reentrant.c: New file.
858 2011-08-12  Torvald Riegel  <triegel@redhat.com>
860         * config/generic/tls.h: Remove the free list for transactions and ...
861         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
862         (GTM::gtm_transaction::operator delete): ... and release here.
863         (thread_exit_handler): New. Delete tx when thread terminates.
864         (thread_exit_init): New.
865         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
866         * testsuite/libitm.c/txrelease.c: New file.
868 2011-08-12  Torvald Riegel  <triegel@redhat.com>
870         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
871         * testsuite/libitm.c/notx.c: New file.
873 2011-08-12  Torvald Riegel  <triegel@redhat.com>
875         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
876         * libitm_i.h (local_tid): ... to here.
877         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
878         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
880 2011-08-12  Torvald Riegel  <triegel@redhat.com>
882         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
883         serialirr_onwrite_dispatch as new default for now.
884         * method-serial.cc (serialirr_onwrite_dispatch): New.
885         (GTM::dispatch_serialirr_onwrite): New.
886         * libitm_i.h: Same.
888 2011-08-12  Torvald Riegel  <triegel@redhat.com>
890         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
891         * query.cc (_ITM_getTransactionId): There is no active transaction if
892         the current nesting level is zero.
894 2011-07-28  Torvald Riegel  <triegel@redhat.com>
896         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
897         rollback.
899 2011-07-28  Torvald Riegel  <triegel@redhat.com>
901         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
902         transaction properties from the caller instead of from the
903         transaction object.
904         * libitm_i.h: Same.
905         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
907 2011-07-28  Torvald Riegel  <triegel@redhat.com>
909         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
910         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
911         * dispatch.h: Same.
912         * method-serial.cc: Same.
913         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
914         flat nesting as default, and closed nesting on demand.
915         (GTM::gtm_transaction::rollback): Same.
916         (_ITM_abortTransaction): Same.
917         (GTM::gtm_transaction::restart): Same.
918         (GTM::gtm_transaction::trycommit): Same.
919         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
920         (choose_code_path): New.
921         (GTM::gtm_transaction_cp::save): New.
922         (GTM::gtm_transaction_cp::commit): New.
923         * query.cc (_ITM_inTransaction): Support flat nesting.
924         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
925         (GTM::gtm_transaction): Support flat and closed nesting.
926         * alloc.cc (commit_allocations_2): New.
927         (commit_cb_data): New helper struct.
928         (GTM::gtm_transaction::commit_allocations): Handle nested
929         commits/rollbacks.
930         * libitm.texi: Update user action section, add description of nesting.
932 2011-07-28  Torvald Riegel  <triegel@redhat.com>
934         * libitm_i.h: Add closed nesting as restart reason.
935         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
937 2011-07-28  Torvald Riegel  <triegel@redhat.com>
939         * useraction.cc: Use vector instead of list to store actions.
940         Also support partial rollbacks for closed nesting.
941         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
942         * beginend.cc: Same.
944 2011-07-28  Torvald Riegel  <triegel@redhat.com>
946         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
947         closed_nesting flags, as well as a closed nesting alternative.
948         * method-serial.cc: Same.
949         (serial_dispatch): Renamed to serialirr_dispatch.
950         (GTM::dispatch_serialirr): Same.
951         (serial_dispatch_ul): Renamed to serial_dispatch.
952         (GTM::dispatch_serial): Same.
954 2011-07-28  Torvald Riegel  <triegel@redhat.com>
956         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
958 2011-07-28  Torvald Riegel  <triegel@redhat.com>
960         * aatree.h (aa_tree::remove): New.
961         (aa_tree::operator new): Add placement new.
963 2011-07-02  Torvald Riegel  <triegel@redhat.com>
965         * containers.h: New file.
966         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
967         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
968         * common.h: ... to here.
969         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
970         * local.cc: Same.
972 2011-06-30  Torvald Riegel  <triegel@redhat.com>
974         * libitm_i.h (STATE_ABORTING): Remove.
975         * beginend.cc (_ITM_abortTransaction): Same.
976         (GTM::gtm_transaction::trycommit_and_finalize): Same.
977         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
978         (_ITM_rollbackTransaction): Remove.
979         * beginend.cc: Same.
980         * libitm.map: Same.
981         * libitm.texi: Document these ABI changes.
983 2011-06-30  Torvald Riegel  <triegel@redhat.com>
985         * libitm.texi: New file.
986         * Makefile.am: Add libitm.texi.
987         * Makefile.in: Rebuild.
989 2011-06-30  Torvald Riegel  <triegel@redhat.com>
991         * libitm_i.h: Move parts to common.h and dispatch.h.
992         * common.h: New file.
993         * dispatch.h: New file, new dispatch class.
994         Rename GTM::abi_dispatch::lock_type to ls_modifier.
995         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
996         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
997         decision to retry.cc.
998         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
999         only.
1000         (GTM::gtm_transaction::decide_begin_dispatch): Same.
1001         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
1002         logging.
1003         * barrier.cc: Use new barriers definitions.
1004         (abi_dispatch::memmove_overlap_check): New.
1005         * config/x86/x86_sse.cc: Same.
1006         * config/x86/x86_avx.cc: Same.
1007         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
1008         memcpy.cc.
1009         * Makefile.in: Rebuild.
1010         * method-readonly.cc: Remove.
1011         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
1012         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
1014 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1016         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
1017         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
1018         * testsuite/libitm.c/dropref-2.c: Same.
1019         * testsuite/libitm.c/dropref.c: Same.
1021 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1023         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
1024         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
1025         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
1026         * alloc_c.cc: Same.
1027         * barrier.tpl: Same.
1028         * beginend.c: Same.
1029         * config/generic/tls.h: Same.
1030         * config/x86/tls.h: Same.
1031         * libitm_i.h: Same.
1032         * memcpy.cc: Same.
1033         * memset.cc: Same.
1034         * method-readonly.cc: Same.
1035         * method-serial.cc: Same.
1036         * method-wbetl.cc: Same.
1037         * retry.cc: Same.
1039 2011-03-03  Richard Henderson  <rth@redhat.com>
1041         * config/posix/rwlock.cc (write_upgrade): Add missing case.
1042         From Patrik Marlier <patrick.marlier@unine.ch>.
1044 2011-02-03  Richard Henderson  <rth@redhat.com>
1046         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
1047         * configure.ac: Use it.
1048         * configure, config.h.in: Rebuild.
1049         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
1050         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
1051         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
1052         * libitm.map: Use wildcards to match size_t mangling.
1054 2010-12-14  Richard Henderson  <rth@redhat.com>
1056         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
1057         blocks of TIDs per thread.
1058         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
1059         (setup_gtm_thr): Return the thread structure.
1060         * config/x86/tls.h (setup_gtm_thr): Likewise.
1062 2010-12-14  Richard Henderson  <rth@redhat.com>
1064         * clone.cc (table_lock): Remove.
1065         (find_clone): Don't take it.
1066         (ExcludeTransaction): New helper class.
1067         (_ITM_registerTMCloneTable): Use it.
1068         (_ITM_deregisterTMCloneTable): Likewise.
1070 2010-12-14  Richard Henderson  <rth@redhat.com>
1072         * config/x86/tls.h: New file.
1074 2010-07-15  Richard Henderson  <rth@redhat.com>
1076         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1077         * Makefile.in: Rebuild.
1079 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1081         * method-wbetl.cc (trydropreference): Fix source line.
1083 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1085         * libitm.h: Add comment.
1086         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1088 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
1090         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1091         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1092         available, use pthread mutexes.
1093         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1094         * config.h.in: Regenerate.
1095         * configure: Regenerate.
1097 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
1099         * libitm.h (ITM_PURE): Define.
1100         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1102 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1104         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1105         (validate): Add comment.
1106         (trydropreference): New.
1107         * method-readonly.cc (class readonly_dispatch): Add
1108         trydropreference.
1109         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1110         Call trydropreference().
1111         * libitm.h (_ITM_dropReferences): Remove const attribute.
1112         * method-serial.cc (class serial_dispatch): Add trydropreference.
1113         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1115 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1117         * memcpy.cc (do_memcpy): Comment.
1119 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
1121         * barrier.tpl: Add comments throughout.
1123 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1125         * method-wbetl.cc (struct w_entry): Add comments.
1126         (trycommit): Same.
1127         (rollback): Same.
1129 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1131         * alloc_c.cc (_ITM_dropReferences): New.
1132         * libitm.map (_ITM_dropReferences): Add.
1133         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1134         * libitm_i.h (struct gtm_transaction): Declare
1135         drop_references_allocations and drop_references_local.
1136         * local.cc (rollback_local): Ignore memory when applicable.
1137         (drop_references_local): New.
1139 2010-06-23  Richard Henderson  <rth@redhat.com>
1141         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1142         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1143         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1144         * config/alpha/target.h: Likewise.
1145         * config/generic/tls.cc (gtm_mask_stack): Use it.
1147 2010-06-23  Richard Henderson  <rth@redhat.com>
1149         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1150         a mutex instead of trying a lock-free compare-and-swap on the list.
1151         (gtm_cacheline_page::operator delete): Likewise.
1153 2010-06-16  Richard Henderson  <rth@redhat.com>
1155         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1156         that overlap the libitm stack.
1157         * barrier.tpl: Mark incoming stack.
1158         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1159         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1160         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1161         * memcpy.cc, memset.cc: Likewise.
1162         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1163         * config/generic/tls.h (gtm_thread): Add stack_top member.
1164         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1165         * libitm_i.h (gtm_mask_stack): Declare.
1166         * config/generic/tls.cc: New file.
1167         * Makefile.am (libitm_la_SOURCES): Add it.
1168         (AM_CXXFLAGS): Turn off exceptions.
1169         * Makefile.in: Rebuild.
1171 2010-06-16  Richard Henderson  <rth@redhat.com>
1173         * alloc.cc (struct gtm_alloc_action): Move definition ...
1174         * libitm_i.h: ... here.
1175         (class gtm_transaction): Declare new and delete.
1176         * beginend.cc (alloc_tx): Reformulate as operator new.
1177         (free_tx): Reformulate as operator delete.
1178         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1180 2010-06-11  Richard Henderson  <rth@redhat.com>
1182         * clone.cc (clone_entry_compare): Fix typo.
1183         From Patrik Marlier <patrick.marlier@unine.ch>.
1185 2010-05-13  Richard Henderson  <rth@redhat.com>
1187         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1188         in extern "C".
1190 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
1192         * libitm_i.h (struct gtm_transaction): Remove
1193         get_allocation_size.
1194         (record_allocation): Remove size parameter.
1195         * libitm.map (_ITM_realloc): Remove.
1196         * alloc_c.cc (_ITM_realloc): Remove.
1197         (_ITM_malloc): Remove size argument to record_allocation.
1198         (_ITM_calloc): Same.
1199         * alloc_cpp.cc (_ZGTtnwm): Same.
1200         (_ZGTtnwmRKSt9nothrow_t): Same.
1201         (_ZGTtnam): Same.
1202         (_ZGTtnamRKSt9nothrow_t): Same.
1203         * alloc.cc (struct gtm_alloc_action): Remove size.
1204         (get_allocation_size): Remove.
1205         (commit_allocations): Add comment.
1206         (record_allocation): Remove size parameter.
1207         (forget_allocation): Remove set of size.
1209 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
1211         * Makefile.am (abi_version): New.
1212         (AM_CXXFLAGS): Pass abi_version.
1213         * Makefile.in: Regenerate.
1214         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1216 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
1218         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1219         _ITM_getTMCloneOrIrrevokable.
1220         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1221         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1223 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
1225         * configure.ac: Remove Linux futex support.
1226         * configure.tgt (config_path): Same.
1227         * Makefile.am: Same.
1228         * config/linux: Remove entire directory.
1229         * configure: Rebuild.
1230         * Makefile.in: Rebuild.
1231         * testsuite/Makefile.in: Rebuild.
1233 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
1235         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1236         switching to serial mode.
1237         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1239 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
1241         * configure.tgt: Add emacs -*- tags.
1242         * barrier.tpl: Same.
1244 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
1246         * Makefile.am: Rename serial.cc to method-serial.cc.
1247         * Makefile.in: Regenerate with automake 1.11.1.
1248         * testsuite/Makefile.in: Same.
1249         * aclocal.m4: Regenerate with aclocal 1.11.1.
1250         * method-serial.cc: Rename from serial.cc.
1251         * libitm_i.h (struct gtm_transaction): Update comment on
1252         serialirr_mode.
1254 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
1256         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1257         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1259 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
1261         * configure: Rebuild.
1263 2009-11-12  Richard Henderson  <rth@redhat.com>
1265         * Rewrite everything in C++.
1267 2009-11-03  Richard Henderson  <rth@redhat.com>
1269         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1270         * Makefile.am (libitm_la_SOURCES): Add them.
1271         * configure.ac (ARCH_X86): New conditional.
1272         * Makefile.in, configure: Rebuild.
1273         * configure.tgt: Set up ARCH; do cflags setup at the same time.
1274         Move futex setup into "other system configury" case.
1275         * local.c (rollback_local): Merge into ...
1276         (GTM_rollback_local): ... here.
1277         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1278         (_ITM_LB): Define as an alias to GTM_LB.
1280 2009-11-03  Richard Henderson  <rth@redhat.com>
1282         * method-readonly.c: New file.
1283         * Makefile.am (libitm_la_SOURCES): Add it.
1284         * Makefile.in: Rebuild.
1285         * beginend.c (gtm_stmlock_array, gtm_clock): New.
1286         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1287         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1288         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1289         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1290         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1291         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1292         gtm_get_clock, gtm_inc_clock): New.
1293         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1294         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1295         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1296         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1297         replace uses with new libitm_i.h symbols.
1298         (dispatch_wbetl): Rename from wbetl_dispatch.
1299         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1300         away from dispatch_readonly; abort if the beginTransaction call
1301         asserted that the transaction was readonly.
1303 2009-11-03  Richard Henderson  <rth@redhat.com>
1305         * memset.c: New file.
1306         * Makefile.am (libitm_la_SOURCES): Add it.
1307         * Makefile.in: Rebuild.
1308         * testsuite/libitm.c/memset-1.c: New.
1310 2009-11-03  Richard Henderson  <rth@redhat.com>
1312         * dispatch.c: Remove file.
1313         * useraction.c (struct gtm_user_action): Move from libitm.h.
1314         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1315         (serial_memset, serial_memmove, serial_memcpy): Remove.
1316         (serial_W*, serial_R*): Remove.
1317         (serial_dispatch): Update to match.
1318         * configure.ac: Move Werror down below configure checks.  Don't
1319         check for sys/loadavg.h, do check for malloc.h.  Don't check for
1320         getloadavg and clock_gettime; do check for memalign, posix_memalign.
1321         Use GCC_AC_FUNC_MMAP_BLACKLIST
1322         * libitm.h: Split out all internal items to...
1323         * libitm_i.h: ... here.  New file.
1324         * copymask.c: New file.
1325         * local.c (struct gtm_local_undo): Move from libitm.h.
1326         (GTM_alloc_local): Rename from alloc_local; export.
1327         * memcpy.c: New file.
1328         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1329         * config/posix/page.c: New file.
1330         * config/posix/target_tls.h: Remove file.
1331         * barrier.c: New file.
1332         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1333         copymask.c, page.c.
1334         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1335         * method-wbetl.c: Rewrite for new cacheline methods.
1336         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1338         * config/alpha/sjlj.S: Fix typo.
1339         * config/alpha/target_i.h: Copy functions from alpha/target.h.
1340         * config/alpha/copymask.c: New file.
1341         * config/alpha/target.h (CACHELINE_SIZE): New.
1342         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1344         * config/x86/target_i.h: Copy functions from x86/target.h.
1345         * config/x86/copymask.c: New file.
1346         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1347         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1348         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1349         * config/x86/target_tls.h: Move contents to target_i.h.
1351         * testsuite/libitm.c/clone-1.c: Include libitm.h.
1352         * testsuite/libitm.c/memcpy-1.c: New.
1354 2009-10-22  Richard Henderson  <rth@redhat.com>
1356         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1357         (AM_CCASFLAGS): New.
1358         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
1359         saving/restoring _AC_ARG_VAR_PRECIOUS.
1360         * Makefile.in, aclocal.m4, config.h.in, configure,
1361         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1363 2009-10-22  Richard Henderson  <rth@redhat.com>
1365         * testsuite/*: Update for new compiler syntax.
1367 2009-10-21  Richard Henderson  <rth@redhat.com>
1369         * libitm.h (_ITM_abortReason): Add outerAbort.
1371 2009-08-03  Richard Henderson  <rth@redhat.com>
1373         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1374         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1375         * method-wbetl.c (struct w_entry): Remove mask.
1376         (wbetl_write, wbetl_load): Return pointer to word containing the data;
1377         adjust all callers.
1379 2009-07-22  Richard Henderson  <rth@redhat.com>
1381         * eh_cpp.c: New file.
1382         * Makefile.am (libitm_la_SOURCES): Add it.
1383         * Makefile.in: Rebuild.
1384         * beginend.c (GTM_rollback_transaction): Undo exception state.
1385         (GTM_trycommit_transaction): Mark inline.
1386         (GTM_trycommit_and_finalize_transaction): Split out from ...
1387         (_ITM_commitTransaction): ... here.
1388         (_ITM_commitTransactionEH): New function.
1389         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1390         cxa_unthrown, eh_in_flight; reorder.
1392         * testsuite/libitm.c++/c++.exp: New.
1393         * testsuite/libitm.c++/eh-1.C: New.
1395         * aatree.c (aa_free): Remove REGPARM.
1396         * aatree.h: Remove all REGPARM.
1398 2009-07-18  Richard Henderson  <rth@redhat.com>
1400         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1401         * Makefile.am (libitm_la_SOURCES): Add them.
1402         * Makefile.in: Rebuild.
1403         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1404         (GTM_trycommit_transaction): Likewise.
1405         * libitm.h: Include aatree.h
1406         (struct gtm_alloc_action): New.
1407         (struct gtm_transaction): Add alloc_actions.
1408         (GTM_record_allocation, GTM_forget_allocation): Declare.
1409         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1410         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1411         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1412         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1413         _ZGTtdaPvRKSt9nothrow_t): Export.
1415 2009-07-18  Richard Henderson  <rth@redhat.com>
1417         * target_tls.h: Move ...
1418         * config/posix/target_tls.h: ... here.
1420 2009-07-07  Richard Henderson  <rth@redhat.com>
1422         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1424 2009-07-07  Richard Henderson  <rth@redhat.com>
1426         * Update to GPL3.
1428 2009-07-07  Richard Henderson  <rth@redhat.com>
1430         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1431         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1433         * configure.tgt: Don't use -ftls-model for x86 linux.
1434         * libitm.h: Include target.h after standard includes.
1435         (_gtm_thr): Rename from gtm_thr.
1436         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1437         (gtm_disp, set_gtm_disp): New.
1438         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1439         retry.c, serial.c, useraction.c: Use accessor functions throughout.
1440         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1442 2009-07-07  Richard Henderson  <rth@redhat.com>
1444         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
1446 2009-07-06  Richard Henderson  <rth@redhat.com>
1448         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1449         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1450         (_ITM_beginTransaction): Take variadic arguments.
1451         (_ITM_registerThrownObject): Declare.
1452         * beginend.c, serial.c: Update.
1453         * libitm.map: Add _ITM_registerThrownObject.
1455 2009-01-28  Richard Henderson  <rth@redhat.com>
1457         * Makefile.am (libitm_la_SOURCES): Add clone.c.
1458         * Makefile.in: Rebuild.
1459         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1460         (GTM_restart_transaction): Fix uninstrumented code check.
1461         * retry.c (GTM_decide_retry_strategy): Add serial check.
1462         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
1463         automatically go irrevokable when in serial mode.
1464         * clone.c: New file.
1465         * libitm.h, libitm.map: Update.
1467 2009-01-27  Richard Henderson  <rth@redhat.com>
1469         * Makefile.am (LTCCASCOMPILE): Define.
1470         (libitm_la_SOURCES): Add methid-wbetl.c.
1471         * testsuite/Makefile.am: New
1472         * configure.ac: Add testsuite/Makefile.
1473         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1474         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1475         (_ITM_abortTransaction): Finalize implementation method; pass
1476         transaction properties to longjmp.
1477         (GTM_restart_transaction): Split out from ...
1478         (_ITM_commitTransaction): ... here.
1479         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1480         Move to config/x86/target.h.
1481         * config/linux/alpha/futex_bits.h: New.
1482         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1483         * config/x86/target.h: Disable target types for 32-bit.
1484         * config/alpha/sjlj.S, config/alpha/target.h: New.
1485         * libitm.h (struct gtm_dispatch): Add init, fini.
1486         (enum restart_reason): New.
1487         (struct gtm_transaction): Add method and restarts.
1488         * retry.c (GTM_decide_retry_strategy): Implement.
1489         * serial.c (serial_init, serial_fini): New.
1490         (GTM_serialmode): Finialize outgoing method.
1491         * method-wbetl.c: New.
1493 2008-12-09  Richard Henderson  <rth@redhat.com>
1495         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1496         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1497         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1498         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1499         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1500         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1501         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1502         * serial.c (serial_R##T, serial_W##T): Likewise.
1504 2008-11-21  Richard Henderson  <rth@redhat.com>
1506         * Initial commit.