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