OSDN Git Service

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