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