OSDN Git Service

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