hppa: Install __sync libfuncs for linux.
[official-gcc.git] / libitm / ChangeLog
blob46c984e8c75458ba60c10b0abdf0a1c8a895f9c0
1 2011-11-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3         * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
4         .hidden.
5         (.note.GNU-stack): Only use if __linux__.
6         * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
7         * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
8         * testsuite/libitm.c/reentrant.c: Likewise.
9         * testsuite/libitm.c/simple-2.c: Likewise.
10         * testsuite/libitm.c/txrelease.c: Likewise.
11         * testsuite/libitm.c++/static_ctor.C: Likewise.
13 2011-11-10  Richard Henderson  <rth@redhat.com>
15         * config/x86/x86_avx.cc: Remove #undef __AVX__ hack.  Tidy comments.
16         * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
17         * configure.ac (ARCH_X86_AVX): New conditional.
18         * Makefile.in, configure: Rebuild.
20 2011-11-09  Richard Henderson  <rth@redhat.com>
22         * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
23         * configure.ac: Use it.
24         * config.h.in, configure: Rebuild.
25         * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
27 2011-11-09  Richard Henderson  <rth@redhat.com>
29         * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
30         * config/alpha/unaligned.h: Remove file.
31         * config/generic/unaligned.h: Remove file.
32         * config/x86/unaligned.h: Remove file.
33         * config/generic/cachepage.h: Remove file.
34         * config/posix/cachepage.cc: Remove file.
35         * config/generic/cacheline.cc: Remove file.
36         * config/x86/cacheline.cc: Remove file.
37         * config/generic/cacheline.h (gtm_cacheline): Remove the
38         store_mask, copy_mask, copy_mask_wb methods.
39         * config/x86/cacheline.h: Likewise.
40         * config/alpha/cacheline.h: Fall back to generic after setting size.
41         * config/generic/tls.cc (gtm_mask_stack): Remove.
42         * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
43         (GTM_vpalignr_table): Remove.
44         * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
45         (GTM_pshift_table): Remove.
46         * config/libitm_i.h: Don't include cachepage.h.
47         * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
48         * Makefile.in, testsuite/Makefile.in: Rebuild.
50 2011-11-09  Richard Henderson  <rth@redhat.com>
52         * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
53         to emit branch prediction hint.
55         * config/x86/sjlj.S: Protect elf directives with __ELF__.
56         Protect .note.GNU-stack with __linux__.
58         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
59         * configure, aclocal.m4, config.h.in: Rebuild.
60         * config/generic/asmcfi.h: New file.
61         * config/x86/sjlj.S: Use it.
63 2011-11-08  Richard Henderson  <rth@redhat.com>
65         * local.cc (_ITM_LB): Use a normal call, not a function alias.
67 2011-11-08  Richard Henderson  <rth@redhat.com>
69         * configure.tgt: Test correct directory for supported cpus.
71         * configure.ac: Exit if unsupported.
72         * configure: Rebuild.
73         * configure.tgt: Delete boilerplate from libgomp for unsupported
74         targets.  Set UNSUPPORTED for unsupported targets.
76 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
78         * configure.tgt: Handle i386 like i[456]86.
79         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
80         take address.
81         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
82         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
84 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
86         * method-wbetl.cc: Update copyright notice.
87         * aatree.cc: Same.
88         * util.cc: Same.
89         * libitm.h: Same.
90         * memset.cc: Same.
91         * eh_cpp.cc: Same.
92         * barrier.tpl: Same.
93         * useraction.cc: Same.
94         * stmlock.h: Same.
95         * memcpy.cc: Same.
96         * common.h: Same.
97         * config/generic/tls.cc: Same.
98         * config/generic/cacheline.h: Same.
99         * config/generic/cachepage.h: Same.
100         * config/generic/cacheline.cc: Same.
101         * config/generic/unaligned.h: Same.
102         * config/x86/cacheline.h: Same.
103         * config/x86/cacheline.cc: Same.
104         * config/x86/unaligned.h: Same.
105         * config/alpha/cacheline.h: Same.
106         * config/alpha/unaligned.h: Same.
107         * config/alpha/sjlj.S: Same.
108         * config/posix/cachepage.cc: Same.
109         * config/linux/futex.h: Same.
110         * config/linux/alpha/futex_bits.h: Same.
112 2011-11-04  Torvald Riegel  <triegel@redhat.com>
114         * libitm.texi: No cover text and invariant sections.
116 2011-11-03  Richard Henderson  <rth@redhat.com>
118         * local_type_traits: New file.
119         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
121 2011-11-03  Richard Henderson  <rth@redhat.com>
123         * configure.ac: Don't test for gfortran.
124         * configure: Rebuild.
126         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
127         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
129 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
131         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
132         * testsuite/libitm.c/memset-1.c: Same.
133         * testsuite/libitm.c/c.exp: Same.
134         * testsuite/lib/libitm-dg.exp: Same.
135         * testsuite/lib/libitm.exp: Same.
136         * testsuite/libitm.c++/c++.exp: Same.
138 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
140         * testsuite/config/default.exp: Update copyright date.
141         * configure.ac: Add copyright info.
142         * configure.tgt: Same.
144 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
146         * testsuite/libitm.c/reentrant.c: XFAIL.
147         * testsuite/libitm.c++/static_ctor.C: XFAIL.
149 2011-10-29  Torvald Riegel  <triegel@redhat.com>
151         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
152         handle aborts.
153         (_ITM_abortTransaction): Handle aborts of outer transactions.
154         * libitm_i.h: Same.
155         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
156         * libitm.texi: Document aborts of outer transactions.
157         * testsuite/libitm.c/cancel.c: New file.
159 2011-10-19  Torvald Riegel  <triegel@redhat.com>
161         * testsuite/*: Change __transaction to __transaction_atomic or
162         __transaction_relaxed.
164 2011-10-19  Torvald Riegel  <triegel@redhat.com>
166         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
167         (gtm_thr): Same.
169 2011-10-19  Torvald Riegel  <triegel@redhat.com>
171         * libitm_i.h: Add gl_wt dispatch.
172         * retry.cc (parse_default_method): Same.
173         * method-gl.cc: New file.
174         * Makefile.am: Use method-gl.cc.
175         * Makefile.in: Rebuild.
177 2011-10-19  Torvald Riegel  <triegel@redhat.com>
179         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
180         safety if requested by a TM method.
181         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
182         privatization safety.
183         * method-serial.cc: Same.
185 2011-10-19  Torvald Riegel  <triegel@redhat.com>
187         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
188         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
189         undolog-related member functions from *_local to *_undolog.
190         * local.cc (gtm_thread::commit_undolog): Same.
191         * beginend.cc (GTM::gtm_thread::trycommit): Same.
192         (GTM::gtm_thread::rollback): Roll back undolog before
193         dispatch-specific rollback.
195 2011-10-19  Torvald Riegel  <triegel@redhat.com>
197         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
198         re-initialization of the current method group.
199         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
201 2011-10-19  Torvald Riegel  <triegel@redhat.com>
203         * alloc.cc (commit_allocations_2): Do not free transaction-local
204         memory when committing a nested transaction.
206 2011-10-19  Torvald Riegel  <triegel@redhat.com>
208         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
209         serial-irrevocable dispatch, not serial.
211 2011-10-19  Torvald Riegel  <triegel@redhat.com>
213         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
214         declarations.
215         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
216         * method-serial.cc: Implement begin_or_restart().
217         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
218         dispatch-specific begin_or_restart().
219         (GTM::gtm_thread::restart): Same.
221 2011-08-23  Torvald Riegel  <triegel@redhat.com>
223         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
224         restarting without switching to serial mode.
225         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
226         transaction state. Choose closed-nesting alternative if available.
227         (GTM::gtm_thread::set_default_dispatch): New.
228         (parse_default_method): New.
229         (GTM::gtm_thread::number_of_threads_changed): New.
230         * method-serial.cc (GTM::serial_mg): New method group class.
231         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
232         fini.
233         (GTM::serial_dispatch): Same.
234         (GTM::serialirr_onwrite_dispatch): Same.
235         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
236         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
237         registered threads.
238         (GTM::gtm_thread::gtm_thread): Same.
239         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
240         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
241         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
242         choose dispatch but set state according to dispatch here.
243         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
244         (GTM::method_group): New class.
245         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
246         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
247         * libitm.texi: Document TM methods, method groups, method life cycle.
248         Rename method sets to method groups.
250 2011-08-23  Torvald Riegel  <triegel@redhat.com>
252         * config/x86/tls.h: Moved to ...
253         * config/linux/x86/tls.h: ... here.
255 2011-08-23  Torvald Riegel  <triegel@redhat.com>
257         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
258         Add X32 support.
259         * config/x86/sjlj.S: Same.
261 2011-08-19  Torvald Riegel  <triegel@redhat.com>
263         * config/linux/rwlock.h: New file.
264         * config/linux/rwlock.c: New file.
265         * configure.ac: Reenable futex support (undo SVN rev 157758).
266         * Makefile.am: Same.
267         * configure.tgt: Same.
268         * config/linux/alpha/futex_bits.h: Same.
269         * config/linux/futex.h: Same. Return number of woken processes.
270         * config/linux/futex.cc: Same.
271         (futex_wait): Remove spinning.
272         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
273         Use __x86_64__ instead of __LP64__.
274         * aclocal.m4: Include generic futex checks.
275         * configure: Rebuild.
276         * Makefile.in: Rebuild.
277         * testsuite/Makefile.in: Rebuild.
278         * beginend.cc: Include pthread.h.
279         * config/posix/cachepage.cc: Same.
281 2011-08-12  Torvald Riegel  <triegel@redhat.com>
283         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
284         (abi_disp, set_abi_disp): Move to tx's TLS slot.
285         (set_gtm_thr): New.
286         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
287         (set_gtm_thr): New.
288         (GTM::gtm_thread::thread_num): Removed.
289         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
290         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
291         tx-to-thread renaming.
292         * beginend.cc: Adapted to tx-to-thread renaming.
293         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
294         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
295         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
296         gtm_transaction to gtm_thread.
297         (_ITM_getThreadnum): Removed. Not supported anymore.
298         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
299         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
300         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
301         gtm_tx-to-gtm_thr renaming if necessary.
302         * eh_cpp.cc: Same.
303         * local.cc: Same.
304         * retry.cc: Same.
305         * clone.cc: Same.
306         * alloc.cc: Same.
307         * alloc_c.cc: Same.
308         * alloc_cpp.cc: Same.
309         * method-serial.cc: Same.
310         * config/generic/tls.cc: Same.
311         * config/posix/rwlock.h (gtm_rwlock): Same.
312         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
314 2011-08-12  Torvald Riegel  <triegel@redhat.com>
316         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
317         implementation.
318         (gtm_rwlock::read_unlock): Same.
319         (gtm_rwlock::write_lock_generic): New. Generalized from ...
320         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
321         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
322         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
323         w_upgrade. Replaced by per-transaction flags (in shared_state).
324         Added c_confirmed_writers.
325         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
326         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
327         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
328         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
329         * beginend.cc (GTM::gtm_transaction::begin_transaction,
330         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
331         * libitm.texi: Document locking conventions and implementations in
332         libitm.
334 2011-08-12  Torvald Riegel  <triegel@redhat.com>
336         * libitm_i.h (next_tx): Add list of all threads' transaction.
337         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
338         transaction with list of transactions and ...
339         (thread_exit_handler): ... deregister here.
340         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
341         * config/x86/target.h: Same.
343 2011-08-12  Torvald Riegel  <triegel@redhat.com>
345         * testsuite/libitm.c++/static_ctor.C: New file.
347 2011-08-12  Torvald Riegel  <triegel@redhat.com>
349         * testsuite/libitm.c/reentrant.c: New file.
351 2011-08-12  Torvald Riegel  <triegel@redhat.com>
353         * config/generic/tls.h: Remove the free list for transactions and ...
354         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
355         (GTM::gtm_transaction::operator delete): ... and release here.
356         (thread_exit_handler): New. Delete tx when thread terminates.
357         (thread_exit_init): New.
358         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
359         * testsuite/libitm.c/txrelease.c: New file.
361 2011-08-12  Torvald Riegel  <triegel@redhat.com>
363         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
364         * testsuite/libitm.c/notx.c: New file.
366 2011-08-12  Torvald Riegel  <triegel@redhat.com>
368         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
369         * libitm_i.h (local_tid): ... to here.
370         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
371         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
373 2011-08-12  Torvald Riegel  <triegel@redhat.com>
375         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
376         serialirr_onwrite_dispatch as new default for now.
377         * method-serial.cc (serialirr_onwrite_dispatch): New.
378         (GTM::dispatch_serialirr_onwrite): New.
379         * libitm_i.h: Same.
381 2011-08-12  Torvald Riegel  <triegel@redhat.com>
383         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
384         * query.cc (_ITM_getTransactionId): There is no active transaction if
385         the current nesting level is zero.
387 2011-07-28  Torvald Riegel  <triegel@redhat.com>
389         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
390         rollback.
392 2011-07-28  Torvald Riegel  <triegel@redhat.com>
394         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
395         transaction properties from the caller instead of from the
396         transaction object.
397         * libitm_i.h: Same.
398         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
400 2011-07-28  Torvald Riegel  <triegel@redhat.com>
402         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
403         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
404         * dispatch.h: Same.
405         * method-serial.cc: Same.
406         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
407         flat nesting as default, and closed nesting on demand.
408         (GTM::gtm_transaction::rollback): Same.
409         (_ITM_abortTransaction): Same.
410         (GTM::gtm_transaction::restart): Same.
411         (GTM::gtm_transaction::trycommit): Same.
412         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
413         (choose_code_path): New.
414         (GTM::gtm_transaction_cp::save): New.
415         (GTM::gtm_transaction_cp::commit): New.
416         * query.cc (_ITM_inTransaction): Support flat nesting.
417         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
418         (GTM::gtm_transaction): Support flat and closed nesting.
419         * alloc.cc (commit_allocations_2): New.
420         (commit_cb_data): New helper struct.
421         (GTM::gtm_transaction::commit_allocations): Handle nested
422         commits/rollbacks.
423         * libitm.texi: Update user action section, add description of nesting.
425 2011-07-28  Torvald Riegel  <triegel@redhat.com>
427         * libitm_i.h: Add closed nesting as restart reason.
428         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
430 2011-07-28  Torvald Riegel  <triegel@redhat.com>
432         * useraction.cc: Use vector instead of list to store actions.
433         Also support partial rollbacks for closed nesting.
434         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
435         * beginend.cc: Same.
437 2011-07-28  Torvald Riegel  <triegel@redhat.com>
439         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
440         closed_nesting flags, as well as a closed nesting alternative.
441         * method-serial.cc: Same.
442         (serial_dispatch): Renamed to serialirr_dispatch.
443         (GTM::dispatch_serialirr): Same.
444         (serial_dispatch_ul): Renamed to serial_dispatch.
445         (GTM::dispatch_serial): Same.
447 2011-07-28  Torvald Riegel  <triegel@redhat.com>
449         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
451 2011-07-28  Torvald Riegel  <triegel@redhat.com>
453         * aatree.h (aa_tree::remove): New.
454         (aa_tree::operator new): Add placement new.
456 2011-07-02  Torvald Riegel  <triegel@redhat.com>
458         * containers.h: New file.
459         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
460         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
461         * common.h: ... to here.
462         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
463         * local.cc: Same.
465 2011-06-30  Torvald Riegel  <triegel@redhat.com>
467         * libitm_i.h (STATE_ABORTING): Remove.
468         * beginend.cc (_ITM_abortTransaction): Same.
469         (GTM::gtm_transaction::trycommit_and_finalize): Same.
470         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
471         (_ITM_rollbackTransaction): Remove.
472         * beginend.cc: Same.
473         * libitm.map: Same.
474         * libitm.texi: Document these ABI changes.
476 2011-06-30  Torvald Riegel  <triegel@redhat.com>
478         * libitm.texi: New file.
479         * Makefile.am: Add libitm.texi.
480         * Makefile.in: Rebuild.
482 2011-06-30  Torvald Riegel  <triegel@redhat.com>
484         * libitm_i.h: Move parts to common.h and dispatch.h.
485         * common.h: New file.
486         * dispatch.h: New file, new dispatch class.
487         Rename GTM::abi_dispatch::lock_type to ls_modifier.
488         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
489         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
490         decision to retry.cc.
491         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
492         only.
493         (GTM::gtm_transaction::decide_begin_dispatch): Same.
494         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
495         logging.
496         * barrier.cc: Use new barriers definitions.
497         (abi_dispatch::memmove_overlap_check): New.
498         * config/x86/x86_sse.cc: Same.
499         * config/x86/x86_avx.cc: Same.
500         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
501         memcpy.cc.
502         * Makefile.in: Rebuild.
503         * method-readonly.cc: Remove.
504         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
505         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
507 2011-06-30  Torvald Riegel  <triegel@redhat.com>
509         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
510         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
511         * testsuite/libitm.c/dropref-2.c: Same.
512         * testsuite/libitm.c/dropref.c: Same.
514 2011-06-30  Torvald Riegel  <triegel@redhat.com>
516         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
517         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
518         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
519         * alloc_c.cc: Same.
520         * barrier.tpl: Same.
521         * beginend.c: Same.
522         * config/generic/tls.h: Same.
523         * config/x86/tls.h: Same.
524         * libitm_i.h: Same.
525         * memcpy.cc: Same.
526         * memset.cc: Same.
527         * method-readonly.cc: Same.
528         * method-serial.cc: Same.
529         * method-wbetl.cc: Same.
530         * retry.cc: Same.
532 2011-03-03  Richard Henderson  <rth@redhat.com>
534         * config/posix/rwlock.cc (write_upgrade): Add missing case.
535         From Patrik Marlier <patrick.marlier@unine.ch>.
537 2011-02-03  Richard Henderson  <rth@redhat.com>
539         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
540         * configure.ac: Use it.
541         * configure, config.h.in: Rebuild.
542         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
543         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
544         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
545         * libitm.map: Use wildcards to match size_t mangling.
547 2010-12-14  Richard Henderson  <rth@redhat.com>
549         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
550         blocks of TIDs per thread.
551         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
552         (setup_gtm_thr): Return the thread structure.
553         * config/x86/tls.h (setup_gtm_thr): Likewise.
555 2010-12-14  Richard Henderson  <rth@redhat.com>
557         * clone.cc (table_lock): Remove.
558         (find_clone): Don't take it.
559         (ExcludeTransaction): New helper class.
560         (_ITM_registerTMCloneTable): Use it.
561         (_ITM_deregisterTMCloneTable): Likewise.
563 2010-12-14  Richard Henderson  <rth@redhat.com>
565         * config/x86/tls.h: New file.
567 2010-07-15  Richard Henderson  <rth@redhat.com>
569         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
570         * Makefile.in: Rebuild.
572 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
574         * method-wbetl.cc (trydropreference): Fix source line.
576 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
578         * libitm.h: Add comment.
579         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
581 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
583         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
584         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
585         available, use pthread mutexes.
586         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
587         * config.h.in: Regenerate.
588         * configure: Regenerate.
590 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
592         * libitm.h (ITM_PURE): Define.
593         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
595 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
597         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
598         (validate): Add comment.
599         (trydropreference): New.
600         * method-readonly.cc (class readonly_dispatch): Add
601         trydropreference.
602         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
603         Call trydropreference().
604         * libitm.h (_ITM_dropReferences): Remove const attribute.
605         * method-serial.cc (class serial_dispatch): Add trydropreference.
606         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
608 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
610         * memcpy.cc (do_memcpy): Comment.
612 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
614         * barrier.tpl: Add comments throughout.
616 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
618         * method-wbetl.cc (struct w_entry): Add comments.
619         (trycommit): Same.
620         (rollback): Same.
622 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
624         * alloc_c.cc (_ITM_dropReferences): New.
625         * libitm.map (_ITM_dropReferences): Add.
626         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
627         * libitm_i.h (struct gtm_transaction): Declare
628         drop_references_allocations and drop_references_local.
629         * local.cc (rollback_local): Ignore memory when applicable.
630         (drop_references_local): New.
632 2010-06-23  Richard Henderson  <rth@redhat.com>
634         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
635         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
636         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
637         * config/alpha/target.h: Likewise.
638         * config/generic/tls.cc (gtm_mask_stack): Use it.
640 2010-06-23  Richard Henderson  <rth@redhat.com>
642         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
643         a mutex instead of trying a lock-free compare-and-swap on the list.
644         (gtm_cacheline_page::operator delete): Likewise.
646 2010-06-16  Richard Henderson  <rth@redhat.com>
648         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
649         that overlap the libitm stack.
650         * barrier.tpl: Mark incoming stack.
651         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
652         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
653         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
654         * memcpy.cc, memset.cc: Likewise.
655         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
656         * config/generic/tls.h (gtm_thread): Add stack_top member.
657         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
658         * libitm_i.h (gtm_mask_stack): Declare.
659         * config/generic/tls.cc: New file.
660         * Makefile.am (libitm_la_SOURCES): Add it.
661         (AM_CXXFLAGS): Turn off exceptions.
662         * Makefile.in: Rebuild.
664 2010-06-16  Richard Henderson  <rth@redhat.com>
666         * alloc.cc (struct gtm_alloc_action): Move definition ...
667         * libitm_i.h: ... here.
668         (class gtm_transaction): Declare new and delete.
669         * beginend.cc (alloc_tx): Reformulate as operator new.
670         (free_tx): Reformulate as operator delete.
671         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
673 2010-06-11  Richard Henderson  <rth@redhat.com>
675         * clone.cc (clone_entry_compare): Fix typo.
676         From Patrik Marlier <patrick.marlier@unine.ch>.
678 2010-05-13  Richard Henderson  <rth@redhat.com>
680         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
681         in extern "C".
683 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
685         * libitm_i.h (struct gtm_transaction): Remove
686         get_allocation_size.
687         (record_allocation): Remove size parameter.
688         * libitm.map (_ITM_realloc): Remove.
689         * alloc_c.cc (_ITM_realloc): Remove.
690         (_ITM_malloc): Remove size argument to record_allocation.
691         (_ITM_calloc): Same.
692         * alloc_cpp.cc (_ZGTtnwm): Same.
693         (_ZGTtnwmRKSt9nothrow_t): Same.
694         (_ZGTtnam): Same.
695         (_ZGTtnamRKSt9nothrow_t): Same.
696         * alloc.cc (struct gtm_alloc_action): Remove size.
697         (get_allocation_size): Remove.
698         (commit_allocations): Add comment.
699         (record_allocation): Remove size parameter.
700         (forget_allocation): Remove set of size.
702 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
704         * Makefile.am (abi_version): New.
705         (AM_CXXFLAGS): Pass abi_version.
706         * Makefile.in: Regenerate.
707         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
709 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
711         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
712         _ITM_getTMCloneOrIrrevokable.
713         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
714         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
716 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
718         * configure.ac: Remove Linux futex support.
719         * configure.tgt (config_path): Same.
720         * Makefile.am: Same.
721         * config/linux: Remove entire directory.
722         * configure: Rebuild.
723         * Makefile.in: Rebuild.
724         * testsuite/Makefile.in: Rebuild.
726 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
728         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
729         switching to serial mode.
730         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
732 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
734         * configure.tgt: Add emacs -*- tags.
735         * barrier.tpl: Same.
737 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
739         * Makefile.am: Rename serial.cc to method-serial.cc.
740         * Makefile.in: Regenerate with automake 1.11.1.
741         * testsuite/Makefile.in: Same.
742         * aclocal.m4: Regenerate with aclocal 1.11.1.
743         * method-serial.cc: Rename from serial.cc.
744         * libitm_i.h (struct gtm_transaction): Update comment on
745         serialirr_mode.
747 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
749         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
750         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
752 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
754         * configure: Rebuild.
756 2009-11-12  Richard Henderson  <rth@redhat.com>
758         * Rewrite everything in C++.
760 2009-11-03  Richard Henderson  <rth@redhat.com>
762         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
763         * Makefile.am (libitm_la_SOURCES): Add them.
764         * configure.ac (ARCH_X86): New conditional.
765         * Makefile.in, configure: Rebuild.
766         * configure.tgt: Set up ARCH; do cflags setup at the same time.
767         Move futex setup into "other system configury" case.
768         * local.c (rollback_local): Merge into ...
769         (GTM_rollback_local): ... here.
770         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
771         (_ITM_LB): Define as an alias to GTM_LB.
773 2009-11-03  Richard Henderson  <rth@redhat.com>
775         * method-readonly.c: New file.
776         * Makefile.am (libitm_la_SOURCES): Add it.
777         * Makefile.in: Rebuild.
778         * beginend.c (gtm_stmlock_array, gtm_clock): New.
779         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
780         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
781         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
782         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
783         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
784         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
785         gtm_get_clock, gtm_inc_clock): New.
786         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
787         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
788         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
789         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
790         replace uses with new libitm_i.h symbols.
791         (dispatch_wbetl): Rename from wbetl_dispatch.
792         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
793         away from dispatch_readonly; abort if the beginTransaction call
794         asserted that the transaction was readonly.
796 2009-11-03  Richard Henderson  <rth@redhat.com>
798         * memset.c: New file.
799         * Makefile.am (libitm_la_SOURCES): Add it.
800         * Makefile.in: Rebuild.
801         * testsuite/libitm.c/memset-1.c: New.
803 2009-11-03  Richard Henderson  <rth@redhat.com>
805         * dispatch.c: Remove file.
806         * useraction.c (struct gtm_user_action): Move from libitm.h.
807         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
808         (serial_memset, serial_memmove, serial_memcpy): Remove.
809         (serial_W*, serial_R*): Remove.
810         (serial_dispatch): Update to match.
811         * configure.ac: Move Werror down below configure checks.  Don't
812         check for sys/loadavg.h, do check for malloc.h.  Don't check for
813         getloadavg and clock_gettime; do check for memalign, posix_memalign.
814         Use GCC_AC_FUNC_MMAP_BLACKLIST
815         * libitm.h: Split out all internal items to...
816         * libitm_i.h: ... here.  New file.
817         * copymask.c: New file.
818         * local.c (struct gtm_local_undo): Move from libitm.h.
819         (GTM_alloc_local): Rename from alloc_local; export.
820         * memcpy.c: New file.
821         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
822         * config/posix/page.c: New file.
823         * config/posix/target_tls.h: Remove file.
824         * barrier.c: New file.
825         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
826         copymask.c, page.c.
827         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
828         * method-wbetl.c: Rewrite for new cacheline methods.
829         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
831         * config/alpha/sjlj.S: Fix typo.
832         * config/alpha/target_i.h: Copy functions from alpha/target.h.
833         * config/alpha/copymask.c: New file.
834         * config/alpha/target.h (CACHELINE_SIZE): New.
835         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
837         * config/x86/target_i.h: Copy functions from x86/target.h.
838         * config/x86/copymask.c: New file.
839         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
840         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
841         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
842         * config/x86/target_tls.h: Move contents to target_i.h.
844         * testsuite/libitm.c/clone-1.c: Include libitm.h.
845         * testsuite/libitm.c/memcpy-1.c: New.
847 2009-10-22  Richard Henderson  <rth@redhat.com>
849         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
850         (AM_CCASFLAGS): New.
851         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
852         saving/restoring _AC_ARG_VAR_PRECIOUS.
853         * Makefile.in, aclocal.m4, config.h.in, configure,
854         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
856 2009-10-22  Richard Henderson  <rth@redhat.com>
858         * testsuite/*: Update for new compiler syntax.
860 2009-10-21  Richard Henderson  <rth@redhat.com>
862         * libitm.h (_ITM_abortReason): Add outerAbort.
864 2009-08-03  Richard Henderson  <rth@redhat.com>
866         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
867         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
868         * method-wbetl.c (struct w_entry): Remove mask.
869         (wbetl_write, wbetl_load): Return pointer to word containing the data;
870         adjust all callers.
872 2009-07-22  Richard Henderson  <rth@redhat.com>
874         * eh_cpp.c: New file.
875         * Makefile.am (libitm_la_SOURCES): Add it.
876         * Makefile.in: Rebuild.
877         * beginend.c (GTM_rollback_transaction): Undo exception state.
878         (GTM_trycommit_transaction): Mark inline.
879         (GTM_trycommit_and_finalize_transaction): Split out from ...
880         (_ITM_commitTransaction): ... here.
881         (_ITM_commitTransactionEH): New function.
882         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
883         cxa_unthrown, eh_in_flight; reorder.
885         * testsuite/libitm.c++/c++.exp: New.
886         * testsuite/libitm.c++/eh-1.C: New.
888         * aatree.c (aa_free): Remove REGPARM.
889         * aatree.h: Remove all REGPARM.
891 2009-07-18  Richard Henderson  <rth@redhat.com>
893         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
894         * Makefile.am (libitm_la_SOURCES): Add them.
895         * Makefile.in: Rebuild.
896         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
897         (GTM_trycommit_transaction): Likewise.
898         * libitm.h: Include aatree.h
899         (struct gtm_alloc_action): New.
900         (struct gtm_transaction): Add alloc_actions.
901         (GTM_record_allocation, GTM_forget_allocation): Declare.
902         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
903         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
904         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
905         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
906         _ZGTtdaPvRKSt9nothrow_t): Export.
908 2009-07-18  Richard Henderson  <rth@redhat.com>
910         * target_tls.h: Move ...
911         * config/posix/target_tls.h: ... here.
913 2009-07-07  Richard Henderson  <rth@redhat.com>
915         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
917 2009-07-07  Richard Henderson  <rth@redhat.com>
919         * Update to GPL3.
921 2009-07-07  Richard Henderson  <rth@redhat.com>
923         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
924         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
926         * configure.tgt: Don't use -ftls-model for x86 linux.
927         * libitm.h: Include target.h after standard includes.
928         (_gtm_thr): Rename from gtm_thr.
929         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
930         (gtm_disp, set_gtm_disp): New.
931         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
932         retry.c, serial.c, useraction.c: Use accessor functions throughout.
933         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
935 2009-07-07  Richard Henderson  <rth@redhat.com>
937         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
939 2009-07-06  Richard Henderson  <rth@redhat.com>
941         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
942         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
943         (_ITM_beginTransaction): Take variadic arguments.
944         (_ITM_registerThrownObject): Declare.
945         * beginend.c, serial.c: Update.
946         * libitm.map: Add _ITM_registerThrownObject.
948 2009-01-28  Richard Henderson  <rth@redhat.com>
950         * Makefile.am (libitm_la_SOURCES): Add clone.c.
951         * Makefile.in: Rebuild.
952         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
953         (GTM_restart_transaction): Fix uninstrumented code check.
954         * retry.c (GTM_decide_retry_strategy): Add serial check.
955         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
956         automatically go irrevokable when in serial mode.
957         * clone.c: New file.
958         * libitm.h, libitm.map: Update.
960 2009-01-27  Richard Henderson  <rth@redhat.com>
962         * Makefile.am (LTCCASCOMPILE): Define.
963         (libitm_la_SOURCES): Add methid-wbetl.c.
964         * testsuite/Makefile.am: New
965         * configure.ac: Add testsuite/Makefile.
966         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
967         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
968         (_ITM_abortTransaction): Finalize implementation method; pass
969         transaction properties to longjmp.
970         (GTM_restart_transaction): Split out from ...
971         (_ITM_commitTransaction): ... here.
972         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
973         Move to config/x86/target.h.
974         * config/linux/alpha/futex_bits.h: New.
975         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
976         * config/x86/target.h: Disable target types for 32-bit.
977         * config/alpha/sjlj.S, config/alpha/target.h: New.
978         * libitm.h (struct gtm_dispatch): Add init, fini.
979         (enum restart_reason): New.
980         (struct gtm_transaction): Add method and restarts.
981         * retry.c (GTM_decide_retry_strategy): Implement.
982         * serial.c (serial_init, serial_fini): New.
983         (GTM_serialmode): Finialize outgoing method.
984         * method-wbetl.c: New.
986 2008-12-09  Richard Henderson  <rth@redhat.com>
988         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
989         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
990         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
991         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
992         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
993         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
994         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
995         * serial.c (serial_R##T, serial_W##T): Likewise.
997 2008-11-21  Richard Henderson  <rth@redhat.com>
999         * Initial commit.