OSDN Git Service

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