OSDN Git Service

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