OSDN Git Service

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