OSDN Git Service

9ce9ba71a9a2b117716b4f25d72d1590e7280743
[pf3gnuchains/gcc-fork.git] / libitm / ChangeLog
1 2012-02-11  Eric Botcazou  <ebotcazou@adacore.com>
2
3         * configure.ac (link_itm): Fix comment.
4         * configure: Regenerate.
5         * testsuite/lib/libitm.exp: Do not pass -litm for the link.
6
7 2012-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8
9         PR libitm/51822
10         * testsuite/libitm.c++/c++.exp (lang_link_flags): Add
11         -shared-libgcc.
12         Correct libgomp references.
13
14 2012-01-24  Torvald Riegel  <triegel@redhat.com>
15
16         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
17         wake-up.
18
19 2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
20
21         * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
22         end of structure.
23         * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
24         offset values.  Do not copy return address.  Decrement stack
25         by 56 bytes only.
26         (GTM_longjump) [__x86_64__]: Update offset values.
27
28 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
29
30         PR libitm/51830
31         * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
32         the first function argument to %eax.
33
34 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
35
36         * libitm.h (_ITM_getThreadnum): Remove.
37         * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
38
39 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
40
41         * clearcap.map: New file.
42         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
43         * configure.ac: Call it.
44         Clear HWCAP_LDFLAGS if defaulting to -mavx.
45         * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
46         * configure: Regenerate.
47         * Makefile.in: Regenerate.
48         * testsuite/Makefile.in: Regenerate.
49
50 2012-01-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
51
52         PR libitm/51173
53         * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
54         include, exclude options.
55
56 2012-01-14  Torvald Riegel  <triegel@redhat.com>
57
58         * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
59         rolling back.
60         * containers.h (GTM::vector::set_size): New.
61
62 2012-01-14  Torvald Riegel  <triegel@redhat.com>
63
64         PR libitm/51855
65         * config/generic/tls.h (GTM::mask_stack_top): New.
66         (GTM::mask_stack_bottom): Declare.
67         * config/generic/tls.c (GTM::mask_stack_bottom): New.
68         * local.cc (gtm_undolog::rollback): Filter out any updates that
69         overlap the libitm stack.  Add current transaction as parameter.
70         * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
71         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
72         * testsuite/libitm.c/stackundo.c: New test.
73
74 2012-01-10  Richard Henderson  <rth@redhat.com>
75
76         * libitm_i.h (_Unwind_DeleteException): Declare weak.
77         * eh_cpp.cc (_Unwind_DeleteException): Define for
78         !HAVE_ELF_STYLE_WEAKREF.
79
80 2012-01-08  Torvald Riegel  <triegel@redhat.com>
81
82         * local.cc (GTM_LB): Use GTM::gtm_undolog.
83         (GTM::gtm_thread::drop_references_undolog): Remove.
84         (GTM::gtm_thread::commit_undolog,
85         GTM::gtm_thread::rollback_undolog): Move to ...
86         * libitm_i.h (GTM::gtm_undolog): ...here. New.
87         (GTM::gtm_undolog_entry): Remove.
88         (GTM::gtm_thread): Adapt.
89         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
90         (GTM::gtm_thread::trycommit): Adapt.
91         * method-serial.cc (serial_dispatch::log): Adapt.
92         * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
93         (gl_wt_dispatch::store): Fix likely/unlikely.
94         * containers.h (GTM::vector::resize): Add additional_capacity
95         parameter and handle it.
96         (GTM::vector::resize_noinline): New/adapt.
97         (GTM::vector::push): New.
98
99 2012-01-06  Richard Henderson  <rth@redhat.com>
100
101         * configure.tgt: Support powerpc-linux and powerpc-darwin.
102         * config/linux/powerpc/futex_bits.h: New file.
103         * config/powerpc/cacheline.h: New file.
104         * config/powerpc/sjlj.S: New file.
105         * config/powerpc/target.h: New file.
106         * config/generic/asmcfi.h (cfi_offset): New.
107         (cfi_restore, cfi_undefined): New.
108
109 2012-01-05  Aldy Hernandez  <aldyh@redhat.com>
110
111         PR other/51171
112         * testsuite/libitm.c/reentrant.c: Remove xfail.
113         (thread): Pass x to pure().
114         From Patrik Marlier <patrick.marlier@gmail.com>.
115
116 2011-12-24  Torvald Riegel  <triegel@redhat.com>
117
118         * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
119         privatization safety if already in serial mode.
120
121 2011-12-24  Torvald Riegel  <triegel@redhat.com>
122
123         * beginend.cc (GTM::gtm_thread::restart): Add and handle
124         finish_serial_upgrade parameter.
125         * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
126         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
127         Don't unset reader flag.
128         (GTM::gtm_rwlock::write_upgrade_finish): New.
129         * config/posix/rwlock.cc: Same.
130         * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
131         Declare.
132         * config/posix/rwlock.h: Same.
133         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
134         flag after commit or after rollback when restarting.
135
136 2011-12-24  Torvald Riegel  <triegel@redhat.com>
137
138         * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
139         (GTM::gtm_thread::try_commit): Changed memory order.
140         * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
141         as parameter.
142         * config/linux/x86/futex_bits.h (sys_futex0): Same.
143         * config/linux/sh/futex_bits.h (sys_futex0): Same.
144         * config/linux/futex_bits.h (sys_futex0): Same.
145         * config/linux/futex.cc (futex_wait, futex_wake): Same.
146         * config/linux/futex.h (futex_wait, futex_wake): Same.
147         * config/linux/rwlock.h (gtm_rwlock::writers,
148         gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
149         ints.
150         * config/linux/rwlock.cc (gtm_rwlock::read_lock,
151         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
152         gtm_rwlock::write_unlock): Fix memory orders and fences.
153         * config/posix/rwlock.cc (gtm_rwlock::read_lock,
154         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
155         gtm_rwlock::write_unlock): Same.
156         * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
157         * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
158         gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
159         Add comments.
160         (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
161         gl_wt_dispatch::load, gl_wt_dispatch::store,
162         gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
163         orders and fences.  Add comments.
164
165 2011-12-21  Jakub Jelinek  <jakub@redhat.com>
166
167         * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
168         * Makefile.in: Regenerated.
169
170 2011-12-17  Kaz Kojima  <kkojima@gcc.gnu.org>
171
172         * configure.tgt: Add sh* case.
173         * config/sh/target.h: New file.
174         * config/sh/sjlj.S: New file.
175         * config/linux/sh/futex_bits.h: New file.
176
177 2011-12-14  Richard Henderson  <rth@redhat.com>
178
179         * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
180         * config/arm/sjlj.S, config/arm/target.h: New files.
181         * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
182         (cfi_rel_offset): New.
183         * config/linux/futex_bits.h: New file.
184         * config/linux/futex.cc: Include futex_bits.h here...
185         * config/linux/futex.h: ... not here.
186         * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
187         * configure.ac (ARCH_AM): New conditional.
188         * Makefile.in, configure: Rebuild.
189         * configure.tgt: Handle ARM.
190
191 2011-12-13  Richard Henderson  <rth@redhat.com>
192
193         * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
194         signed/unsigned comparison werror.
195
196         * local_atomic: New file.
197         * libitm_i.h: Include it.
198         (gtm_thread::shared_state): Use atomic template.
199         * beginend.cc (GTM::gtm_clock): Use atomic template.
200         (global_tid): Use atomic template if 64-bit atomics available.
201         (gtm_thread::gtm_thread): Update shared_state access.
202         (gtm_thread::trycommit): Likewise.
203         (choose_code_path): Update global_tid access.
204         * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
205         * stmlock.h (GTM::gtm_clock): Use atomic template.
206         (gtm_get_clock, gtm_inc_clock): Update accesses.
207         * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
208         redundant __sync_synchronize after atomic shared_state access.
209         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
210         (gtm_rwlock::write_lock_generic): Likewise.
211         (gtm_rwlock::read_unlock): Likewise.
212         * config/alpha/target.h (atomic_read_barrier): Remove.
213         (atomic_write_barrier): Remove.
214         * config/x86/target.h (atomic_read_barrier): Remove.
215         (atomic_write_barrier): Remove.
216
217 2011-11-30  Richard Henderson  <rth@redhat.com>
218
219         * libitm_i.h (GTM_longjmp): Swap first and second arguments.
220         * beginend.c (_ITM_abortTransaction): Update to match.
221         (GTM::gtm_thread::restart): Likewise.
222         * config/alpha/sjlj.S (GTM_longjmp): Likewise.
223         * config/x86/sjlj.S (GTM_longjmp): Likewise.
224
225 2011-11-23  Iain Sandoe  <iains@gcc.gnu.org>
226
227         * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
228         * Makefile.in: Regenerate.
229
230 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
231
232         * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
233         * alloc_cpp.cc: Generate dummy functions if we don't
234         HAVE_ELF_STYLE_WEAKREF.
235         * eh_cpp.cc: Likewise.
236         * configure: Regenerate.
237         * aclocal.m4:  Likewise.
238         * config.h.in: Likewise.
239         * Makefile.in: Likewise.
240         * testsuite/Makefile.in: Likewise.
241
242 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
243
244         * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
245         __USER_LABEL_PREFIX__ for targets that use it.
246         (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
247         (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
248         in portability to non-elf targets.
249         (GTM_longjmp): Likewise.
250         * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
251         where required.
252
253 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
254
255         * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
256         * testsuite/libitm.c/memset-1.c: Likewise.
257
258 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
259
260         * configure: Regenerate.
261
262 2011-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
263
264         * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
265         (LIBITM_ENABLE_SYMVERS): Handle sun style.
266         * Makefile.am: Handle sun style versioning.
267         (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
268         * configure: Regenerate.
269         * Makefile.in: Regenerate.
270
271 2011-11-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
272
273         * config/generic/asmcfi.h: Fix comment.
274         * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
275         sequence without .hidden support, error for non-ELF targets.
276         (GTM_longjmp) [__ELF__]: Only use .hidden if
277         HAVE_ATTRIBUTE_VISIBILITY.
278
279 2011-11-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
280
281         * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
282         _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
283         Dummy functions.
284         * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
285         __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
286
287 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
288
289         PR bootstrap/51098
290         * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
291         * configure: Regenerate.
292
293 2011-11-14  H.J. Lu  <hongjiu.lu@intel.com>
294
295         * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
296
297 2011-11-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
298
299         * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
300         .hidden.
301         (.note.GNU-stack): Only use if __linux__.
302         * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
303         * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
304         * testsuite/libitm.c/reentrant.c: Likewise.
305         * testsuite/libitm.c/simple-2.c: Likewise.
306         * testsuite/libitm.c/txrelease.c: Likewise.
307         * testsuite/libitm.c++/static_ctor.C: Likewise.
308
309 2011-11-10  Richard Henderson  <rth@redhat.com>
310
311         * config/x86/x86_avx.cc: Remove #undef __AVX__ hack.  Tidy comments.
312         * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
313         * configure.ac (ARCH_X86_AVX): New conditional.
314         * Makefile.in, configure: Rebuild.
315
316 2011-11-09  Richard Henderson  <rth@redhat.com>
317
318         * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
319         * configure.ac: Use it.
320         * config.h.in, configure: Rebuild.
321         * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
322
323 2011-11-09  Richard Henderson  <rth@redhat.com>
324
325         * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
326         * config/alpha/unaligned.h: Remove file.
327         * config/generic/unaligned.h: Remove file.
328         * config/x86/unaligned.h: Remove file.
329         * config/generic/cachepage.h: Remove file.
330         * config/posix/cachepage.cc: Remove file.
331         * config/generic/cacheline.cc: Remove file.
332         * config/x86/cacheline.cc: Remove file.
333         * config/generic/cacheline.h (gtm_cacheline): Remove the
334         store_mask, copy_mask, copy_mask_wb methods.
335         * config/x86/cacheline.h: Likewise.
336         * config/alpha/cacheline.h: Fall back to generic after setting size.
337         * config/generic/tls.cc (gtm_mask_stack): Remove.
338         * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
339         (GTM_vpalignr_table): Remove.
340         * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
341         (GTM_pshift_table): Remove.
342         * config/libitm_i.h: Don't include cachepage.h.
343         * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
344         * Makefile.in, testsuite/Makefile.in: Rebuild.
345
346 2011-11-09  Richard Henderson  <rth@redhat.com>
347
348         * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
349         to emit branch prediction hint.
350
351         * config/x86/sjlj.S: Protect elf directives with __ELF__.
352         Protect .note.GNU-stack with __linux__.
353
354         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
355         * configure, aclocal.m4, config.h.in: Rebuild.
356         * config/generic/asmcfi.h: New file.
357         * config/x86/sjlj.S: Use it.
358
359 2011-11-08  Richard Henderson  <rth@redhat.com>
360
361         * local.cc (_ITM_LB): Use a normal call, not a function alias.
362
363 2011-11-08  Richard Henderson  <rth@redhat.com>
364
365         * configure.tgt: Test correct directory for supported cpus.
366
367         * configure.ac: Exit if unsupported.
368         * configure: Rebuild.
369         * configure.tgt: Delete boilerplate from libgomp for unsupported
370         targets.  Set UNSUPPORTED for unsupported targets.
371
372 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
373
374         * configure.tgt: Handle i386 like i[456]86.
375         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
376         take address.
377         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
378         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
379
380 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
381
382         * method-wbetl.cc: Update copyright notice.
383         * aatree.cc: Same.
384         * util.cc: Same.
385         * libitm.h: Same.
386         * memset.cc: Same.
387         * eh_cpp.cc: Same.
388         * barrier.tpl: Same.
389         * useraction.cc: Same.
390         * stmlock.h: Same.
391         * memcpy.cc: Same.
392         * common.h: Same.
393         * config/generic/tls.cc: Same.
394         * config/generic/cacheline.h: Same.
395         * config/generic/cachepage.h: Same.
396         * config/generic/cacheline.cc: Same.
397         * config/generic/unaligned.h: Same.
398         * config/x86/cacheline.h: Same.
399         * config/x86/cacheline.cc: Same.
400         * config/x86/unaligned.h: Same.
401         * config/alpha/cacheline.h: Same.
402         * config/alpha/unaligned.h: Same.
403         * config/alpha/sjlj.S: Same.
404         * config/posix/cachepage.cc: Same.
405         * config/linux/futex.h: Same.
406         * config/linux/alpha/futex_bits.h: Same.
407
408 2011-11-04  Torvald Riegel  <triegel@redhat.com>
409
410         * libitm.texi: No cover text and invariant sections.
411
412 2011-11-03  Richard Henderson  <rth@redhat.com>
413
414         * local_type_traits: New file.
415         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
416
417 2011-11-03  Richard Henderson  <rth@redhat.com>
418
419         * configure.ac: Don't test for gfortran.
420         * configure: Rebuild.
421
422         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
423         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
424
425 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
426
427         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
428         * testsuite/libitm.c/memset-1.c: Same.
429         * testsuite/libitm.c/c.exp: Same.
430         * testsuite/lib/libitm-dg.exp: Same.
431         * testsuite/lib/libitm.exp: Same.
432         * testsuite/libitm.c++/c++.exp: Same.
433
434 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
435
436         * testsuite/config/default.exp: Update copyright date.
437         * configure.ac: Add copyright info.
438         * configure.tgt: Same.
439
440 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
441
442         * testsuite/libitm.c/reentrant.c: XFAIL.
443         * testsuite/libitm.c++/static_ctor.C: XFAIL.
444
445 2011-10-29  Torvald Riegel  <triegel@redhat.com>
446
447         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
448         handle aborts.
449         (_ITM_abortTransaction): Handle aborts of outer transactions.
450         * libitm_i.h: Same.
451         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
452         * libitm.texi: Document aborts of outer transactions.
453         * testsuite/libitm.c/cancel.c: New file.
454
455 2011-10-19  Torvald Riegel  <triegel@redhat.com>
456
457         * testsuite/*: Change __transaction to __transaction_atomic or
458         __transaction_relaxed.
459
460 2011-10-19  Torvald Riegel  <triegel@redhat.com>
461
462         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
463         (gtm_thr): Same.
464
465 2011-10-19  Torvald Riegel  <triegel@redhat.com>
466
467         * libitm_i.h: Add gl_wt dispatch.
468         * retry.cc (parse_default_method): Same.
469         * method-gl.cc: New file.
470         * Makefile.am: Use method-gl.cc.
471         * Makefile.in: Rebuild.
472
473 2011-10-19  Torvald Riegel  <triegel@redhat.com>
474
475         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
476         safety if requested by a TM method.
477         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
478         privatization safety.
479         * method-serial.cc: Same.
480
481 2011-10-19  Torvald Riegel  <triegel@redhat.com>
482
483         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
484         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
485         undolog-related member functions from *_local to *_undolog.
486         * local.cc (gtm_thread::commit_undolog): Same.
487         * beginend.cc (GTM::gtm_thread::trycommit): Same.
488         (GTM::gtm_thread::rollback): Roll back undolog before
489         dispatch-specific rollback.
490
491 2011-10-19  Torvald Riegel  <triegel@redhat.com>
492
493         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
494         re-initialization of the current method group.
495         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
496
497 2011-10-19  Torvald Riegel  <triegel@redhat.com>
498
499         * alloc.cc (commit_allocations_2): Do not free transaction-local
500         memory when committing a nested transaction.
501
502 2011-10-19  Torvald Riegel  <triegel@redhat.com>
503
504         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
505         serial-irrevocable dispatch, not serial.
506
507 2011-10-19  Torvald Riegel  <triegel@redhat.com>
508
509         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
510         declarations.
511         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
512         * method-serial.cc: Implement begin_or_restart().
513         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
514         dispatch-specific begin_or_restart().
515         (GTM::gtm_thread::restart): Same.
516
517 2011-08-23  Torvald Riegel  <triegel@redhat.com>
518
519         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
520         restarting without switching to serial mode.
521         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
522         transaction state. Choose closed-nesting alternative if available.
523         (GTM::gtm_thread::set_default_dispatch): New.
524         (parse_default_method): New.
525         (GTM::gtm_thread::number_of_threads_changed): New.
526         * method-serial.cc (GTM::serial_mg): New method group class.
527         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
528         fini.
529         (GTM::serial_dispatch): Same.
530         (GTM::serialirr_onwrite_dispatch): Same.
531         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
532         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
533         registered threads.
534         (GTM::gtm_thread::gtm_thread): Same.
535         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
536         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
537         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
538         choose dispatch but set state according to dispatch here.
539         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
540         (GTM::method_group): New class.
541         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
542         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
543         * libitm.texi: Document TM methods, method groups, method life cycle.
544         Rename method sets to method groups.
545
546 2011-08-23  Torvald Riegel  <triegel@redhat.com>
547
548         * config/x86/tls.h: Moved to ...
549         * config/linux/x86/tls.h: ... here.
550
551 2011-08-23  Torvald Riegel  <triegel@redhat.com>
552
553         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
554         Add X32 support.
555         * config/x86/sjlj.S: Same.
556
557 2011-08-19  Torvald Riegel  <triegel@redhat.com>
558
559         * config/linux/rwlock.h: New file.
560         * config/linux/rwlock.c: New file.
561         * configure.ac: Reenable futex support (undo SVN rev 157758).
562         * Makefile.am: Same.
563         * configure.tgt: Same.
564         * config/linux/alpha/futex_bits.h: Same.
565         * config/linux/futex.h: Same. Return number of woken processes.
566         * config/linux/futex.cc: Same.
567         (futex_wait): Remove spinning.
568         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
569         Use __x86_64__ instead of __LP64__.
570         * aclocal.m4: Include generic futex checks.
571         * configure: Rebuild.
572         * Makefile.in: Rebuild.
573         * testsuite/Makefile.in: Rebuild.
574         * beginend.cc: Include pthread.h.
575         * config/posix/cachepage.cc: Same.
576
577 2011-08-12  Torvald Riegel  <triegel@redhat.com>
578
579         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
580         (abi_disp, set_abi_disp): Move to tx's TLS slot.
581         (set_gtm_thr): New.
582         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
583         (set_gtm_thr): New.
584         (GTM::gtm_thread::thread_num): Removed.
585         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
586         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
587         tx-to-thread renaming.
588         * beginend.cc: Adapted to tx-to-thread renaming.
589         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
590         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
591         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
592         gtm_transaction to gtm_thread.
593         (_ITM_getThreadnum): Removed. Not supported anymore.
594         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
595         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
596         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
597         gtm_tx-to-gtm_thr renaming if necessary.
598         * eh_cpp.cc: Same.
599         * local.cc: Same.
600         * retry.cc: Same.
601         * clone.cc: Same.
602         * alloc.cc: Same.
603         * alloc_c.cc: Same.
604         * alloc_cpp.cc: Same.
605         * method-serial.cc: Same.
606         * config/generic/tls.cc: Same.
607         * config/posix/rwlock.h (gtm_rwlock): Same.
608         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
609
610 2011-08-12  Torvald Riegel  <triegel@redhat.com>
611
612         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
613         implementation.
614         (gtm_rwlock::read_unlock): Same.
615         (gtm_rwlock::write_lock_generic): New. Generalized from ...
616         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
617         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
618         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
619         w_upgrade. Replaced by per-transaction flags (in shared_state).
620         Added c_confirmed_writers.
621         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
622         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
623         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
624         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
625         * beginend.cc (GTM::gtm_transaction::begin_transaction,
626         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
627         * libitm.texi: Document locking conventions and implementations in
628         libitm.
629
630 2011-08-12  Torvald Riegel  <triegel@redhat.com>
631
632         * libitm_i.h (next_tx): Add list of all threads' transaction.
633         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
634         transaction with list of transactions and ...
635         (thread_exit_handler): ... deregister here.
636         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
637         * config/x86/target.h: Same.
638
639 2011-08-12  Torvald Riegel  <triegel@redhat.com>
640
641         * testsuite/libitm.c++/static_ctor.C: New file.
642
643 2011-08-12  Torvald Riegel  <triegel@redhat.com>
644
645         * testsuite/libitm.c/reentrant.c: New file.
646
647 2011-08-12  Torvald Riegel  <triegel@redhat.com>
648
649         * config/generic/tls.h: Remove the free list for transactions and ...
650         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
651         (GTM::gtm_transaction::operator delete): ... and release here.
652         (thread_exit_handler): New. Delete tx when thread terminates.
653         (thread_exit_init): New.
654         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
655         * testsuite/libitm.c/txrelease.c: New file.
656
657 2011-08-12  Torvald Riegel  <triegel@redhat.com>
658
659         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
660         * testsuite/libitm.c/notx.c: New file.
661
662 2011-08-12  Torvald Riegel  <triegel@redhat.com>
663
664         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
665         * libitm_i.h (local_tid): ... to here.
666         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
667         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
668
669 2011-08-12  Torvald Riegel  <triegel@redhat.com>
670
671         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
672         serialirr_onwrite_dispatch as new default for now.
673         * method-serial.cc (serialirr_onwrite_dispatch): New.
674         (GTM::dispatch_serialirr_onwrite): New.
675         * libitm_i.h: Same.
676
677 2011-08-12  Torvald Riegel  <triegel@redhat.com>
678
679         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
680         * query.cc (_ITM_getTransactionId): There is no active transaction if
681         the current nesting level is zero.
682
683 2011-07-28  Torvald Riegel  <triegel@redhat.com>
684
685         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
686         rollback.
687
688 2011-07-28  Torvald Riegel  <triegel@redhat.com>
689
690         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
691         transaction properties from the caller instead of from the
692         transaction object.
693         * libitm_i.h: Same.
694         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
695
696 2011-07-28  Torvald Riegel  <triegel@redhat.com>
697
698         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
699         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
700         * dispatch.h: Same.
701         * method-serial.cc: Same.
702         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
703         flat nesting as default, and closed nesting on demand.
704         (GTM::gtm_transaction::rollback): Same.
705         (_ITM_abortTransaction): Same.
706         (GTM::gtm_transaction::restart): Same.
707         (GTM::gtm_transaction::trycommit): Same.
708         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
709         (choose_code_path): New.
710         (GTM::gtm_transaction_cp::save): New.
711         (GTM::gtm_transaction_cp::commit): New.
712         * query.cc (_ITM_inTransaction): Support flat nesting.
713         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
714         (GTM::gtm_transaction): Support flat and closed nesting.
715         * alloc.cc (commit_allocations_2): New.
716         (commit_cb_data): New helper struct.
717         (GTM::gtm_transaction::commit_allocations): Handle nested
718         commits/rollbacks.
719         * libitm.texi: Update user action section, add description of nesting.
720
721 2011-07-28  Torvald Riegel  <triegel@redhat.com>
722
723         * libitm_i.h: Add closed nesting as restart reason.
724         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
725
726 2011-07-28  Torvald Riegel  <triegel@redhat.com>
727
728         * useraction.cc: Use vector instead of list to store actions.
729         Also support partial rollbacks for closed nesting.
730         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
731         * beginend.cc: Same.
732
733 2011-07-28  Torvald Riegel  <triegel@redhat.com>
734
735         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
736         closed_nesting flags, as well as a closed nesting alternative.
737         * method-serial.cc: Same.
738         (serial_dispatch): Renamed to serialirr_dispatch.
739         (GTM::dispatch_serialirr): Same.
740         (serial_dispatch_ul): Renamed to serial_dispatch.
741         (GTM::dispatch_serial): Same.
742
743 2011-07-28  Torvald Riegel  <triegel@redhat.com>
744
745         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
746
747 2011-07-28  Torvald Riegel  <triegel@redhat.com>
748
749         * aatree.h (aa_tree::remove): New.
750         (aa_tree::operator new): Add placement new.
751
752 2011-07-02  Torvald Riegel  <triegel@redhat.com>
753
754         * containers.h: New file.
755         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
756         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
757         * common.h: ... to here.
758         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
759         * local.cc: Same.
760
761 2011-06-30  Torvald Riegel  <triegel@redhat.com>
762
763         * libitm_i.h (STATE_ABORTING): Remove.
764         * beginend.cc (_ITM_abortTransaction): Same.
765         (GTM::gtm_transaction::trycommit_and_finalize): Same.
766         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
767         (_ITM_rollbackTransaction): Remove.
768         * beginend.cc: Same.
769         * libitm.map: Same.
770         * libitm.texi: Document these ABI changes.
771
772 2011-06-30  Torvald Riegel  <triegel@redhat.com>
773
774         * libitm.texi: New file.
775         * Makefile.am: Add libitm.texi.
776         * Makefile.in: Rebuild.
777
778 2011-06-30  Torvald Riegel  <triegel@redhat.com>
779
780         * libitm_i.h: Move parts to common.h and dispatch.h.
781         * common.h: New file.
782         * dispatch.h: New file, new dispatch class.
783         Rename GTM::abi_dispatch::lock_type to ls_modifier.
784         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
785         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
786         decision to retry.cc.
787         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
788         only.
789         (GTM::gtm_transaction::decide_begin_dispatch): Same.
790         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
791         logging.
792         * barrier.cc: Use new barriers definitions.
793         (abi_dispatch::memmove_overlap_check): New.
794         * config/x86/x86_sse.cc: Same.
795         * config/x86/x86_avx.cc: Same.
796         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
797         memcpy.cc.
798         * Makefile.in: Rebuild.
799         * method-readonly.cc: Remove.
800         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
801         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
802
803 2011-06-30  Torvald Riegel  <triegel@redhat.com>
804
805         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
806         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
807         * testsuite/libitm.c/dropref-2.c: Same.
808         * testsuite/libitm.c/dropref.c: Same.
809
810 2011-06-30  Torvald Riegel  <triegel@redhat.com>
811
812         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
813         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
814         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
815         * alloc_c.cc: Same.
816         * barrier.tpl: Same.
817         * beginend.c: Same.
818         * config/generic/tls.h: Same.
819         * config/x86/tls.h: Same.
820         * libitm_i.h: Same.
821         * memcpy.cc: Same.
822         * memset.cc: Same.
823         * method-readonly.cc: Same.
824         * method-serial.cc: Same.
825         * method-wbetl.cc: Same.
826         * retry.cc: Same.
827
828 2011-03-03  Richard Henderson  <rth@redhat.com>
829
830         * config/posix/rwlock.cc (write_upgrade): Add missing case.
831         From Patrik Marlier <patrick.marlier@unine.ch>.
832
833 2011-02-03  Richard Henderson  <rth@redhat.com>
834
835         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
836         * configure.ac: Use it.
837         * configure, config.h.in: Rebuild.
838         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
839         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
840         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
841         * libitm.map: Use wildcards to match size_t mangling.
842
843 2010-12-14  Richard Henderson  <rth@redhat.com>
844
845         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
846         blocks of TIDs per thread.
847         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
848         (setup_gtm_thr): Return the thread structure.
849         * config/x86/tls.h (setup_gtm_thr): Likewise.
850
851 2010-12-14  Richard Henderson  <rth@redhat.com>
852
853         * clone.cc (table_lock): Remove.
854         (find_clone): Don't take it.
855         (ExcludeTransaction): New helper class.
856         (_ITM_registerTMCloneTable): Use it.
857         (_ITM_deregisterTMCloneTable): Likewise.
858
859 2010-12-14  Richard Henderson  <rth@redhat.com>
860
861         * config/x86/tls.h: New file.
862
863 2010-07-15  Richard Henderson  <rth@redhat.com>
864
865         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
866         * Makefile.in: Rebuild.
867
868 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
869
870         * method-wbetl.cc (trydropreference): Fix source line.
871
872 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
873
874         * libitm.h: Add comment.
875         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
876
877 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
878
879         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
880         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
881         available, use pthread mutexes.
882         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
883         * config.h.in: Regenerate.
884         * configure: Regenerate.
885
886 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
887
888         * libitm.h (ITM_PURE): Define.
889         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
890
891 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
892
893         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
894         (validate): Add comment.
895         (trydropreference): New.
896         * method-readonly.cc (class readonly_dispatch): Add
897         trydropreference.
898         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
899         Call trydropreference().
900         * libitm.h (_ITM_dropReferences): Remove const attribute.
901         * method-serial.cc (class serial_dispatch): Add trydropreference.
902         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
903
904 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
905
906         * memcpy.cc (do_memcpy): Comment.
907
908 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
909
910         * barrier.tpl: Add comments throughout.
911
912 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
913
914         * method-wbetl.cc (struct w_entry): Add comments.
915         (trycommit): Same.
916         (rollback): Same.
917
918 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
919
920         * alloc_c.cc (_ITM_dropReferences): New.
921         * libitm.map (_ITM_dropReferences): Add.
922         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
923         * libitm_i.h (struct gtm_transaction): Declare
924         drop_references_allocations and drop_references_local.
925         * local.cc (rollback_local): Ignore memory when applicable.
926         (drop_references_local): New.
927
928 2010-06-23  Richard Henderson  <rth@redhat.com>
929
930         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
931         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
932         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
933         * config/alpha/target.h: Likewise.
934         * config/generic/tls.cc (gtm_mask_stack): Use it.
935
936 2010-06-23  Richard Henderson  <rth@redhat.com>
937
938         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
939         a mutex instead of trying a lock-free compare-and-swap on the list.
940         (gtm_cacheline_page::operator delete): Likewise.
941
942 2010-06-16  Richard Henderson  <rth@redhat.com>
943
944         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
945         that overlap the libitm stack.
946         * barrier.tpl: Mark incoming stack.
947         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
948         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
949         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
950         * memcpy.cc, memset.cc: Likewise.
951         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
952         * config/generic/tls.h (gtm_thread): Add stack_top member.
953         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
954         * libitm_i.h (gtm_mask_stack): Declare.
955         * config/generic/tls.cc: New file.
956         * Makefile.am (libitm_la_SOURCES): Add it.
957         (AM_CXXFLAGS): Turn off exceptions.
958         * Makefile.in: Rebuild.
959
960 2010-06-16  Richard Henderson  <rth@redhat.com>
961
962         * alloc.cc (struct gtm_alloc_action): Move definition ...
963         * libitm_i.h: ... here.
964         (class gtm_transaction): Declare new and delete.
965         * beginend.cc (alloc_tx): Reformulate as operator new.
966         (free_tx): Reformulate as operator delete.
967         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
968
969 2010-06-11  Richard Henderson  <rth@redhat.com>
970
971         * clone.cc (clone_entry_compare): Fix typo.
972         From Patrik Marlier <patrick.marlier@unine.ch>.
973
974 2010-05-13  Richard Henderson  <rth@redhat.com>
975
976         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
977         in extern "C".
978
979 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
980
981         * libitm_i.h (struct gtm_transaction): Remove
982         get_allocation_size.
983         (record_allocation): Remove size parameter.
984         * libitm.map (_ITM_realloc): Remove.
985         * alloc_c.cc (_ITM_realloc): Remove.
986         (_ITM_malloc): Remove size argument to record_allocation.
987         (_ITM_calloc): Same.
988         * alloc_cpp.cc (_ZGTtnwm): Same.
989         (_ZGTtnwmRKSt9nothrow_t): Same.
990         (_ZGTtnam): Same.
991         (_ZGTtnamRKSt9nothrow_t): Same.
992         * alloc.cc (struct gtm_alloc_action): Remove size.
993         (get_allocation_size): Remove.
994         (commit_allocations): Add comment.
995         (record_allocation): Remove size parameter.
996         (forget_allocation): Remove set of size.
997
998 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
999
1000         * Makefile.am (abi_version): New.
1001         (AM_CXXFLAGS): Pass abi_version.
1002         * Makefile.in: Regenerate.
1003         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1004
1005 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
1006
1007         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1008         _ITM_getTMCloneOrIrrevokable.
1009         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1010         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1011
1012 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
1013
1014         * configure.ac: Remove Linux futex support.
1015         * configure.tgt (config_path): Same.
1016         * Makefile.am: Same.
1017         * config/linux: Remove entire directory.
1018         * configure: Rebuild.
1019         * Makefile.in: Rebuild.
1020         * testsuite/Makefile.in: Rebuild.
1021
1022 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
1023
1024         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1025         switching to serial mode.
1026         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1027
1028 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
1029
1030         * configure.tgt: Add emacs -*- tags.
1031         * barrier.tpl: Same.
1032
1033 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
1034
1035         * Makefile.am: Rename serial.cc to method-serial.cc.
1036         * Makefile.in: Regenerate with automake 1.11.1.
1037         * testsuite/Makefile.in: Same.
1038         * aclocal.m4: Regenerate with aclocal 1.11.1.
1039         * method-serial.cc: Rename from serial.cc.
1040         * libitm_i.h (struct gtm_transaction): Update comment on
1041         serialirr_mode.
1042
1043 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
1044
1045         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1046         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1047
1048 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
1049
1050         * configure: Rebuild.
1051
1052 2009-11-12  Richard Henderson  <rth@redhat.com>
1053
1054         * Rewrite everything in C++.
1055
1056 2009-11-03  Richard Henderson  <rth@redhat.com>
1057
1058         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1059         * Makefile.am (libitm_la_SOURCES): Add them.
1060         * configure.ac (ARCH_X86): New conditional.
1061         * Makefile.in, configure: Rebuild.
1062         * configure.tgt: Set up ARCH; do cflags setup at the same time.
1063         Move futex setup into "other system configury" case.
1064         * local.c (rollback_local): Merge into ...
1065         (GTM_rollback_local): ... here.
1066         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1067         (_ITM_LB): Define as an alias to GTM_LB.
1068
1069 2009-11-03  Richard Henderson  <rth@redhat.com>
1070
1071         * method-readonly.c: New file.
1072         * Makefile.am (libitm_la_SOURCES): Add it.
1073         * Makefile.in: Rebuild.
1074         * beginend.c (gtm_stmlock_array, gtm_clock): New.
1075         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1076         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1077         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1078         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1079         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1080         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1081         gtm_get_clock, gtm_inc_clock): New.
1082         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1083         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1084         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1085         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1086         replace uses with new libitm_i.h symbols.
1087         (dispatch_wbetl): Rename from wbetl_dispatch.
1088         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1089         away from dispatch_readonly; abort if the beginTransaction call
1090         asserted that the transaction was readonly.
1091
1092 2009-11-03  Richard Henderson  <rth@redhat.com>
1093
1094         * memset.c: New file.
1095         * Makefile.am (libitm_la_SOURCES): Add it.
1096         * Makefile.in: Rebuild.
1097         * testsuite/libitm.c/memset-1.c: New.
1098
1099 2009-11-03  Richard Henderson  <rth@redhat.com>
1100
1101         * dispatch.c: Remove file.
1102         * useraction.c (struct gtm_user_action): Move from libitm.h.
1103         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1104         (serial_memset, serial_memmove, serial_memcpy): Remove.
1105         (serial_W*, serial_R*): Remove.
1106         (serial_dispatch): Update to match.
1107         * configure.ac: Move Werror down below configure checks.  Don't
1108         check for sys/loadavg.h, do check for malloc.h.  Don't check for
1109         getloadavg and clock_gettime; do check for memalign, posix_memalign.
1110         Use GCC_AC_FUNC_MMAP_BLACKLIST
1111         * libitm.h: Split out all internal items to...
1112         * libitm_i.h: ... here.  New file.
1113         * copymask.c: New file.
1114         * local.c (struct gtm_local_undo): Move from libitm.h.
1115         (GTM_alloc_local): Rename from alloc_local; export.
1116         * memcpy.c: New file.
1117         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1118         * config/posix/page.c: New file.
1119         * config/posix/target_tls.h: Remove file.
1120         * barrier.c: New file.
1121         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1122         copymask.c, page.c.
1123         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1124         * method-wbetl.c: Rewrite for new cacheline methods.
1125         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1126
1127         * config/alpha/sjlj.S: Fix typo.
1128         * config/alpha/target_i.h: Copy functions from alpha/target.h.
1129         * config/alpha/copymask.c: New file.
1130         * config/alpha/target.h (CACHELINE_SIZE): New.
1131         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1132
1133         * config/x86/target_i.h: Copy functions from x86/target.h.
1134         * config/x86/copymask.c: New file.
1135         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1136         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1137         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1138         * config/x86/target_tls.h: Move contents to target_i.h.
1139
1140         * testsuite/libitm.c/clone-1.c: Include libitm.h.
1141         * testsuite/libitm.c/memcpy-1.c: New.
1142
1143 2009-10-22  Richard Henderson  <rth@redhat.com>
1144
1145         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1146         (AM_CCASFLAGS): New.
1147         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
1148         saving/restoring _AC_ARG_VAR_PRECIOUS.
1149         * Makefile.in, aclocal.m4, config.h.in, configure,
1150         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1151
1152 2009-10-22  Richard Henderson  <rth@redhat.com>
1153
1154         * testsuite/*: Update for new compiler syntax.
1155
1156 2009-10-21  Richard Henderson  <rth@redhat.com>
1157
1158         * libitm.h (_ITM_abortReason): Add outerAbort.
1159
1160 2009-08-03  Richard Henderson  <rth@redhat.com>
1161
1162         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1163         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1164         * method-wbetl.c (struct w_entry): Remove mask.
1165         (wbetl_write, wbetl_load): Return pointer to word containing the data;
1166         adjust all callers.
1167
1168 2009-07-22  Richard Henderson  <rth@redhat.com>
1169
1170         * eh_cpp.c: New file.
1171         * Makefile.am (libitm_la_SOURCES): Add it.
1172         * Makefile.in: Rebuild.
1173         * beginend.c (GTM_rollback_transaction): Undo exception state.
1174         (GTM_trycommit_transaction): Mark inline.
1175         (GTM_trycommit_and_finalize_transaction): Split out from ...
1176         (_ITM_commitTransaction): ... here.
1177         (_ITM_commitTransactionEH): New function.
1178         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1179         cxa_unthrown, eh_in_flight; reorder.
1180
1181         * testsuite/libitm.c++/c++.exp: New.
1182         * testsuite/libitm.c++/eh-1.C: New.
1183
1184         * aatree.c (aa_free): Remove REGPARM.
1185         * aatree.h: Remove all REGPARM.
1186
1187 2009-07-18  Richard Henderson  <rth@redhat.com>
1188
1189         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1190         * Makefile.am (libitm_la_SOURCES): Add them.
1191         * Makefile.in: Rebuild.
1192         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1193         (GTM_trycommit_transaction): Likewise.
1194         * libitm.h: Include aatree.h
1195         (struct gtm_alloc_action): New.
1196         (struct gtm_transaction): Add alloc_actions.
1197         (GTM_record_allocation, GTM_forget_allocation): Declare.
1198         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1199         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1200         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1201         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1202         _ZGTtdaPvRKSt9nothrow_t): Export.
1203
1204 2009-07-18  Richard Henderson  <rth@redhat.com>
1205
1206         * target_tls.h: Move ...
1207         * config/posix/target_tls.h: ... here.
1208
1209 2009-07-07  Richard Henderson  <rth@redhat.com>
1210
1211         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1212
1213 2009-07-07  Richard Henderson  <rth@redhat.com>
1214
1215         * Update to GPL3.
1216
1217 2009-07-07  Richard Henderson  <rth@redhat.com>
1218
1219         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1220         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1221
1222         * configure.tgt: Don't use -ftls-model for x86 linux.
1223         * libitm.h: Include target.h after standard includes.
1224         (_gtm_thr): Rename from gtm_thr.
1225         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1226         (gtm_disp, set_gtm_disp): New.
1227         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1228         retry.c, serial.c, useraction.c: Use accessor functions throughout.
1229         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1230
1231 2009-07-07  Richard Henderson  <rth@redhat.com>
1232
1233         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
1234
1235 2009-07-06  Richard Henderson  <rth@redhat.com>
1236
1237         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1238         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1239         (_ITM_beginTransaction): Take variadic arguments.
1240         (_ITM_registerThrownObject): Declare.
1241         * beginend.c, serial.c: Update.
1242         * libitm.map: Add _ITM_registerThrownObject.
1243
1244 2009-01-28  Richard Henderson  <rth@redhat.com>
1245
1246         * Makefile.am (libitm_la_SOURCES): Add clone.c.
1247         * Makefile.in: Rebuild.
1248         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1249         (GTM_restart_transaction): Fix uninstrumented code check.
1250         * retry.c (GTM_decide_retry_strategy): Add serial check.
1251         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
1252         automatically go irrevokable when in serial mode.
1253         * clone.c: New file.
1254         * libitm.h, libitm.map: Update.
1255
1256 2009-01-27  Richard Henderson  <rth@redhat.com>
1257
1258         * Makefile.am (LTCCASCOMPILE): Define.
1259         (libitm_la_SOURCES): Add methid-wbetl.c.
1260         * testsuite/Makefile.am: New
1261         * configure.ac: Add testsuite/Makefile.
1262         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1263         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1264         (_ITM_abortTransaction): Finalize implementation method; pass
1265         transaction properties to longjmp.
1266         (GTM_restart_transaction): Split out from ...
1267         (_ITM_commitTransaction): ... here.
1268         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1269         Move to config/x86/target.h.
1270         * config/linux/alpha/futex_bits.h: New.
1271         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1272         * config/x86/target.h: Disable target types for 32-bit.
1273         * config/alpha/sjlj.S, config/alpha/target.h: New.
1274         * libitm.h (struct gtm_dispatch): Add init, fini.
1275         (enum restart_reason): New.
1276         (struct gtm_transaction): Add method and restarts.
1277         * retry.c (GTM_decide_retry_strategy): Implement.
1278         * serial.c (serial_init, serial_fini): New.
1279         (GTM_serialmode): Finialize outgoing method.
1280         * method-wbetl.c: New.
1281
1282 2008-12-09  Richard Henderson  <rth@redhat.com>
1283
1284         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1285         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1286         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1287         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1288         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1289         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1290         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1291         * serial.c (serial_R##T, serial_W##T): Likewise.
1292
1293 2008-11-21  Richard Henderson  <rth@redhat.com>
1294
1295         * Initial commit.