Update gcc-50 to SVN version 222321 (gcc-5-branch)
[dragonfly.git] / contrib / gcc-5.0 / libitm / ChangeLog
1 2015-04-22  Release Manager
2
3         * GCC 5.1.0 released.
4
5 2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
6
7         PR libitm/64360
8         * libitm.c/stackundo.c (test2): Make it static.
9         (test1): Likewise.
10
11 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
12
13         Update copyright years.
14
15 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
16
17         * libitm.texi: Bump @copying's copyright year.
18
19 2014-12-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20
21         * testsuite/lib/libitm.exp: Load target-utils.exp.
22         Move load of target-supports.exp earlier.
23
24 2014-12-03  Uros Bizjak  <ubizjak@gmail.com>
25
26         * configure.tgt (x86_64): Tune -m32 multilib to generic.
27
28 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
29
30         PR bootstrap/63784
31         * configure: Regenerated.
32
33 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
34
35         PR target/63610
36         * configure: Regenerate.
37
38 2014-10-06  Marek Polacek  <polacek@redhat.com>
39
40         * testsuite/libitm.c/memcpy-1.c: Declare getpagesize.
41         * testsuite/libitm.c/memset-1.c: Likewise.
42
43 2014-07-24  Richard Henderson  <rth@redhat.com>
44
45         * config/aarch64/sjlj.S (_ITM_beginTransaction): Use post-inc
46         addressing mode in epilogue.
47
48 2014-05-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
49
50         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): Check for
51         -mclear-hwcap instead.
52         * configure: Regenerate.
53         * clearcap.map: Remove.
54
55 2014-05-21  John Marino  <gnugcc@marino.st>
56
57         * configure.tgt (*-*-dragonfly*): New target.
58
59 2014-05-19  Richard Henderson  <rth@redhat.com>
60
61         * config/aarch64/sjlj.S: New file.
62         * config/aarch64/target.h: New file.
63         * configure.tgt: Enable aarch64.
64
65 2014-04-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
66
67         * config/generic/asmcfi.h: Also check for
68         __GCC_HAVE_DWARF2_CFI_ASM.
69
70 2013-04-02  Richard Henderson  <rth@redhat.com>
71
72         * config/alpha/target.h (PAGE_SIZE, FIXED_PAGE_SIZE): Remove.
73         * config/arm/target.h, config/sh/target.h: Likewise.
74         * config/sparc/target.h, config/x86/target.h: Likewise.
75
76 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
77
78         * config/linux/futex_bits.h: Include errno.h.
79         (sys_futex0): If syscall returns -1, return -errno rather than
80         -1.
81
82 2014-03-26  Joseph Myers  <joseph@codesourcery.com>
83
84         * libitm.texi (Index): Rename to Library Index.
85
86 2014-01-13  H.J. Lu  <hongjiu.lu@intel.com>
87
88         PR libitm/53113
89         * Makefile.am (x86_sse.lo): Append -msse to CXXFLAGS.
90         (x86_avx.lo): Append -mavx to CXXFLAGS.
91         * Makefile.in: Regenerate.
92
93 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
94
95         Update copyright years
96
97 2014-01-02  Tobias Burnus  <burnus@net-b.de>
98
99         * libitm.texi: Bump @copying's copyright year.
100
101 2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
102
103         * config/powerpc/sjlj.S [__powerpc64__ && _CALL_ELF == 2]:
104         (FUNC): Define ELFv2 variant.
105         (END): Likewise.
106         (HIDDEN): Likewise.
107         (CALL): Likewise.
108         (BASE): Likewise.
109         (LR_SAVE): Likewise.
110
111 2013-09-20  Alan Modra  <amodra@gmail.com>
112
113         * configure: Regenerate.
114
115 2013-08-30  Torvald Riegel  <triegel@redhat.com>
116
117         * config/posix/rwlock.cc: Fix initialization order.
118
119 2013-08-30  Torvald Riegel  <triegel@redhat.com>
120
121         * libitm_i.h (gtm_thread): Assign an asm name to serial_lock.
122         (htm_fastpath): Assign an asm name.
123         * libitm.h (_ITM_codeProperties): Add non-ABI flags used by custom
124         HTM fast paths.
125         (_ITM_actions): Likewise.
126         * config/x86/target.h (HTM_CUSTOM_FASTPATH): Enable custom fastpath on
127         x86_64.
128         * config/x86/sjlj.S (_ITM_beginTransaction): Add custom HTM fast path.
129         * config/posix/rwlock.h (gtm_rwlock): Update comments.  Move summary
130         field to the start of the structure.
131         * config/linux/rwlock.h (gtm_rwlock): Update comments.
132         * beginend.cc (gtm_thread::begin_transaction): Add retry policy
133         handling for custom HTM fast paths.
134
135 2013-08-14  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
136         Revert:
137         2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
138
139         * configure.tgt: Add -msoft-float to XCFLAGS.
140
141 2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
142
143         * configure.tgt: Add -msoft-float to XCFLAGS.
144
145 2013-07-29  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
146
147         * config/s390/target.h (htm_begin, htm_commit, htm_abort)
148         (htm_transaction_active): Enable zEC12 instructions in the
149         assembler.
150         * configure.tgt: Remove -Wa,-march=zEC12 from XCFLAGS.
151
152 2013-07-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
153
154         * acinclude.m4: Add htm asm check for s390.
155         * configure.tgt: Add -mhtm and -Wa,-march=zEC12 to the options.
156         * configure: Regenerate.
157         * config/s390/target.h: Remove __HTM__ check.
158         (htm_available): Call getauxval to get hwcaps and check whether
159         HTM is available or not.
160
161 2013-07-15  Peter Bergner  <bergner@vnet.ibm.com>
162
163         * acinclude.m4 (LIBITM_CHECK_AS_HTM): New.
164         * configure.ac: Use it.
165         (AC_CHECK_HEADERS): Check for sys/auxv.h.
166         (AC_CHECK_FUNCS): Check for getauxval.
167         * config.h.in, configure: Rebuild.
168         * configure.tgt (target_cpu): Add -mhtm to XCFLAGS.
169         * config/powerpc/target.h: Include sys/auxv.h and htmintrin.h.
170         (USE_HTM_FASTPATH): Define.
171         (_TBEGIN_STARTED, _TBEGIN_INDETERMINATE, _TBEGIN_PERSISTENT,
172         _HTM_RETRIES) New macros.
173         (htm_abort, htm_abort_should_retry, htm_available, htm_begin, htm_init,
174         htm_begin_success, htm_commit, htm_transaction_active): New functions.
175
176 2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
177
178         * config/s390/target.h: Include htmintrin.h.
179         (_HTM_ITM_RETRIES): New macro definition.
180         (htm_available, htm_init, htm_begin, htm_begin_success)
181         (htm_commit, htm_abort, htm_abort_should_retry): New functions.
182
183 2013-06-20  Iain Sandoe  <iain@codesourcery.com>
184             Cesar Philippidis  <cesar@codesourcery.com>
185
186         * testsuite/lib/libitm.exp: Reorder lib loads into dependency order.
187         Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
188         * testsuite/libitm.c/c.exp: load_gcc_lib gcc-dg.exp.
189         * testsuite/libitm.c++/c++.exp: load_gcc_lib gcc-dg.exp.
190
191 2013-06-20  Torvald Riegel  <triegel@redhat.com>
192
193         * query.cc (_ITM_inTransaction): Abort when using the HTM fastpath.
194         (_ITM_getTransactionId): Same.
195         * config/x86/target.h (htm_transaction_active): New.
196
197 2013-06-20  Torvald Riegel  <triegel@redhat.com>
198
199         PR libitm/57643
200         * beginend.cc (gtm_thread::begin_transaction): Handle reentrancy in
201         the HTM fastpath.
202
203 2013-03-31  Gerald Pfeifer  <gerald@pfeifer.com>
204
205         PR bootstrap/56714
206         * local_atomic (__always_inline): Always define our version.
207         (__calculate_memory_order): Mark inline.
208         (atomic_thread_fence): Ditto.
209         (atomic_signal_fence): Ditto.
210         (atomic_bool::atomic_flag_test_and_set_explicit): Ditto.
211         (atomic_bool::atomic_flag_clear_explicit): Ditto.
212         (atomic_bool::atomic_flag_test_and_set): Ditto.
213         (atomic_bool::atomic_flag_clear): Ditto.
214
215 2013-04-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
216
217         * config/s390/sjlj.S: New file.
218         * config/s390/target.h: New file.
219         * configure.tgt: Set options for S/390.
220
221 2013-03-23  Andi Kleen  <ak@linux.intel.com>
222
223         * local_atomic (__always_inline): Add.
224         (__calculate_memory_order, atomic_thread_fence,
225          atomic_signal_fence, test_and_set, clear, store, load,
226          exchange, compare_exchange_weak, compare_exchange_strong,
227          fetch_add, fetch_sub, fetch_and, fetch_or, fetch_xor):
228         Add __always_inline to force inlining.
229
230 2013-02-11  Iain Sandoe  <iain@codesourcery.com>
231             Jack Howarth  <howarth@bromo.med.uc.edu>
232             Patrick Marlier  <patrick.marlier@gmail.com>
233
234         PR libitm/55693
235         * alloc_cpp.cc: Enable function declarations on darwin.
236         * eh_cpp.cc: Likewise.
237
238 2013-02-03  Richard Sandiford  <rdsandiford@googlemail.com>
239
240         Update copyright years.
241
242 2012-11-09  Torvald Riegel  <triegel@redhat.com>
243
244         * beginend.cc (htm_fastpath): New.
245         (gtm_thread::begin_transaction, _ITM_commitTransaction,
246         _ITM_commitTransactionEH): Add HTM fastpath handling.
247         * config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
248         * config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
249         * config/x86/target.h (htm_available, htm_init, htm_begin_success,
250         htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
251         * configure.tgt: Add -mrtm to XCFLAGS.
252         * method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
253         (gtm_thread::serialirr_mode): Add HTM fastpath handling.
254         * libitm_i.h (htm_fastpath, dispatch_htm): Declare.
255         * retry.cc (parse_default_method): Add HTM method parsing.
256         (gtm_thread::number_of_threads_changed): Use HTM by default if
257         available.
258
259 2012-11-04  Thomas Schwinge  <thomas@codesourcery.com>
260
261         * configure: Regenerate.
262
263 2012-10-31  Richard Henderson  <rth@redhat.com>
264
265         * acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
266         * configure.ac: Use it.
267         * config.h.in, configure: Rebuild.
268         * testsuite/Makefile.in: Rebuild.
269
270 2012-10-24  Torvald Riegel  <triegel@redhat.com>
271
272         * libitm.texi: Clarify ABI requirements for data-logging functions.
273
274 2012-10-24  Torvald Riegel  <triegel@redhat.com>
275
276         * retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
277         it requires serial mode instead of assuming that for certain
278         dispatchs.
279         * dispatch.h (abi_dispatch::requires_serial): New.
280         (abi_dispatch::abi_dispatch): Adapt.
281         * method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
282         * method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
283         * method-serial.cc (serialirr_dispatch::serialirr_dispatch,
284         serial_dispatch::serial_dispatch,
285         serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
286
287 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
288
289         * config/x86/target.h (struct gtm_jmpbuf): Merge x86_64
290         and ia32 declarations some more.
291         * config/x86/sjlj.S (_ITM_beginTransaction): Move ret to common code.
292
293 2012-09-20  Jakub Jelinek  <jakub@redhat.com>
294
295         PR other/43620
296         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
297         * configure: Regenerate.
298         * Makefile.in: Regenerate.
299
300 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
301
302         * configure: Regenerated.
303
304 2012-07-31  Uros Bizjak  <ubizjak@gmail.com>
305
306         * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.
307
308 2012-05-21  Patrick Marlier  <patrick.marlier@gmail.com>
309
310         * eh_cpp.cc: Fix __cxa_end_catch declaration.
311
312 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
313
314         * configure: Regenerated.
315
316 2012-04-04  H.J. Lu  <hongjiu.lu@intel.com>
317
318         PR libitm/52854
319         * config/x86/target.h (gtm_jmpbuf): Replace long with long long
320         for x86-64.
321
322 2012-04-03  Tristan Gingold  <gingold@adacore.com>
323
324         * configure: Regenerate.
325
326 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
327
328         PR bootstrap/52812
329         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
330
331 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
332
333         * testsuite/lib/libitm.exp: load fortran-modules.exp
334
335 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
336
337         * configure.tgt (*-*-irix6*): Remove.
338
339 2012-03-13  Torvald Riegel  <triegel@redhat.com>
340
341         PR libitm/52526
342         * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
343         wake-up.
344
345 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
346
347         * configure.tgt (*-*-osf*): Remove.
348         * configure: Regenerate.
349
350 2012-03-05  Torvald Riegel  <triegel@redhat.com>
351
352         * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
353         memtransfer/memset if size isn't larger than zero.
354
355 2012-03-02  Torvald Riegel  <triegel@redhat.com>
356
357         * libitm.texi: Link to specification and add a usage example.
358
359 2012-02-24  Torvald Riegel  <triegel@redhat.com>
360
361         * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
362         default dispatch for more than 1 thread to ml_wt.
363
364 2012-02-20  Torvald Riegel  <triegel@redhat.com>
365
366         * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
367
368 2012-02-20  Torvald Riegel  <triegel@redhat.com>
369
370         * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
371
372 2012-02-20  Torvald Riegel  <triegel@redhat.com>
373
374         * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
375         serial mode corner cases made obsolete by prior gtm_rwlock changes.
376         (gl_wt_dispatch.rollback): Same.
377
378 2012-02-20  Torvald Riegel  <triegel@redhat.com>
379
380         * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
381
382 2012-02-20  Torvald Riegel  <triegel@redhat.com>
383
384         * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
385         for RfW src.  Optimize number of calls to gtm_thr.
386
387 2012-02-20  Torvald Riegel  <triegel@redhat.com>
388
389         * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
390         acquisition to ...
391         * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
392         (default_dispatch): Make atomic.
393         (GTM::gtm_thread::set_default_dispatch): Access atomically.
394         (GTM::gtm_thread::decide_retry_strategy): Access atomically and
395         use decide_begin_dispatch() if default_dispatch might have changed.
396         (GTM::gtm_thread::number_of_threads_changed): Initialize
397         default_dispatch here.
398
399 2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
400             Patrick Marlier  <patrick.marlier@gmail.com>
401
402         PR libitm/52220
403         * alloc_cpp.cc: No dummy definitions for darwin.
404         * eh_cpp.cc: Likewise.
405
406 2012-02-14  Richard Henderson  <rth@redhat.com>
407
408         * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
409
410 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
411
412         * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
413
414 2012-02-14  Torvald Riegel  <triegel@redhat.com>
415
416         * libitm_i.h (GTM::gtm_rwlog_entry): New.
417         (GTM::gtm_thread): Add read and write logs.
418         (GTM::dispatch_ml_wt): Declare.
419         * retry.cc (parse_default_method): Support ml_wt.
420         * method-ml.cc: New file.
421         * Makefile.am: Add method-ml.cc.
422         * Makefile.in: Regenerate.
423
424 2012-02-14  Torvald Riegel  <triegel@redhat.com>
425
426         * dispatch.h (GTM::abi_dispatch::supports): New.
427         (GTM::method_group::reinit): New.
428         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
429         (GTM::gtm_thread::number_of_threads_changed): Check that the method
430         supports the current situation.
431
432 2012-02-14  Torvald Riegel  <triegel@redhat.com>
433
434         * util.cc (GTM::xcalloc): New.
435         * common.h (GTM::xcalloc): Declare.
436
437 2012-02-14  Eric Botcazou  <ebotcazou@adacore.com>
438
439         * config/sparc/target.h (cpu_relax): Read from CC register.
440         * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
441
442 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
443
444         * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
445
446 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
447
448         * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
449         * config/sparc/cacheline.h: New file.
450         * config/sparc/target.h: Likewise.
451         * config/sparc/sjlj.S: Likewise.
452         * config/linux/sparc/futex_bits.h: Likewise.
453
454 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
455
456         * configure.ac (link_itm): Fix comment.
457         * configure: Regenerate.
458         * testsuite/lib/libitm.exp: Do not pass -litm for the link.
459
460 2012-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
461
462         PR libitm/51822
463         * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
464         Correct libgomp references.
465
466 2012-01-24  Torvald Riegel  <triegel@redhat.com>
467
468         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
469         wake-up.
470
471 2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
472
473         * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
474         end of structure.
475         * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
476         offset values.  Do not copy return address.  Decrement stack
477         by 56 bytes only.
478         (GTM_longjump) [__x86_64__]: Update offset values.
479
480 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
481
482         PR libitm/51830
483         * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
484         the first function argument to %eax.
485
486 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
487
488         * libitm.h (_ITM_getThreadnum): Remove.
489         * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
490
491 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
492
493         * clearcap.map: New file.
494         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
495         * configure.ac: Call it.
496         Clear HWCAP_LDFLAGS if defaulting to -mavx.
497         * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
498         * configure: Regenerate.
499         * Makefile.in: Regenerate.
500         * testsuite/Makefile.in: Regenerate.
501
502 2012-01-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
503
504         PR libitm/51173
505         * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
506         include, exclude options.
507
508 2012-01-14  Torvald Riegel  <triegel@redhat.com>
509
510         * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
511         rolling back.
512         * containers.h (GTM::vector::set_size): New.
513
514 2012-01-14  Torvald Riegel  <triegel@redhat.com>
515
516         PR libitm/51855
517         * config/generic/tls.h (GTM::mask_stack_top): New.
518         (GTM::mask_stack_bottom): Declare.
519         * config/generic/tls.c (GTM::mask_stack_bottom): New.
520         * local.cc (gtm_undolog::rollback): Filter out any updates that
521         overlap the libitm stack.  Add current transaction as parameter.
522         * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
523         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
524         * testsuite/libitm.c/stackundo.c: New test.
525
526 2012-01-10  Richard Henderson  <rth@redhat.com>
527
528         * libitm_i.h (_Unwind_DeleteException): Declare weak.
529         * eh_cpp.cc (_Unwind_DeleteException): Define for
530         !HAVE_ELF_STYLE_WEAKREF.
531
532 2012-01-08  Torvald Riegel  <triegel@redhat.com>
533
534         * local.cc (GTM_LB): Use GTM::gtm_undolog.
535         (GTM::gtm_thread::drop_references_undolog): Remove.
536         (GTM::gtm_thread::commit_undolog,
537         GTM::gtm_thread::rollback_undolog): Move to ...
538         * libitm_i.h (GTM::gtm_undolog): ...here. New.
539         (GTM::gtm_undolog_entry): Remove.
540         (GTM::gtm_thread): Adapt.
541         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
542         (GTM::gtm_thread::trycommit): Adapt.
543         * method-serial.cc (serial_dispatch::log): Adapt.
544         * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
545         (gl_wt_dispatch::store): Fix likely/unlikely.
546         * containers.h (GTM::vector::resize): Add additional_capacity
547         parameter and handle it.
548         (GTM::vector::resize_noinline): New/adapt.
549         (GTM::vector::push): New.
550
551 2012-01-06  Richard Henderson  <rth@redhat.com>
552
553         * configure.tgt: Support powerpc-linux and powerpc-darwin.
554         * config/linux/powerpc/futex_bits.h: New file.
555         * config/powerpc/cacheline.h: New file.
556         * config/powerpc/sjlj.S: New file.
557         * config/powerpc/target.h: New file.
558         * config/generic/asmcfi.h (cfi_offset): New.
559         (cfi_restore, cfi_undefined): New.
560
561 2012-01-05  Aldy Hernandez  <aldyh@redhat.com>
562
563         PR other/51171
564         * testsuite/libitm.c/reentrant.c: Remove xfail.
565         (thread): Pass x to pure().
566         From Patrik Marlier <patrick.marlier@gmail.com>.
567
568 2011-12-24  Torvald Riegel  <triegel@redhat.com>
569
570         * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
571         privatization safety if already in serial mode.
572
573 2011-12-24  Torvald Riegel  <triegel@redhat.com>
574
575         * beginend.cc (GTM::gtm_thread::restart): Add and handle
576         finish_serial_upgrade parameter.
577         * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
578         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
579         Don't unset reader flag.
580         (GTM::gtm_rwlock::write_upgrade_finish): New.
581         * config/posix/rwlock.cc: Same.
582         * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
583         Declare.
584         * config/posix/rwlock.h: Same.
585         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
586         flag after commit or after rollback when restarting.
587
588 2011-12-24  Torvald Riegel  <triegel@redhat.com>
589
590         * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
591         (GTM::gtm_thread::try_commit): Changed memory order.
592         * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
593         as parameter.
594         * config/linux/x86/futex_bits.h (sys_futex0): Same.
595         * config/linux/sh/futex_bits.h (sys_futex0): Same.
596         * config/linux/futex_bits.h (sys_futex0): Same.
597         * config/linux/futex.cc (futex_wait, futex_wake): Same.
598         * config/linux/futex.h (futex_wait, futex_wake): Same.
599         * config/linux/rwlock.h (gtm_rwlock::writers,
600         gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
601         ints.
602         * config/linux/rwlock.cc (gtm_rwlock::read_lock,
603         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
604         gtm_rwlock::write_unlock): Fix memory orders and fences.
605         * config/posix/rwlock.cc (gtm_rwlock::read_lock,
606         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
607         gtm_rwlock::write_unlock): Same.
608         * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
609         * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
610         gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
611         Add comments.
612         (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
613         gl_wt_dispatch::load, gl_wt_dispatch::store,
614         gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
615         orders and fences.  Add comments.
616
617 2011-12-21  Jakub Jelinek  <jakub@redhat.com>
618
619         * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
620         * Makefile.in: Regenerated.
621
622 2011-12-17  Kaz Kojima  <kkojima@gcc.gnu.org>
623
624         * configure.tgt: Add sh* case.
625         * config/sh/target.h: New file.
626         * config/sh/sjlj.S: New file.
627         * config/linux/sh/futex_bits.h: New file.
628
629 2011-12-14  Richard Henderson  <rth@redhat.com>
630
631         * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
632         * config/arm/sjlj.S, config/arm/target.h: New files.
633         * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
634         (cfi_rel_offset): New.
635         * config/linux/futex_bits.h: New file.
636         * config/linux/futex.cc: Include futex_bits.h here...
637         * config/linux/futex.h: ... not here.
638         * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
639         * configure.ac (ARCH_AM): New conditional.
640         * Makefile.in, configure: Rebuild.
641         * configure.tgt: Handle ARM.
642
643 2011-12-13  Richard Henderson  <rth@redhat.com>
644
645         * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
646         signed/unsigned comparison werror.
647
648         * local_atomic: New file.
649         * libitm_i.h: Include it.
650         (gtm_thread::shared_state): Use atomic template.
651         * beginend.cc (GTM::gtm_clock): Use atomic template.
652         (global_tid): Use atomic template if 64-bit atomics available.
653         (gtm_thread::gtm_thread): Update shared_state access.
654         (gtm_thread::trycommit): Likewise.
655         (choose_code_path): Update global_tid access.
656         * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
657         * stmlock.h (GTM::gtm_clock): Use atomic template.
658         (gtm_get_clock, gtm_inc_clock): Update accesses.
659         * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
660         redundant __sync_synchronize after atomic shared_state access.
661         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
662         (gtm_rwlock::write_lock_generic): Likewise.
663         (gtm_rwlock::read_unlock): Likewise.
664         * config/alpha/target.h (atomic_read_barrier): Remove.
665         (atomic_write_barrier): Remove.
666         * config/x86/target.h (atomic_read_barrier): Remove.
667         (atomic_write_barrier): Remove.
668
669 2011-11-30  Richard Henderson  <rth@redhat.com>
670
671         * libitm_i.h (GTM_longjmp): Swap first and second arguments.
672         * beginend.c (_ITM_abortTransaction): Update to match.
673         (GTM::gtm_thread::restart): Likewise.
674         * config/alpha/sjlj.S (GTM_longjmp): Likewise.
675         * config/x86/sjlj.S (GTM_longjmp): Likewise.
676
677 2011-11-23  Iain Sandoe  <iains@gcc.gnu.org>
678
679         * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
680         * Makefile.in: Regenerate.
681
682 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
683
684         * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
685         * alloc_cpp.cc: Generate dummy functions if we don't
686         HAVE_ELF_STYLE_WEAKREF.
687         * eh_cpp.cc: Likewise.
688         * configure: Regenerate.
689         * aclocal.m4:  Likewise.
690         * config.h.in: Likewise.
691         * Makefile.in: Likewise.
692         * testsuite/Makefile.in: Likewise.
693
694 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
695
696         * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
697         __USER_LABEL_PREFIX__ for targets that use it.
698         (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
699         (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
700         in portability to non-elf targets.
701         (GTM_longjmp): Likewise.
702         * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
703         where required.
704
705 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
706
707         * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
708         * testsuite/libitm.c/memset-1.c: Likewise.
709
710 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
711
712         * configure: Regenerate.
713
714 2011-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
715
716         * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
717         (LIBITM_ENABLE_SYMVERS): Handle sun style.
718         * Makefile.am: Handle sun style versioning.
719         (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
720         * configure: Regenerate.
721         * Makefile.in: Regenerate.
722
723 2011-11-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
724
725         * config/generic/asmcfi.h: Fix comment.
726         * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
727         sequence without .hidden support, error for non-ELF targets.
728         (GTM_longjmp) [__ELF__]: Only use .hidden if
729         HAVE_ATTRIBUTE_VISIBILITY.
730
731 2011-11-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
732
733         * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
734         _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
735         Dummy functions.
736         * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
737         __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
738
739 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
740
741         PR bootstrap/51098
742         * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
743         * configure: Regenerate.
744
745 2011-11-14  H.J. Lu  <hongjiu.lu@intel.com>
746
747         * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
748
749 2011-11-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
750
751         * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
752         .hidden.
753         (.note.GNU-stack): Only use if __linux__.
754         * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
755         * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
756         * testsuite/libitm.c/reentrant.c: Likewise.
757         * testsuite/libitm.c/simple-2.c: Likewise.
758         * testsuite/libitm.c/txrelease.c: Likewise.
759         * testsuite/libitm.c++/static_ctor.C: Likewise.
760
761 2011-11-10  Richard Henderson  <rth@redhat.com>
762
763         * config/x86/x86_avx.cc: Remove #undef __AVX__ hack.  Tidy comments.
764         * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
765         * configure.ac (ARCH_X86_AVX): New conditional.
766         * Makefile.in, configure: Rebuild.
767
768 2011-11-09  Richard Henderson  <rth@redhat.com>
769
770         * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
771         * configure.ac: Use it.
772         * config.h.in, configure: Rebuild.
773         * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
774
775 2011-11-09  Richard Henderson  <rth@redhat.com>
776
777         * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
778         * config/alpha/unaligned.h: Remove file.
779         * config/generic/unaligned.h: Remove file.
780         * config/x86/unaligned.h: Remove file.
781         * config/generic/cachepage.h: Remove file.
782         * config/posix/cachepage.cc: Remove file.
783         * config/generic/cacheline.cc: Remove file.
784         * config/x86/cacheline.cc: Remove file.
785         * config/generic/cacheline.h (gtm_cacheline): Remove the
786         store_mask, copy_mask, copy_mask_wb methods.
787         * config/x86/cacheline.h: Likewise.
788         * config/alpha/cacheline.h: Fall back to generic after setting size.
789         * config/generic/tls.cc (gtm_mask_stack): Remove.
790         * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
791         (GTM_vpalignr_table): Remove.
792         * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
793         (GTM_pshift_table): Remove.
794         * config/libitm_i.h: Don't include cachepage.h.
795         * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
796         * Makefile.in, testsuite/Makefile.in: Rebuild.
797
798 2011-11-09  Richard Henderson  <rth@redhat.com>
799
800         * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
801         to emit branch prediction hint.
802
803         * config/x86/sjlj.S: Protect elf directives with __ELF__.
804         Protect .note.GNU-stack with __linux__.
805
806         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
807         * configure, aclocal.m4, config.h.in: Rebuild.
808         * config/generic/asmcfi.h: New file.
809         * config/x86/sjlj.S: Use it.
810
811 2011-11-08  Richard Henderson  <rth@redhat.com>
812
813         * local.cc (_ITM_LB): Use a normal call, not a function alias.
814
815 2011-11-08  Richard Henderson  <rth@redhat.com>
816
817         * configure.tgt: Test correct directory for supported cpus.
818
819         * configure.ac: Exit if unsupported.
820         * configure: Rebuild.
821         * configure.tgt: Delete boilerplate from libgomp for unsupported
822         targets.  Set UNSUPPORTED for unsupported targets.
823
824 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
825
826         * configure.tgt: Handle i386 like i[456]86.
827         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
828         take address.
829         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
830         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
831
832 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
833
834         * method-wbetl.cc: Update copyright notice.
835         * aatree.cc: Same.
836         * util.cc: Same.
837         * libitm.h: Same.
838         * memset.cc: Same.
839         * eh_cpp.cc: Same.
840         * barrier.tpl: Same.
841         * useraction.cc: Same.
842         * stmlock.h: Same.
843         * memcpy.cc: Same.
844         * common.h: Same.
845         * config/generic/tls.cc: Same.
846         * config/generic/cacheline.h: Same.
847         * config/generic/cachepage.h: Same.
848         * config/generic/cacheline.cc: Same.
849         * config/generic/unaligned.h: Same.
850         * config/x86/cacheline.h: Same.
851         * config/x86/cacheline.cc: Same.
852         * config/x86/unaligned.h: Same.
853         * config/alpha/cacheline.h: Same.
854         * config/alpha/unaligned.h: Same.
855         * config/alpha/sjlj.S: Same.
856         * config/posix/cachepage.cc: Same.
857         * config/linux/futex.h: Same.
858         * config/linux/alpha/futex_bits.h: Same.
859
860 2011-11-04  Torvald Riegel  <triegel@redhat.com>
861
862         * libitm.texi: No cover text and invariant sections.
863
864 2011-11-03  Richard Henderson  <rth@redhat.com>
865
866         * local_type_traits: New file.
867         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
868
869 2011-11-03  Richard Henderson  <rth@redhat.com>
870
871         * configure.ac: Don't test for gfortran.
872         * configure: Rebuild.
873
874         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
875         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
876
877 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
878
879         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
880         * testsuite/libitm.c/memset-1.c: Same.
881         * testsuite/libitm.c/c.exp: Same.
882         * testsuite/lib/libitm-dg.exp: Same.
883         * testsuite/lib/libitm.exp: Same.
884         * testsuite/libitm.c++/c++.exp: Same.
885
886 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
887
888         * testsuite/config/default.exp: Update copyright date.
889         * configure.ac: Add copyright info.
890         * configure.tgt: Same.
891
892 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
893
894         * testsuite/libitm.c/reentrant.c: XFAIL.
895         * testsuite/libitm.c++/static_ctor.C: XFAIL.
896
897 2011-10-29  Torvald Riegel  <triegel@redhat.com>
898
899         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
900         handle aborts.
901         (_ITM_abortTransaction): Handle aborts of outer transactions.
902         * libitm_i.h: Same.
903         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
904         * libitm.texi: Document aborts of outer transactions.
905         * testsuite/libitm.c/cancel.c: New file.
906
907 2011-10-19  Torvald Riegel  <triegel@redhat.com>
908
909         * testsuite/*: Change __transaction to __transaction_atomic or
910         __transaction_relaxed.
911
912 2011-10-19  Torvald Riegel  <triegel@redhat.com>
913
914         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
915         (gtm_thr): Same.
916
917 2011-10-19  Torvald Riegel  <triegel@redhat.com>
918
919         * libitm_i.h: Add gl_wt dispatch.
920         * retry.cc (parse_default_method): Same.
921         * method-gl.cc: New file.
922         * Makefile.am: Use method-gl.cc.
923         * Makefile.in: Rebuild.
924
925 2011-10-19  Torvald Riegel  <triegel@redhat.com>
926
927         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
928         safety if requested by a TM method.
929         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
930         privatization safety.
931         * method-serial.cc: Same.
932
933 2011-10-19  Torvald Riegel  <triegel@redhat.com>
934
935         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
936         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
937         undolog-related member functions from *_local to *_undolog.
938         * local.cc (gtm_thread::commit_undolog): Same.
939         * beginend.cc (GTM::gtm_thread::trycommit): Same.
940         (GTM::gtm_thread::rollback): Roll back undolog before
941         dispatch-specific rollback.
942
943 2011-10-19  Torvald Riegel  <triegel@redhat.com>
944
945         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
946         re-initialization of the current method group.
947         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
948
949 2011-10-19  Torvald Riegel  <triegel@redhat.com>
950
951         * alloc.cc (commit_allocations_2): Do not free transaction-local
952         memory when committing a nested transaction.
953
954 2011-10-19  Torvald Riegel  <triegel@redhat.com>
955
956         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
957         serial-irrevocable dispatch, not serial.
958
959 2011-10-19  Torvald Riegel  <triegel@redhat.com>
960
961         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
962         declarations.
963         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
964         * method-serial.cc: Implement begin_or_restart().
965         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
966         dispatch-specific begin_or_restart().
967         (GTM::gtm_thread::restart): Same.
968
969 2011-08-23  Torvald Riegel  <triegel@redhat.com>
970
971         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
972         restarting without switching to serial mode.
973         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
974         transaction state. Choose closed-nesting alternative if available.
975         (GTM::gtm_thread::set_default_dispatch): New.
976         (parse_default_method): New.
977         (GTM::gtm_thread::number_of_threads_changed): New.
978         * method-serial.cc (GTM::serial_mg): New method group class.
979         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
980         fini.
981         (GTM::serial_dispatch): Same.
982         (GTM::serialirr_onwrite_dispatch): Same.
983         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
984         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
985         registered threads.
986         (GTM::gtm_thread::gtm_thread): Same.
987         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
988         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
989         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
990         choose dispatch but set state according to dispatch here.
991         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
992         (GTM::method_group): New class.
993         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
994         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
995         * libitm.texi: Document TM methods, method groups, method life cycle.
996         Rename method sets to method groups.
997
998 2011-08-23  Torvald Riegel  <triegel@redhat.com>
999
1000         * config/x86/tls.h: Moved to ...
1001         * config/linux/x86/tls.h: ... here.
1002
1003 2011-08-23  Torvald Riegel  <triegel@redhat.com>
1004
1005         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
1006         Add X32 support.
1007         * config/x86/sjlj.S: Same.
1008
1009 2011-08-19  Torvald Riegel  <triegel@redhat.com>
1010
1011         * config/linux/rwlock.h: New file.
1012         * config/linux/rwlock.c: New file.
1013         * configure.ac: Reenable futex support (undo SVN rev 157758).
1014         * Makefile.am: Same.
1015         * configure.tgt: Same.
1016         * config/linux/alpha/futex_bits.h: Same.
1017         * config/linux/futex.h: Same. Return number of woken processes.
1018         * config/linux/futex.cc: Same.
1019         (futex_wait): Remove spinning.
1020         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
1021         Use __x86_64__ instead of __LP64__.
1022         * aclocal.m4: Include generic futex checks.
1023         * configure: Rebuild.
1024         * Makefile.in: Rebuild.
1025         * testsuite/Makefile.in: Rebuild.
1026         * beginend.cc: Include pthread.h.
1027         * config/posix/cachepage.cc: Same.
1028
1029 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1030
1031         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
1032         (abi_disp, set_abi_disp): Move to tx's TLS slot.
1033         (set_gtm_thr): New.
1034         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
1035         (set_gtm_thr): New.
1036         (GTM::gtm_thread::thread_num): Removed.
1037         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
1038         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
1039         tx-to-thread renaming.
1040         * beginend.cc: Adapted to tx-to-thread renaming.
1041         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
1042         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
1043         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
1044         gtm_transaction to gtm_thread.
1045         (_ITM_getThreadnum): Removed. Not supported anymore.
1046         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
1047         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
1048         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
1049         gtm_tx-to-gtm_thr renaming if necessary.
1050         * eh_cpp.cc: Same.
1051         * local.cc: Same.
1052         * retry.cc: Same.
1053         * clone.cc: Same.
1054         * alloc.cc: Same.
1055         * alloc_c.cc: Same.
1056         * alloc_cpp.cc: Same.
1057         * method-serial.cc: Same.
1058         * config/generic/tls.cc: Same.
1059         * config/posix/rwlock.h (gtm_rwlock): Same.
1060         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
1061
1062 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1063
1064         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
1065         implementation.
1066         (gtm_rwlock::read_unlock): Same.
1067         (gtm_rwlock::write_lock_generic): New. Generalized from ...
1068         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
1069         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
1070         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
1071         w_upgrade. Replaced by per-transaction flags (in shared_state).
1072         Added c_confirmed_writers.
1073         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
1074         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
1075         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
1076         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
1077         * beginend.cc (GTM::gtm_transaction::begin_transaction,
1078         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
1079         * libitm.texi: Document locking conventions and implementations in
1080         libitm.
1081
1082 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1083
1084         * libitm_i.h (next_tx): Add list of all threads' transaction.
1085         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
1086         transaction with list of transactions and ...
1087         (thread_exit_handler): ... deregister here.
1088         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
1089         * config/x86/target.h: Same.
1090
1091 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1092
1093         * testsuite/libitm.c++/static_ctor.C: New file.
1094
1095 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1096
1097         * testsuite/libitm.c/reentrant.c: New file.
1098
1099 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1100
1101         * config/generic/tls.h: Remove the free list for transactions and ...
1102         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
1103         (GTM::gtm_transaction::operator delete): ... and release here.
1104         (thread_exit_handler): New. Delete tx when thread terminates.
1105         (thread_exit_init): New.
1106         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
1107         * testsuite/libitm.c/txrelease.c: New file.
1108
1109 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1110
1111         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
1112         * testsuite/libitm.c/notx.c: New file.
1113
1114 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1115
1116         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
1117         * libitm_i.h (local_tid): ... to here.
1118         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
1119         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
1120
1121 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1122
1123         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
1124         serialirr_onwrite_dispatch as new default for now.
1125         * method-serial.cc (serialirr_onwrite_dispatch): New.
1126         (GTM::dispatch_serialirr_onwrite): New.
1127         * libitm_i.h: Same.
1128
1129 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1130
1131         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
1132         * query.cc (_ITM_getTransactionId): There is no active transaction if
1133         the current nesting level is zero.
1134
1135 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1136
1137         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
1138         rollback.
1139
1140 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1141
1142         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
1143         transaction properties from the caller instead of from the
1144         transaction object.
1145         * libitm_i.h: Same.
1146         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
1147
1148 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1149
1150         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
1151         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
1152         * dispatch.h: Same.
1153         * method-serial.cc: Same.
1154         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
1155         flat nesting as default, and closed nesting on demand.
1156         (GTM::gtm_transaction::rollback): Same.
1157         (_ITM_abortTransaction): Same.
1158         (GTM::gtm_transaction::restart): Same.
1159         (GTM::gtm_transaction::trycommit): Same.
1160         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
1161         (choose_code_path): New.
1162         (GTM::gtm_transaction_cp::save): New.
1163         (GTM::gtm_transaction_cp::commit): New.
1164         * query.cc (_ITM_inTransaction): Support flat nesting.
1165         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
1166         (GTM::gtm_transaction): Support flat and closed nesting.
1167         * alloc.cc (commit_allocations_2): New.
1168         (commit_cb_data): New helper struct.
1169         (GTM::gtm_transaction::commit_allocations): Handle nested
1170         commits/rollbacks.
1171         * libitm.texi: Update user action section, add description of nesting.
1172
1173 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1174
1175         * libitm_i.h: Add closed nesting as restart reason.
1176         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
1177
1178 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1179
1180         * useraction.cc: Use vector instead of list to store actions.
1181         Also support partial rollbacks for closed nesting.
1182         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
1183         * beginend.cc: Same.
1184
1185 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1186
1187         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
1188         closed_nesting flags, as well as a closed nesting alternative.
1189         * method-serial.cc: Same.
1190         (serial_dispatch): Renamed to serialirr_dispatch.
1191         (GTM::dispatch_serialirr): Same.
1192         (serial_dispatch_ul): Renamed to serial_dispatch.
1193         (GTM::dispatch_serial): Same.
1194
1195 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1196
1197         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
1198
1199 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1200
1201         * aatree.h (aa_tree::remove): New.
1202         (aa_tree::operator new): Add placement new.
1203
1204 2011-07-02  Torvald Riegel  <triegel@redhat.com>
1205
1206         * containers.h: New file.
1207         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
1208         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
1209         * common.h: ... to here.
1210         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
1211         * local.cc: Same.
1212
1213 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1214
1215         * libitm_i.h (STATE_ABORTING): Remove.
1216         * beginend.cc (_ITM_abortTransaction): Same.
1217         (GTM::gtm_transaction::trycommit_and_finalize): Same.
1218         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
1219         (_ITM_rollbackTransaction): Remove.
1220         * beginend.cc: Same.
1221         * libitm.map: Same.
1222         * libitm.texi: Document these ABI changes.
1223
1224 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1225
1226         * libitm.texi: New file.
1227         * Makefile.am: Add libitm.texi.
1228         * Makefile.in: Rebuild.
1229
1230 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1231
1232         * libitm_i.h: Move parts to common.h and dispatch.h.
1233         * common.h: New file.
1234         * dispatch.h: New file, new dispatch class.
1235         Rename GTM::abi_dispatch::lock_type to ls_modifier.
1236         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
1237         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
1238         decision to retry.cc.
1239         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
1240         only.
1241         (GTM::gtm_transaction::decide_begin_dispatch): Same.
1242         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
1243         logging.
1244         * barrier.cc: Use new barriers definitions.
1245         (abi_dispatch::memmove_overlap_check): New.
1246         * config/x86/x86_sse.cc: Same.
1247         * config/x86/x86_avx.cc: Same.
1248         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
1249         memcpy.cc.
1250         * Makefile.in: Rebuild.
1251         * method-readonly.cc: Remove.
1252         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
1253         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
1254
1255 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1256
1257         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
1258         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
1259         * testsuite/libitm.c/dropref-2.c: Same.
1260         * testsuite/libitm.c/dropref.c: Same.
1261
1262 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1263
1264         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
1265         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
1266         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
1267         * alloc_c.cc: Same.
1268         * barrier.tpl: Same.
1269         * beginend.c: Same.
1270         * config/generic/tls.h: Same.
1271         * config/x86/tls.h: Same.
1272         * libitm_i.h: Same.
1273         * memcpy.cc: Same.
1274         * memset.cc: Same.
1275         * method-readonly.cc: Same.
1276         * method-serial.cc: Same.
1277         * method-wbetl.cc: Same.
1278         * retry.cc: Same.
1279
1280 2011-03-03  Richard Henderson  <rth@redhat.com>
1281
1282         * config/posix/rwlock.cc (write_upgrade): Add missing case.
1283         From Patrik Marlier <patrick.marlier@unine.ch>.
1284
1285 2011-02-03  Richard Henderson  <rth@redhat.com>
1286
1287         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
1288         * configure.ac: Use it.
1289         * configure, config.h.in: Rebuild.
1290         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
1291         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
1292         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
1293         * libitm.map: Use wildcards to match size_t mangling.
1294
1295 2010-12-14  Richard Henderson  <rth@redhat.com>
1296
1297         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
1298         blocks of TIDs per thread.
1299         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
1300         (setup_gtm_thr): Return the thread structure.
1301         * config/x86/tls.h (setup_gtm_thr): Likewise.
1302
1303 2010-12-14  Richard Henderson  <rth@redhat.com>
1304
1305         * clone.cc (table_lock): Remove.
1306         (find_clone): Don't take it.
1307         (ExcludeTransaction): New helper class.
1308         (_ITM_registerTMCloneTable): Use it.
1309         (_ITM_deregisterTMCloneTable): Likewise.
1310
1311 2010-12-14  Richard Henderson  <rth@redhat.com>
1312
1313         * config/x86/tls.h: New file.
1314
1315 2010-07-15  Richard Henderson  <rth@redhat.com>
1316
1317         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1318         * Makefile.in: Rebuild.
1319
1320 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1321
1322         * method-wbetl.cc (trydropreference): Fix source line.
1323
1324 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1325
1326         * libitm.h: Add comment.
1327         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1328
1329 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
1330
1331         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1332         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1333         available, use pthread mutexes.
1334         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1335         * config.h.in: Regenerate.
1336         * configure: Regenerate.
1337
1338 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
1339
1340         * libitm.h (ITM_PURE): Define.
1341         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1342
1343 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1344
1345         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1346         (validate): Add comment.
1347         (trydropreference): New.
1348         * method-readonly.cc (class readonly_dispatch): Add
1349         trydropreference.
1350         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1351         Call trydropreference().
1352         * libitm.h (_ITM_dropReferences): Remove const attribute.
1353         * method-serial.cc (class serial_dispatch): Add trydropreference.
1354         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1355
1356 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1357
1358         * memcpy.cc (do_memcpy): Comment.
1359
1360 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
1361
1362         * barrier.tpl: Add comments throughout.
1363
1364 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1365
1366         * method-wbetl.cc (struct w_entry): Add comments.
1367         (trycommit): Same.
1368         (rollback): Same.
1369
1370 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1371
1372         * alloc_c.cc (_ITM_dropReferences): New.
1373         * libitm.map (_ITM_dropReferences): Add.
1374         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1375         * libitm_i.h (struct gtm_transaction): Declare
1376         drop_references_allocations and drop_references_local.
1377         * local.cc (rollback_local): Ignore memory when applicable.
1378         (drop_references_local): New.
1379
1380 2010-06-23  Richard Henderson  <rth@redhat.com>
1381
1382         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1383         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1384         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1385         * config/alpha/target.h: Likewise.
1386         * config/generic/tls.cc (gtm_mask_stack): Use it.
1387
1388 2010-06-23  Richard Henderson  <rth@redhat.com>
1389
1390         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1391         a mutex instead of trying a lock-free compare-and-swap on the list.
1392         (gtm_cacheline_page::operator delete): Likewise.
1393
1394 2010-06-16  Richard Henderson  <rth@redhat.com>
1395
1396         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1397         that overlap the libitm stack.
1398         * barrier.tpl: Mark incoming stack.
1399         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1400         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1401         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1402         * memcpy.cc, memset.cc: Likewise.
1403         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1404         * config/generic/tls.h (gtm_thread): Add stack_top member.
1405         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1406         * libitm_i.h (gtm_mask_stack): Declare.
1407         * config/generic/tls.cc: New file.
1408         * Makefile.am (libitm_la_SOURCES): Add it.
1409         (AM_CXXFLAGS): Turn off exceptions.
1410         * Makefile.in: Rebuild.
1411
1412 2010-06-16  Richard Henderson  <rth@redhat.com>
1413
1414         * alloc.cc (struct gtm_alloc_action): Move definition ...
1415         * libitm_i.h: ... here.
1416         (class gtm_transaction): Declare new and delete.
1417         * beginend.cc (alloc_tx): Reformulate as operator new.
1418         (free_tx): Reformulate as operator delete.
1419         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1420
1421 2010-06-11  Richard Henderson  <rth@redhat.com>
1422
1423         * clone.cc (clone_entry_compare): Fix typo.
1424         From Patrik Marlier <patrick.marlier@unine.ch>.
1425
1426 2010-05-13  Richard Henderson  <rth@redhat.com>
1427
1428         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1429         in extern "C".
1430
1431 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
1432
1433         * libitm_i.h (struct gtm_transaction): Remove
1434         get_allocation_size.
1435         (record_allocation): Remove size parameter.
1436         * libitm.map (_ITM_realloc): Remove.
1437         * alloc_c.cc (_ITM_realloc): Remove.
1438         (_ITM_malloc): Remove size argument to record_allocation.
1439         (_ITM_calloc): Same.
1440         * alloc_cpp.cc (_ZGTtnwm): Same.
1441         (_ZGTtnwmRKSt9nothrow_t): Same.
1442         (_ZGTtnam): Same.
1443         (_ZGTtnamRKSt9nothrow_t): Same.
1444         * alloc.cc (struct gtm_alloc_action): Remove size.
1445         (get_allocation_size): Remove.
1446         (commit_allocations): Add comment.
1447         (record_allocation): Remove size parameter.
1448         (forget_allocation): Remove set of size.
1449
1450 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
1451
1452         * Makefile.am (abi_version): New.
1453         (AM_CXXFLAGS): Pass abi_version.
1454         * Makefile.in: Regenerate.
1455         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1456
1457 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
1458
1459         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1460         _ITM_getTMCloneOrIrrevokable.
1461         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1462         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1463
1464 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
1465
1466         * configure.ac: Remove Linux futex support.
1467         * configure.tgt (config_path): Same.
1468         * Makefile.am: Same.
1469         * config/linux: Remove entire directory.
1470         * configure: Rebuild.
1471         * Makefile.in: Rebuild.
1472         * testsuite/Makefile.in: Rebuild.
1473
1474 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
1475
1476         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1477         switching to serial mode.
1478         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1479
1480 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
1481
1482         * configure.tgt: Add emacs -*- tags.
1483         * barrier.tpl: Same.
1484
1485 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
1486
1487         * Makefile.am: Rename serial.cc to method-serial.cc.
1488         * Makefile.in: Regenerate with automake 1.11.1.
1489         * testsuite/Makefile.in: Same.
1490         * aclocal.m4: Regenerate with aclocal 1.11.1.
1491         * method-serial.cc: Rename from serial.cc.
1492         * libitm_i.h (struct gtm_transaction): Update comment on
1493         serialirr_mode.
1494
1495 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
1496
1497         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1498         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1499
1500 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
1501
1502         * configure: Rebuild.
1503
1504 2009-11-12  Richard Henderson  <rth@redhat.com>
1505
1506         * Rewrite everything in C++.
1507
1508 2009-11-03  Richard Henderson  <rth@redhat.com>
1509
1510         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1511         * Makefile.am (libitm_la_SOURCES): Add them.
1512         * configure.ac (ARCH_X86): New conditional.
1513         * Makefile.in, configure: Rebuild.
1514         * configure.tgt: Set up ARCH; do cflags setup at the same time.
1515         Move futex setup into "other system configury" case.
1516         * local.c (rollback_local): Merge into ...
1517         (GTM_rollback_local): ... here.
1518         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1519         (_ITM_LB): Define as an alias to GTM_LB.
1520
1521 2009-11-03  Richard Henderson  <rth@redhat.com>
1522
1523         * method-readonly.c: New file.
1524         * Makefile.am (libitm_la_SOURCES): Add it.
1525         * Makefile.in: Rebuild.
1526         * beginend.c (gtm_stmlock_array, gtm_clock): New.
1527         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1528         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1529         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1530         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1531         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1532         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1533         gtm_get_clock, gtm_inc_clock): New.
1534         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1535         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1536         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1537         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1538         replace uses with new libitm_i.h symbols.
1539         (dispatch_wbetl): Rename from wbetl_dispatch.
1540         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1541         away from dispatch_readonly; abort if the beginTransaction call
1542         asserted that the transaction was readonly.
1543
1544 2009-11-03  Richard Henderson  <rth@redhat.com>
1545
1546         * memset.c: New file.
1547         * Makefile.am (libitm_la_SOURCES): Add it.
1548         * Makefile.in: Rebuild.
1549         * testsuite/libitm.c/memset-1.c: New.
1550
1551 2009-11-03  Richard Henderson  <rth@redhat.com>
1552
1553         * dispatch.c: Remove file.
1554         * useraction.c (struct gtm_user_action): Move from libitm.h.
1555         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1556         (serial_memset, serial_memmove, serial_memcpy): Remove.
1557         (serial_W*, serial_R*): Remove.
1558         (serial_dispatch): Update to match.
1559         * configure.ac: Move Werror down below configure checks.  Don't
1560         check for sys/loadavg.h, do check for malloc.h.  Don't check for
1561         getloadavg and clock_gettime; do check for memalign, posix_memalign.
1562         Use GCC_AC_FUNC_MMAP_BLACKLIST
1563         * libitm.h: Split out all internal items to...
1564         * libitm_i.h: ... here.  New file.
1565         * copymask.c: New file.
1566         * local.c (struct gtm_local_undo): Move from libitm.h.
1567         (GTM_alloc_local): Rename from alloc_local; export.
1568         * memcpy.c: New file.
1569         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1570         * config/posix/page.c: New file.
1571         * config/posix/target_tls.h: Remove file.
1572         * barrier.c: New file.
1573         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1574         copymask.c, page.c.
1575         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1576         * method-wbetl.c: Rewrite for new cacheline methods.
1577         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1578
1579         * config/alpha/sjlj.S: Fix typo.
1580         * config/alpha/target_i.h: Copy functions from alpha/target.h.
1581         * config/alpha/copymask.c: New file.
1582         * config/alpha/target.h (CACHELINE_SIZE): New.
1583         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1584
1585         * config/x86/target_i.h: Copy functions from x86/target.h.
1586         * config/x86/copymask.c: New file.
1587         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1588         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1589         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1590         * config/x86/target_tls.h: Move contents to target_i.h.
1591
1592         * testsuite/libitm.c/clone-1.c: Include libitm.h.
1593         * testsuite/libitm.c/memcpy-1.c: New.
1594
1595 2009-10-22  Richard Henderson  <rth@redhat.com>
1596
1597         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1598         (AM_CCASFLAGS): New.
1599         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
1600         saving/restoring _AC_ARG_VAR_PRECIOUS.
1601         * Makefile.in, aclocal.m4, config.h.in, configure,
1602         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1603
1604 2009-10-22  Richard Henderson  <rth@redhat.com>
1605
1606         * testsuite/*: Update for new compiler syntax.
1607
1608 2009-10-21  Richard Henderson  <rth@redhat.com>
1609
1610         * libitm.h (_ITM_abortReason): Add outerAbort.
1611
1612 2009-08-03  Richard Henderson  <rth@redhat.com>
1613
1614         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1615         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1616         * method-wbetl.c (struct w_entry): Remove mask.
1617         (wbetl_write, wbetl_load): Return pointer to word containing the data;
1618         adjust all callers.
1619
1620 2009-07-22  Richard Henderson  <rth@redhat.com>
1621
1622         * eh_cpp.c: New file.
1623         * Makefile.am (libitm_la_SOURCES): Add it.
1624         * Makefile.in: Rebuild.
1625         * beginend.c (GTM_rollback_transaction): Undo exception state.
1626         (GTM_trycommit_transaction): Mark inline.
1627         (GTM_trycommit_and_finalize_transaction): Split out from ...
1628         (_ITM_commitTransaction): ... here.
1629         (_ITM_commitTransactionEH): New function.
1630         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1631         cxa_unthrown, eh_in_flight; reorder.
1632
1633         * testsuite/libitm.c++/c++.exp: New.
1634         * testsuite/libitm.c++/eh-1.C: New.
1635
1636         * aatree.c (aa_free): Remove REGPARM.
1637         * aatree.h: Remove all REGPARM.
1638
1639 2009-07-18  Richard Henderson  <rth@redhat.com>
1640
1641         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1642         * Makefile.am (libitm_la_SOURCES): Add them.
1643         * Makefile.in: Rebuild.
1644         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1645         (GTM_trycommit_transaction): Likewise.
1646         * libitm.h: Include aatree.h
1647         (struct gtm_alloc_action): New.
1648         (struct gtm_transaction): Add alloc_actions.
1649         (GTM_record_allocation, GTM_forget_allocation): Declare.
1650         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1651         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1652         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1653         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1654         _ZGTtdaPvRKSt9nothrow_t): Export.
1655
1656 2009-07-18  Richard Henderson  <rth@redhat.com>
1657
1658         * target_tls.h: Move ...
1659         * config/posix/target_tls.h: ... here.
1660
1661 2009-07-07  Richard Henderson  <rth@redhat.com>
1662
1663         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1664
1665 2009-07-07  Richard Henderson  <rth@redhat.com>
1666
1667         * Update to GPL3.
1668
1669 2009-07-07  Richard Henderson  <rth@redhat.com>
1670
1671         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1672         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1673
1674         * configure.tgt: Don't use -ftls-model for x86 linux.
1675         * libitm.h: Include target.h after standard includes.
1676         (_gtm_thr): Rename from gtm_thr.
1677         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1678         (gtm_disp, set_gtm_disp): New.
1679         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1680         retry.c, serial.c, useraction.c: Use accessor functions throughout.
1681         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1682
1683 2009-07-07  Richard Henderson  <rth@redhat.com>
1684
1685         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
1686
1687 2009-07-06  Richard Henderson  <rth@redhat.com>
1688
1689         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1690         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1691         (_ITM_beginTransaction): Take variadic arguments.
1692         (_ITM_registerThrownObject): Declare.
1693         * beginend.c, serial.c: Update.
1694         * libitm.map: Add _ITM_registerThrownObject.
1695
1696 2009-01-28  Richard Henderson  <rth@redhat.com>
1697
1698         * Makefile.am (libitm_la_SOURCES): Add clone.c.
1699         * Makefile.in: Rebuild.
1700         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1701         (GTM_restart_transaction): Fix uninstrumented code check.
1702         * retry.c (GTM_decide_retry_strategy): Add serial check.
1703         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
1704         automatically go irrevokable when in serial mode.
1705         * clone.c: New file.
1706         * libitm.h, libitm.map: Update.
1707
1708 2009-01-27  Richard Henderson  <rth@redhat.com>
1709
1710         * Makefile.am (LTCCASCOMPILE): Define.
1711         (libitm_la_SOURCES): Add methid-wbetl.c.
1712         * testsuite/Makefile.am: New
1713         * configure.ac: Add testsuite/Makefile.
1714         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1715         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1716         (_ITM_abortTransaction): Finalize implementation method; pass
1717         transaction properties to longjmp.
1718         (GTM_restart_transaction): Split out from ...
1719         (_ITM_commitTransaction): ... here.
1720         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1721         Move to config/x86/target.h.
1722         * config/linux/alpha/futex_bits.h: New.
1723         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1724         * config/x86/target.h: Disable target types for 32-bit.
1725         * config/alpha/sjlj.S, config/alpha/target.h: New.
1726         * libitm.h (struct gtm_dispatch): Add init, fini.
1727         (enum restart_reason): New.
1728         (struct gtm_transaction): Add method and restarts.
1729         * retry.c (GTM_decide_retry_strategy): Implement.
1730         * serial.c (serial_init, serial_fini): New.
1731         (GTM_serialmode): Finialize outgoing method.
1732         * method-wbetl.c: New.
1733
1734 2008-12-09  Richard Henderson  <rth@redhat.com>
1735
1736         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1737         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1738         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1739         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1740         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1741         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1742         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1743         * serial.c (serial_R##T, serial_W##T): Likewise.
1744
1745 2008-11-21  Richard Henderson  <rth@redhat.com>
1746
1747         * Initial commit.