OSDN Git Service

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