* ipa-inline-analysis.c (eliminated_by_inlining_prob): Cleanup.
[official-gcc.git] / libitm / ChangeLog
blob8f55f4eb3279f5cf24c95a7db13c4238e3909921
1 2012-10-24  Torvald Riegel  <triegel@redhat.com>
3         * libitm.texi: Clarify ABI requirements for data-logging functions.
5 2012-10-24  Torvald Riegel  <triegel@redhat.com>
7         * retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
8         it requires serial mode instead of assuming that for certain
9         dispatchs.
10         * dispatch.h (abi_dispatch::requires_serial): New.
11         (abi_dispatch::abi_dispatch): Adapt.
12         * method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
13         * method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
14         * method-serial.cc (serialirr_dispatch::serialirr_dispatch,
15         serial_dispatch::serial_dispatch,
16         serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
18 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
20         * config/x86/target.h (struct gtm_jmpbuf): Merge x86_64
21         and ia32 declarations some more.
22         * config/x86/sjlj.S (_ITM_beginTransaction): Move ret to common code.
24 2012-09-20  Jakub Jelinek  <jakub@redhat.com>
26         PR other/43620
27         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
28         * configure: Regenerate.
29         * Makefile.in: Regenerate.
31 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
33         * configure: Regenerated.
35 2012-07-31  Uros Bizjak  <ubizjak@gmail.com>
37         * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.
39 2012-05-21  Patrick Marlier  <patrick.marlier@gmail.com>
41         * eh_cpp.cc: Fix __cxa_end_catch declaration.
43 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
45         * configure: Regenerated.
47 2012-04-04  H.J. Lu  <hongjiu.lu@intel.com>
49         PR libitm/52854
50         * config/x86/target.h (gtm_jmpbuf): Replace long with long long
51         for x86-64.
53 2012-04-03  Tristan Gingold  <gingold@adacore.com>
55         * configure: Regenerate.
57 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
59         PR bootstrap/52812
60         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
62 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
64         * testsuite/lib/libitm.exp: load fortran-modules.exp
66 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
68         * configure.tgt (*-*-irix6*): Remove.
70 2012-03-13  Torvald Riegel  <triegel@redhat.com>
72         PR libitm/52526
73         * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
74         wake-up.
76 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
78         * configure.tgt (*-*-osf*): Remove.
79         * configure: Regenerate.
81 2012-03-05  Torvald Riegel  <triegel@redhat.com>
83         * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
84         memtransfer/memset if size isn't larger than zero.
86 2012-03-02  Torvald Riegel  <triegel@redhat.com>
88         * libitm.texi: Link to specification and add a usage example.
90 2012-02-24  Torvald Riegel  <triegel@redhat.com>
92         * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
93         default dispatch for more than 1 thread to ml_wt.
95 2012-02-20  Torvald Riegel  <triegel@redhat.com>
97         * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
99 2012-02-20  Torvald Riegel  <triegel@redhat.com>
101         * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
103 2012-02-20  Torvald Riegel  <triegel@redhat.com>
105         * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
106         serial mode corner cases made obsolete by prior gtm_rwlock changes.
107         (gl_wt_dispatch.rollback): Same.
109 2012-02-20  Torvald Riegel  <triegel@redhat.com>
111         * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
113 2012-02-20  Torvald Riegel  <triegel@redhat.com>
115         * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
116         for RfW src.  Optimize number of calls to gtm_thr.
118 2012-02-20  Torvald Riegel  <triegel@redhat.com>
120         * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
121         acquisition to ...
122         * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
123         (default_dispatch): Make atomic.
124         (GTM::gtm_thread::set_default_dispatch): Access atomically.
125         (GTM::gtm_thread::decide_retry_strategy): Access atomically and
126         use decide_begin_dispatch() if default_dispatch might have changed.
127         (GTM::gtm_thread::number_of_threads_changed): Initialize
128         default_dispatch here.
130 2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
131             Patrick Marlier  <patrick.marlier@gmail.com>
133         PR libitm/52220
134         * alloc_cpp.cc: No dummy definitions for darwin.
135         * eh_cpp.cc: Likewise.
137 2012-02-14  Richard Henderson  <rth@redhat.com>
139         * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
141 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
143         * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
145 2012-02-14  Torvald Riegel  <triegel@redhat.com>
147         * libitm_i.h (GTM::gtm_rwlog_entry): New.
148         (GTM::gtm_thread): Add read and write logs.
149         (GTM::dispatch_ml_wt): Declare.
150         * retry.cc (parse_default_method): Support ml_wt.
151         * method-ml.cc: New file.
152         * Makefile.am: Add method-ml.cc.
153         * Makefile.in: Regenerate.
155 2012-02-14  Torvald Riegel  <triegel@redhat.com>
157         * dispatch.h (GTM::abi_dispatch::supports): New.
158         (GTM::method_group::reinit): New.
159         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
160         (GTM::gtm_thread::number_of_threads_changed): Check that the method
161         supports the current situation.
163 2012-02-14  Torvald Riegel  <triegel@redhat.com>
165         * util.cc (GTM::xcalloc): New.
166         * common.h (GTM::xcalloc): Declare.
168 2012-02-14  Eric Botcazou  <ebotcazou@adacore.com>
170         * config/sparc/target.h (cpu_relax): Read from CC register.
171         * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
173 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
175         * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
177 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
179         * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
180         * config/sparc/cacheline.h: New file.
181         * config/sparc/target.h: Likewise.
182         * config/sparc/sjlj.S: Likewise.
183         * config/linux/sparc/futex_bits.h: Likewise.
185 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
187         * configure.ac (link_itm): Fix comment.
188         * configure: Regenerate.
189         * testsuite/lib/libitm.exp: Do not pass -litm for the link.
191 2012-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
193         PR libitm/51822
194         * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
195         Correct libgomp references.
197 2012-01-24  Torvald Riegel  <triegel@redhat.com>
199         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
200         wake-up.
202 2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
204         * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
205         end of structure.
206         * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
207         offset values.  Do not copy return address.  Decrement stack
208         by 56 bytes only.
209         (GTM_longjump) [__x86_64__]: Update offset values.
211 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
213         PR libitm/51830
214         * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
215         the first function argument to %eax.
217 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
219         * libitm.h (_ITM_getThreadnum): Remove.
220         * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
222 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
224         * clearcap.map: New file.
225         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
226         * configure.ac: Call it.
227         Clear HWCAP_LDFLAGS if defaulting to -mavx.
228         * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
229         * configure: Regenerate.
230         * Makefile.in: Regenerate.
231         * testsuite/Makefile.in: Regenerate.
233 2012-01-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
235         PR libitm/51173
236         * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
237         include, exclude options.
239 2012-01-14  Torvald Riegel  <triegel@redhat.com>
241         * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
242         rolling back.
243         * containers.h (GTM::vector::set_size): New.
245 2012-01-14  Torvald Riegel  <triegel@redhat.com>
247         PR libitm/51855
248         * config/generic/tls.h (GTM::mask_stack_top): New.
249         (GTM::mask_stack_bottom): Declare.
250         * config/generic/tls.c (GTM::mask_stack_bottom): New.
251         * local.cc (gtm_undolog::rollback): Filter out any updates that
252         overlap the libitm stack.  Add current transaction as parameter.
253         * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
254         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
255         * testsuite/libitm.c/stackundo.c: New test.
257 2012-01-10  Richard Henderson  <rth@redhat.com>
259         * libitm_i.h (_Unwind_DeleteException): Declare weak.
260         * eh_cpp.cc (_Unwind_DeleteException): Define for
261         !HAVE_ELF_STYLE_WEAKREF.
263 2012-01-08  Torvald Riegel  <triegel@redhat.com>
265         * local.cc (GTM_LB): Use GTM::gtm_undolog.
266         (GTM::gtm_thread::drop_references_undolog): Remove.
267         (GTM::gtm_thread::commit_undolog,
268         GTM::gtm_thread::rollback_undolog): Move to ...
269         * libitm_i.h (GTM::gtm_undolog): ...here. New.
270         (GTM::gtm_undolog_entry): Remove.
271         (GTM::gtm_thread): Adapt.
272         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
273         (GTM::gtm_thread::trycommit): Adapt.
274         * method-serial.cc (serial_dispatch::log): Adapt.
275         * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
276         (gl_wt_dispatch::store): Fix likely/unlikely.
277         * containers.h (GTM::vector::resize): Add additional_capacity
278         parameter and handle it.
279         (GTM::vector::resize_noinline): New/adapt.
280         (GTM::vector::push): New.
282 2012-01-06  Richard Henderson  <rth@redhat.com>
284         * configure.tgt: Support powerpc-linux and powerpc-darwin.
285         * config/linux/powerpc/futex_bits.h: New file.
286         * config/powerpc/cacheline.h: New file.
287         * config/powerpc/sjlj.S: New file.
288         * config/powerpc/target.h: New file.
289         * config/generic/asmcfi.h (cfi_offset): New.
290         (cfi_restore, cfi_undefined): New.
292 2012-01-05  Aldy Hernandez  <aldyh@redhat.com>
294         PR other/51171
295         * testsuite/libitm.c/reentrant.c: Remove xfail.
296         (thread): Pass x to pure().
297         From Patrik Marlier <patrick.marlier@gmail.com>.
299 2011-12-24  Torvald Riegel  <triegel@redhat.com>
301         * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
302         privatization safety if already in serial mode.
304 2011-12-24  Torvald Riegel  <triegel@redhat.com>
306         * beginend.cc (GTM::gtm_thread::restart): Add and handle
307         finish_serial_upgrade parameter.
308         * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
309         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
310         Don't unset reader flag.
311         (GTM::gtm_rwlock::write_upgrade_finish): New.
312         * config/posix/rwlock.cc: Same.
313         * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
314         Declare.
315         * config/posix/rwlock.h: Same.
316         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
317         flag after commit or after rollback when restarting.
319 2011-12-24  Torvald Riegel  <triegel@redhat.com>
321         * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
322         (GTM::gtm_thread::try_commit): Changed memory order.
323         * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
324         as parameter.
325         * config/linux/x86/futex_bits.h (sys_futex0): Same.
326         * config/linux/sh/futex_bits.h (sys_futex0): Same.
327         * config/linux/futex_bits.h (sys_futex0): Same.
328         * config/linux/futex.cc (futex_wait, futex_wake): Same.
329         * config/linux/futex.h (futex_wait, futex_wake): Same.
330         * config/linux/rwlock.h (gtm_rwlock::writers,
331         gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
332         ints.
333         * config/linux/rwlock.cc (gtm_rwlock::read_lock,
334         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
335         gtm_rwlock::write_unlock): Fix memory orders and fences.
336         * config/posix/rwlock.cc (gtm_rwlock::read_lock,
337         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
338         gtm_rwlock::write_unlock): Same.
339         * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
340         * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
341         gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
342         Add comments.
343         (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
344         gl_wt_dispatch::load, gl_wt_dispatch::store,
345         gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
346         orders and fences.  Add comments.
348 2011-12-21  Jakub Jelinek  <jakub@redhat.com>
350         * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
351         * Makefile.in: Regenerated.
353 2011-12-17  Kaz Kojima  <kkojima@gcc.gnu.org>
355         * configure.tgt: Add sh* case.
356         * config/sh/target.h: New file.
357         * config/sh/sjlj.S: New file.
358         * config/linux/sh/futex_bits.h: New file.
360 2011-12-14  Richard Henderson  <rth@redhat.com>
362         * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
363         * config/arm/sjlj.S, config/arm/target.h: New files.
364         * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
365         (cfi_rel_offset): New.
366         * config/linux/futex_bits.h: New file.
367         * config/linux/futex.cc: Include futex_bits.h here...
368         * config/linux/futex.h: ... not here.
369         * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
370         * configure.ac (ARCH_AM): New conditional.
371         * Makefile.in, configure: Rebuild.
372         * configure.tgt: Handle ARM.
374 2011-12-13  Richard Henderson  <rth@redhat.com>
376         * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
377         signed/unsigned comparison werror.
379         * local_atomic: New file.
380         * libitm_i.h: Include it.
381         (gtm_thread::shared_state): Use atomic template.
382         * beginend.cc (GTM::gtm_clock): Use atomic template.
383         (global_tid): Use atomic template if 64-bit atomics available.
384         (gtm_thread::gtm_thread): Update shared_state access.
385         (gtm_thread::trycommit): Likewise.
386         (choose_code_path): Update global_tid access.
387         * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
388         * stmlock.h (GTM::gtm_clock): Use atomic template.
389         (gtm_get_clock, gtm_inc_clock): Update accesses.
390         * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
391         redundant __sync_synchronize after atomic shared_state access.
392         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
393         (gtm_rwlock::write_lock_generic): Likewise.
394         (gtm_rwlock::read_unlock): Likewise.
395         * config/alpha/target.h (atomic_read_barrier): Remove.
396         (atomic_write_barrier): Remove.
397         * config/x86/target.h (atomic_read_barrier): Remove.
398         (atomic_write_barrier): Remove.
400 2011-11-30  Richard Henderson  <rth@redhat.com>
402         * libitm_i.h (GTM_longjmp): Swap first and second arguments.
403         * beginend.c (_ITM_abortTransaction): Update to match.
404         (GTM::gtm_thread::restart): Likewise.
405         * config/alpha/sjlj.S (GTM_longjmp): Likewise.
406         * config/x86/sjlj.S (GTM_longjmp): Likewise.
408 2011-11-23  Iain Sandoe  <iains@gcc.gnu.org>
410         * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
411         * Makefile.in: Regenerate.
413 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
415         * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
416         * alloc_cpp.cc: Generate dummy functions if we don't
417         HAVE_ELF_STYLE_WEAKREF.
418         * eh_cpp.cc: Likewise.
419         * configure: Regenerate.
420         * aclocal.m4:  Likewise.
421         * config.h.in: Likewise.
422         * Makefile.in: Likewise.
423         * testsuite/Makefile.in: Likewise.
425 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
427         * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
428         __USER_LABEL_PREFIX__ for targets that use it.
429         (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
430         (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
431         in portability to non-elf targets.
432         (GTM_longjmp): Likewise.
433         * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
434         where required.
436 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
438         * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
439         * testsuite/libitm.c/memset-1.c: Likewise.
441 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
443         * configure: Regenerate.
445 2011-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
447         * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
448         (LIBITM_ENABLE_SYMVERS): Handle sun style.
449         * Makefile.am: Handle sun style versioning.
450         (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
451         * configure: Regenerate.
452         * Makefile.in: Regenerate.
454 2011-11-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
456         * config/generic/asmcfi.h: Fix comment.
457         * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
458         sequence without .hidden support, error for non-ELF targets.
459         (GTM_longjmp) [__ELF__]: Only use .hidden if
460         HAVE_ATTRIBUTE_VISIBILITY.
462 2011-11-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
464         * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
465         _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
466         Dummy functions.
467         * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
468         __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
470 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
472         PR bootstrap/51098
473         * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
474         * configure: Regenerate.
476 2011-11-14  H.J. Lu  <hongjiu.lu@intel.com>
478         * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
480 2011-11-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
482         * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
483         .hidden.
484         (.note.GNU-stack): Only use if __linux__.
485         * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
486         * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
487         * testsuite/libitm.c/reentrant.c: Likewise.
488         * testsuite/libitm.c/simple-2.c: Likewise.
489         * testsuite/libitm.c/txrelease.c: Likewise.
490         * testsuite/libitm.c++/static_ctor.C: Likewise.
492 2011-11-10  Richard Henderson  <rth@redhat.com>
494         * config/x86/x86_avx.cc: Remove #undef __AVX__ hack.  Tidy comments.
495         * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
496         * configure.ac (ARCH_X86_AVX): New conditional.
497         * Makefile.in, configure: Rebuild.
499 2011-11-09  Richard Henderson  <rth@redhat.com>
501         * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
502         * configure.ac: Use it.
503         * config.h.in, configure: Rebuild.
504         * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
506 2011-11-09  Richard Henderson  <rth@redhat.com>
508         * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
509         * config/alpha/unaligned.h: Remove file.
510         * config/generic/unaligned.h: Remove file.
511         * config/x86/unaligned.h: Remove file.
512         * config/generic/cachepage.h: Remove file.
513         * config/posix/cachepage.cc: Remove file.
514         * config/generic/cacheline.cc: Remove file.
515         * config/x86/cacheline.cc: Remove file.
516         * config/generic/cacheline.h (gtm_cacheline): Remove the
517         store_mask, copy_mask, copy_mask_wb methods.
518         * config/x86/cacheline.h: Likewise.
519         * config/alpha/cacheline.h: Fall back to generic after setting size.
520         * config/generic/tls.cc (gtm_mask_stack): Remove.
521         * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
522         (GTM_vpalignr_table): Remove.
523         * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
524         (GTM_pshift_table): Remove.
525         * config/libitm_i.h: Don't include cachepage.h.
526         * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
527         * Makefile.in, testsuite/Makefile.in: Rebuild.
529 2011-11-09  Richard Henderson  <rth@redhat.com>
531         * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
532         to emit branch prediction hint.
534         * config/x86/sjlj.S: Protect elf directives with __ELF__.
535         Protect .note.GNU-stack with __linux__.
537         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
538         * configure, aclocal.m4, config.h.in: Rebuild.
539         * config/generic/asmcfi.h: New file.
540         * config/x86/sjlj.S: Use it.
542 2011-11-08  Richard Henderson  <rth@redhat.com>
544         * local.cc (_ITM_LB): Use a normal call, not a function alias.
546 2011-11-08  Richard Henderson  <rth@redhat.com>
548         * configure.tgt: Test correct directory for supported cpus.
550         * configure.ac: Exit if unsupported.
551         * configure: Rebuild.
552         * configure.tgt: Delete boilerplate from libgomp for unsupported
553         targets.  Set UNSUPPORTED for unsupported targets.
555 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
557         * configure.tgt: Handle i386 like i[456]86.
558         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
559         take address.
560         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
561         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
563 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
565         * method-wbetl.cc: Update copyright notice.
566         * aatree.cc: Same.
567         * util.cc: Same.
568         * libitm.h: Same.
569         * memset.cc: Same.
570         * eh_cpp.cc: Same.
571         * barrier.tpl: Same.
572         * useraction.cc: Same.
573         * stmlock.h: Same.
574         * memcpy.cc: Same.
575         * common.h: Same.
576         * config/generic/tls.cc: Same.
577         * config/generic/cacheline.h: Same.
578         * config/generic/cachepage.h: Same.
579         * config/generic/cacheline.cc: Same.
580         * config/generic/unaligned.h: Same.
581         * config/x86/cacheline.h: Same.
582         * config/x86/cacheline.cc: Same.
583         * config/x86/unaligned.h: Same.
584         * config/alpha/cacheline.h: Same.
585         * config/alpha/unaligned.h: Same.
586         * config/alpha/sjlj.S: Same.
587         * config/posix/cachepage.cc: Same.
588         * config/linux/futex.h: Same.
589         * config/linux/alpha/futex_bits.h: Same.
591 2011-11-04  Torvald Riegel  <triegel@redhat.com>
593         * libitm.texi: No cover text and invariant sections.
595 2011-11-03  Richard Henderson  <rth@redhat.com>
597         * local_type_traits: New file.
598         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
600 2011-11-03  Richard Henderson  <rth@redhat.com>
602         * configure.ac: Don't test for gfortran.
603         * configure: Rebuild.
605         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
606         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
608 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
610         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
611         * testsuite/libitm.c/memset-1.c: Same.
612         * testsuite/libitm.c/c.exp: Same.
613         * testsuite/lib/libitm-dg.exp: Same.
614         * testsuite/lib/libitm.exp: Same.
615         * testsuite/libitm.c++/c++.exp: Same.
617 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
619         * testsuite/config/default.exp: Update copyright date.
620         * configure.ac: Add copyright info.
621         * configure.tgt: Same.
623 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
625         * testsuite/libitm.c/reentrant.c: XFAIL.
626         * testsuite/libitm.c++/static_ctor.C: XFAIL.
628 2011-10-29  Torvald Riegel  <triegel@redhat.com>
630         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
631         handle aborts.
632         (_ITM_abortTransaction): Handle aborts of outer transactions.
633         * libitm_i.h: Same.
634         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
635         * libitm.texi: Document aborts of outer transactions.
636         * testsuite/libitm.c/cancel.c: New file.
638 2011-10-19  Torvald Riegel  <triegel@redhat.com>
640         * testsuite/*: Change __transaction to __transaction_atomic or
641         __transaction_relaxed.
643 2011-10-19  Torvald Riegel  <triegel@redhat.com>
645         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
646         (gtm_thr): Same.
648 2011-10-19  Torvald Riegel  <triegel@redhat.com>
650         * libitm_i.h: Add gl_wt dispatch.
651         * retry.cc (parse_default_method): Same.
652         * method-gl.cc: New file.
653         * Makefile.am: Use method-gl.cc.
654         * Makefile.in: Rebuild.
656 2011-10-19  Torvald Riegel  <triegel@redhat.com>
658         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
659         safety if requested by a TM method.
660         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
661         privatization safety.
662         * method-serial.cc: Same.
664 2011-10-19  Torvald Riegel  <triegel@redhat.com>
666         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
667         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
668         undolog-related member functions from *_local to *_undolog.
669         * local.cc (gtm_thread::commit_undolog): Same.
670         * beginend.cc (GTM::gtm_thread::trycommit): Same.
671         (GTM::gtm_thread::rollback): Roll back undolog before
672         dispatch-specific rollback.
674 2011-10-19  Torvald Riegel  <triegel@redhat.com>
676         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
677         re-initialization of the current method group.
678         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
680 2011-10-19  Torvald Riegel  <triegel@redhat.com>
682         * alloc.cc (commit_allocations_2): Do not free transaction-local
683         memory when committing a nested transaction.
685 2011-10-19  Torvald Riegel  <triegel@redhat.com>
687         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
688         serial-irrevocable dispatch, not serial.
690 2011-10-19  Torvald Riegel  <triegel@redhat.com>
692         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
693         declarations.
694         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
695         * method-serial.cc: Implement begin_or_restart().
696         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
697         dispatch-specific begin_or_restart().
698         (GTM::gtm_thread::restart): Same.
700 2011-08-23  Torvald Riegel  <triegel@redhat.com>
702         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
703         restarting without switching to serial mode.
704         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
705         transaction state. Choose closed-nesting alternative if available.
706         (GTM::gtm_thread::set_default_dispatch): New.
707         (parse_default_method): New.
708         (GTM::gtm_thread::number_of_threads_changed): New.
709         * method-serial.cc (GTM::serial_mg): New method group class.
710         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
711         fini.
712         (GTM::serial_dispatch): Same.
713         (GTM::serialirr_onwrite_dispatch): Same.
714         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
715         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
716         registered threads.
717         (GTM::gtm_thread::gtm_thread): Same.
718         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
719         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
720         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
721         choose dispatch but set state according to dispatch here.
722         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
723         (GTM::method_group): New class.
724         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
725         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
726         * libitm.texi: Document TM methods, method groups, method life cycle.
727         Rename method sets to method groups.
729 2011-08-23  Torvald Riegel  <triegel@redhat.com>
731         * config/x86/tls.h: Moved to ...
732         * config/linux/x86/tls.h: ... here.
734 2011-08-23  Torvald Riegel  <triegel@redhat.com>
736         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
737         Add X32 support.
738         * config/x86/sjlj.S: Same.
740 2011-08-19  Torvald Riegel  <triegel@redhat.com>
742         * config/linux/rwlock.h: New file.
743         * config/linux/rwlock.c: New file.
744         * configure.ac: Reenable futex support (undo SVN rev 157758).
745         * Makefile.am: Same.
746         * configure.tgt: Same.
747         * config/linux/alpha/futex_bits.h: Same.
748         * config/linux/futex.h: Same. Return number of woken processes.
749         * config/linux/futex.cc: Same.
750         (futex_wait): Remove spinning.
751         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
752         Use __x86_64__ instead of __LP64__.
753         * aclocal.m4: Include generic futex checks.
754         * configure: Rebuild.
755         * Makefile.in: Rebuild.
756         * testsuite/Makefile.in: Rebuild.
757         * beginend.cc: Include pthread.h.
758         * config/posix/cachepage.cc: Same.
760 2011-08-12  Torvald Riegel  <triegel@redhat.com>
762         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
763         (abi_disp, set_abi_disp): Move to tx's TLS slot.
764         (set_gtm_thr): New.
765         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
766         (set_gtm_thr): New.
767         (GTM::gtm_thread::thread_num): Removed.
768         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
769         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
770         tx-to-thread renaming.
771         * beginend.cc: Adapted to tx-to-thread renaming.
772         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
773         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
774         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
775         gtm_transaction to gtm_thread.
776         (_ITM_getThreadnum): Removed. Not supported anymore.
777         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
778         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
779         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
780         gtm_tx-to-gtm_thr renaming if necessary.
781         * eh_cpp.cc: Same.
782         * local.cc: Same.
783         * retry.cc: Same.
784         * clone.cc: Same.
785         * alloc.cc: Same.
786         * alloc_c.cc: Same.
787         * alloc_cpp.cc: Same.
788         * method-serial.cc: Same.
789         * config/generic/tls.cc: Same.
790         * config/posix/rwlock.h (gtm_rwlock): Same.
791         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
793 2011-08-12  Torvald Riegel  <triegel@redhat.com>
795         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
796         implementation.
797         (gtm_rwlock::read_unlock): Same.
798         (gtm_rwlock::write_lock_generic): New. Generalized from ...
799         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
800         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
801         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
802         w_upgrade. Replaced by per-transaction flags (in shared_state).
803         Added c_confirmed_writers.
804         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
805         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
806         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
807         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
808         * beginend.cc (GTM::gtm_transaction::begin_transaction,
809         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
810         * libitm.texi: Document locking conventions and implementations in
811         libitm.
813 2011-08-12  Torvald Riegel  <triegel@redhat.com>
815         * libitm_i.h (next_tx): Add list of all threads' transaction.
816         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
817         transaction with list of transactions and ...
818         (thread_exit_handler): ... deregister here.
819         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
820         * config/x86/target.h: Same.
822 2011-08-12  Torvald Riegel  <triegel@redhat.com>
824         * testsuite/libitm.c++/static_ctor.C: New file.
826 2011-08-12  Torvald Riegel  <triegel@redhat.com>
828         * testsuite/libitm.c/reentrant.c: New file.
830 2011-08-12  Torvald Riegel  <triegel@redhat.com>
832         * config/generic/tls.h: Remove the free list for transactions and ...
833         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
834         (GTM::gtm_transaction::operator delete): ... and release here.
835         (thread_exit_handler): New. Delete tx when thread terminates.
836         (thread_exit_init): New.
837         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
838         * testsuite/libitm.c/txrelease.c: New file.
840 2011-08-12  Torvald Riegel  <triegel@redhat.com>
842         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
843         * testsuite/libitm.c/notx.c: New file.
845 2011-08-12  Torvald Riegel  <triegel@redhat.com>
847         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
848         * libitm_i.h (local_tid): ... to here.
849         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
850         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
852 2011-08-12  Torvald Riegel  <triegel@redhat.com>
854         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
855         serialirr_onwrite_dispatch as new default for now.
856         * method-serial.cc (serialirr_onwrite_dispatch): New.
857         (GTM::dispatch_serialirr_onwrite): New.
858         * libitm_i.h: Same.
860 2011-08-12  Torvald Riegel  <triegel@redhat.com>
862         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
863         * query.cc (_ITM_getTransactionId): There is no active transaction if
864         the current nesting level is zero.
866 2011-07-28  Torvald Riegel  <triegel@redhat.com>
868         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
869         rollback.
871 2011-07-28  Torvald Riegel  <triegel@redhat.com>
873         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
874         transaction properties from the caller instead of from the
875         transaction object.
876         * libitm_i.h: Same.
877         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
879 2011-07-28  Torvald Riegel  <triegel@redhat.com>
881         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
882         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
883         * dispatch.h: Same.
884         * method-serial.cc: Same.
885         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
886         flat nesting as default, and closed nesting on demand.
887         (GTM::gtm_transaction::rollback): Same.
888         (_ITM_abortTransaction): Same.
889         (GTM::gtm_transaction::restart): Same.
890         (GTM::gtm_transaction::trycommit): Same.
891         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
892         (choose_code_path): New.
893         (GTM::gtm_transaction_cp::save): New.
894         (GTM::gtm_transaction_cp::commit): New.
895         * query.cc (_ITM_inTransaction): Support flat nesting.
896         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
897         (GTM::gtm_transaction): Support flat and closed nesting.
898         * alloc.cc (commit_allocations_2): New.
899         (commit_cb_data): New helper struct.
900         (GTM::gtm_transaction::commit_allocations): Handle nested
901         commits/rollbacks.
902         * libitm.texi: Update user action section, add description of nesting.
904 2011-07-28  Torvald Riegel  <triegel@redhat.com>
906         * libitm_i.h: Add closed nesting as restart reason.
907         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
909 2011-07-28  Torvald Riegel  <triegel@redhat.com>
911         * useraction.cc: Use vector instead of list to store actions.
912         Also support partial rollbacks for closed nesting.
913         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
914         * beginend.cc: Same.
916 2011-07-28  Torvald Riegel  <triegel@redhat.com>
918         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
919         closed_nesting flags, as well as a closed nesting alternative.
920         * method-serial.cc: Same.
921         (serial_dispatch): Renamed to serialirr_dispatch.
922         (GTM::dispatch_serialirr): Same.
923         (serial_dispatch_ul): Renamed to serial_dispatch.
924         (GTM::dispatch_serial): Same.
926 2011-07-28  Torvald Riegel  <triegel@redhat.com>
928         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
930 2011-07-28  Torvald Riegel  <triegel@redhat.com>
932         * aatree.h (aa_tree::remove): New.
933         (aa_tree::operator new): Add placement new.
935 2011-07-02  Torvald Riegel  <triegel@redhat.com>
937         * containers.h: New file.
938         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
939         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
940         * common.h: ... to here.
941         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
942         * local.cc: Same.
944 2011-06-30  Torvald Riegel  <triegel@redhat.com>
946         * libitm_i.h (STATE_ABORTING): Remove.
947         * beginend.cc (_ITM_abortTransaction): Same.
948         (GTM::gtm_transaction::trycommit_and_finalize): Same.
949         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
950         (_ITM_rollbackTransaction): Remove.
951         * beginend.cc: Same.
952         * libitm.map: Same.
953         * libitm.texi: Document these ABI changes.
955 2011-06-30  Torvald Riegel  <triegel@redhat.com>
957         * libitm.texi: New file.
958         * Makefile.am: Add libitm.texi.
959         * Makefile.in: Rebuild.
961 2011-06-30  Torvald Riegel  <triegel@redhat.com>
963         * libitm_i.h: Move parts to common.h and dispatch.h.
964         * common.h: New file.
965         * dispatch.h: New file, new dispatch class.
966         Rename GTM::abi_dispatch::lock_type to ls_modifier.
967         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
968         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
969         decision to retry.cc.
970         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
971         only.
972         (GTM::gtm_transaction::decide_begin_dispatch): Same.
973         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
974         logging.
975         * barrier.cc: Use new barriers definitions.
976         (abi_dispatch::memmove_overlap_check): New.
977         * config/x86/x86_sse.cc: Same.
978         * config/x86/x86_avx.cc: Same.
979         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
980         memcpy.cc.
981         * Makefile.in: Rebuild.
982         * method-readonly.cc: Remove.
983         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
984         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
986 2011-06-30  Torvald Riegel  <triegel@redhat.com>
988         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
989         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
990         * testsuite/libitm.c/dropref-2.c: Same.
991         * testsuite/libitm.c/dropref.c: Same.
993 2011-06-30  Torvald Riegel  <triegel@redhat.com>
995         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
996         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
997         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
998         * alloc_c.cc: Same.
999         * barrier.tpl: Same.
1000         * beginend.c: Same.
1001         * config/generic/tls.h: Same.
1002         * config/x86/tls.h: Same.
1003         * libitm_i.h: Same.
1004         * memcpy.cc: Same.
1005         * memset.cc: Same.
1006         * method-readonly.cc: Same.
1007         * method-serial.cc: Same.
1008         * method-wbetl.cc: Same.
1009         * retry.cc: Same.
1011 2011-03-03  Richard Henderson  <rth@redhat.com>
1013         * config/posix/rwlock.cc (write_upgrade): Add missing case.
1014         From Patrik Marlier <patrick.marlier@unine.ch>.
1016 2011-02-03  Richard Henderson  <rth@redhat.com>
1018         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
1019         * configure.ac: Use it.
1020         * configure, config.h.in: Rebuild.
1021         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
1022         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
1023         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
1024         * libitm.map: Use wildcards to match size_t mangling.
1026 2010-12-14  Richard Henderson  <rth@redhat.com>
1028         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
1029         blocks of TIDs per thread.
1030         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
1031         (setup_gtm_thr): Return the thread structure.
1032         * config/x86/tls.h (setup_gtm_thr): Likewise.
1034 2010-12-14  Richard Henderson  <rth@redhat.com>
1036         * clone.cc (table_lock): Remove.
1037         (find_clone): Don't take it.
1038         (ExcludeTransaction): New helper class.
1039         (_ITM_registerTMCloneTable): Use it.
1040         (_ITM_deregisterTMCloneTable): Likewise.
1042 2010-12-14  Richard Henderson  <rth@redhat.com>
1044         * config/x86/tls.h: New file.
1046 2010-07-15  Richard Henderson  <rth@redhat.com>
1048         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1049         * Makefile.in: Rebuild.
1051 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1053         * method-wbetl.cc (trydropreference): Fix source line.
1055 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1057         * libitm.h: Add comment.
1058         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1060 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
1062         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1063         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1064         available, use pthread mutexes.
1065         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1066         * config.h.in: Regenerate.
1067         * configure: Regenerate.
1069 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
1071         * libitm.h (ITM_PURE): Define.
1072         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1074 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1076         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1077         (validate): Add comment.
1078         (trydropreference): New.
1079         * method-readonly.cc (class readonly_dispatch): Add
1080         trydropreference.
1081         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1082         Call trydropreference().
1083         * libitm.h (_ITM_dropReferences): Remove const attribute.
1084         * method-serial.cc (class serial_dispatch): Add trydropreference.
1085         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1087 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1089         * memcpy.cc (do_memcpy): Comment.
1091 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
1093         * barrier.tpl: Add comments throughout.
1095 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1097         * method-wbetl.cc (struct w_entry): Add comments.
1098         (trycommit): Same.
1099         (rollback): Same.
1101 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1103         * alloc_c.cc (_ITM_dropReferences): New.
1104         * libitm.map (_ITM_dropReferences): Add.
1105         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1106         * libitm_i.h (struct gtm_transaction): Declare
1107         drop_references_allocations and drop_references_local.
1108         * local.cc (rollback_local): Ignore memory when applicable.
1109         (drop_references_local): New.
1111 2010-06-23  Richard Henderson  <rth@redhat.com>
1113         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1114         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1115         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1116         * config/alpha/target.h: Likewise.
1117         * config/generic/tls.cc (gtm_mask_stack): Use it.
1119 2010-06-23  Richard Henderson  <rth@redhat.com>
1121         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1122         a mutex instead of trying a lock-free compare-and-swap on the list.
1123         (gtm_cacheline_page::operator delete): Likewise.
1125 2010-06-16  Richard Henderson  <rth@redhat.com>
1127         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1128         that overlap the libitm stack.
1129         * barrier.tpl: Mark incoming stack.
1130         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1131         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1132         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1133         * memcpy.cc, memset.cc: Likewise.
1134         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1135         * config/generic/tls.h (gtm_thread): Add stack_top member.
1136         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1137         * libitm_i.h (gtm_mask_stack): Declare.
1138         * config/generic/tls.cc: New file.
1139         * Makefile.am (libitm_la_SOURCES): Add it.
1140         (AM_CXXFLAGS): Turn off exceptions.
1141         * Makefile.in: Rebuild.
1143 2010-06-16  Richard Henderson  <rth@redhat.com>
1145         * alloc.cc (struct gtm_alloc_action): Move definition ...
1146         * libitm_i.h: ... here.
1147         (class gtm_transaction): Declare new and delete.
1148         * beginend.cc (alloc_tx): Reformulate as operator new.
1149         (free_tx): Reformulate as operator delete.
1150         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1152 2010-06-11  Richard Henderson  <rth@redhat.com>
1154         * clone.cc (clone_entry_compare): Fix typo.
1155         From Patrik Marlier <patrick.marlier@unine.ch>.
1157 2010-05-13  Richard Henderson  <rth@redhat.com>
1159         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1160         in extern "C".
1162 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
1164         * libitm_i.h (struct gtm_transaction): Remove
1165         get_allocation_size.
1166         (record_allocation): Remove size parameter.
1167         * libitm.map (_ITM_realloc): Remove.
1168         * alloc_c.cc (_ITM_realloc): Remove.
1169         (_ITM_malloc): Remove size argument to record_allocation.
1170         (_ITM_calloc): Same.
1171         * alloc_cpp.cc (_ZGTtnwm): Same.
1172         (_ZGTtnwmRKSt9nothrow_t): Same.
1173         (_ZGTtnam): Same.
1174         (_ZGTtnamRKSt9nothrow_t): Same.
1175         * alloc.cc (struct gtm_alloc_action): Remove size.
1176         (get_allocation_size): Remove.
1177         (commit_allocations): Add comment.
1178         (record_allocation): Remove size parameter.
1179         (forget_allocation): Remove set of size.
1181 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
1183         * Makefile.am (abi_version): New.
1184         (AM_CXXFLAGS): Pass abi_version.
1185         * Makefile.in: Regenerate.
1186         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1188 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
1190         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1191         _ITM_getTMCloneOrIrrevokable.
1192         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1193         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1195 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
1197         * configure.ac: Remove Linux futex support.
1198         * configure.tgt (config_path): Same.
1199         * Makefile.am: Same.
1200         * config/linux: Remove entire directory.
1201         * configure: Rebuild.
1202         * Makefile.in: Rebuild.
1203         * testsuite/Makefile.in: Rebuild.
1205 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
1207         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1208         switching to serial mode.
1209         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1211 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
1213         * configure.tgt: Add emacs -*- tags.
1214         * barrier.tpl: Same.
1216 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
1218         * Makefile.am: Rename serial.cc to method-serial.cc.
1219         * Makefile.in: Regenerate with automake 1.11.1.
1220         * testsuite/Makefile.in: Same.
1221         * aclocal.m4: Regenerate with aclocal 1.11.1.
1222         * method-serial.cc: Rename from serial.cc.
1223         * libitm_i.h (struct gtm_transaction): Update comment on
1224         serialirr_mode.
1226 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
1228         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1229         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1231 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
1233         * configure: Rebuild.
1235 2009-11-12  Richard Henderson  <rth@redhat.com>
1237         * Rewrite everything in C++.
1239 2009-11-03  Richard Henderson  <rth@redhat.com>
1241         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1242         * Makefile.am (libitm_la_SOURCES): Add them.
1243         * configure.ac (ARCH_X86): New conditional.
1244         * Makefile.in, configure: Rebuild.
1245         * configure.tgt: Set up ARCH; do cflags setup at the same time.
1246         Move futex setup into "other system configury" case.
1247         * local.c (rollback_local): Merge into ...
1248         (GTM_rollback_local): ... here.
1249         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1250         (_ITM_LB): Define as an alias to GTM_LB.
1252 2009-11-03  Richard Henderson  <rth@redhat.com>
1254         * method-readonly.c: New file.
1255         * Makefile.am (libitm_la_SOURCES): Add it.
1256         * Makefile.in: Rebuild.
1257         * beginend.c (gtm_stmlock_array, gtm_clock): New.
1258         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1259         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1260         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1261         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1262         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1263         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1264         gtm_get_clock, gtm_inc_clock): New.
1265         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1266         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1267         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1268         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1269         replace uses with new libitm_i.h symbols.
1270         (dispatch_wbetl): Rename from wbetl_dispatch.
1271         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1272         away from dispatch_readonly; abort if the beginTransaction call
1273         asserted that the transaction was readonly.
1275 2009-11-03  Richard Henderson  <rth@redhat.com>
1277         * memset.c: New file.
1278         * Makefile.am (libitm_la_SOURCES): Add it.
1279         * Makefile.in: Rebuild.
1280         * testsuite/libitm.c/memset-1.c: New.
1282 2009-11-03  Richard Henderson  <rth@redhat.com>
1284         * dispatch.c: Remove file.
1285         * useraction.c (struct gtm_user_action): Move from libitm.h.
1286         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1287         (serial_memset, serial_memmove, serial_memcpy): Remove.
1288         (serial_W*, serial_R*): Remove.
1289         (serial_dispatch): Update to match.
1290         * configure.ac: Move Werror down below configure checks.  Don't
1291         check for sys/loadavg.h, do check for malloc.h.  Don't check for
1292         getloadavg and clock_gettime; do check for memalign, posix_memalign.
1293         Use GCC_AC_FUNC_MMAP_BLACKLIST
1294         * libitm.h: Split out all internal items to...
1295         * libitm_i.h: ... here.  New file.
1296         * copymask.c: New file.
1297         * local.c (struct gtm_local_undo): Move from libitm.h.
1298         (GTM_alloc_local): Rename from alloc_local; export.
1299         * memcpy.c: New file.
1300         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1301         * config/posix/page.c: New file.
1302         * config/posix/target_tls.h: Remove file.
1303         * barrier.c: New file.
1304         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1305         copymask.c, page.c.
1306         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1307         * method-wbetl.c: Rewrite for new cacheline methods.
1308         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1310         * config/alpha/sjlj.S: Fix typo.
1311         * config/alpha/target_i.h: Copy functions from alpha/target.h.
1312         * config/alpha/copymask.c: New file.
1313         * config/alpha/target.h (CACHELINE_SIZE): New.
1314         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1316         * config/x86/target_i.h: Copy functions from x86/target.h.
1317         * config/x86/copymask.c: New file.
1318         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1319         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1320         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1321         * config/x86/target_tls.h: Move contents to target_i.h.
1323         * testsuite/libitm.c/clone-1.c: Include libitm.h.
1324         * testsuite/libitm.c/memcpy-1.c: New.
1326 2009-10-22  Richard Henderson  <rth@redhat.com>
1328         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1329         (AM_CCASFLAGS): New.
1330         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
1331         saving/restoring _AC_ARG_VAR_PRECIOUS.
1332         * Makefile.in, aclocal.m4, config.h.in, configure,
1333         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1335 2009-10-22  Richard Henderson  <rth@redhat.com>
1337         * testsuite/*: Update for new compiler syntax.
1339 2009-10-21  Richard Henderson  <rth@redhat.com>
1341         * libitm.h (_ITM_abortReason): Add outerAbort.
1343 2009-08-03  Richard Henderson  <rth@redhat.com>
1345         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1346         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1347         * method-wbetl.c (struct w_entry): Remove mask.
1348         (wbetl_write, wbetl_load): Return pointer to word containing the data;
1349         adjust all callers.
1351 2009-07-22  Richard Henderson  <rth@redhat.com>
1353         * eh_cpp.c: New file.
1354         * Makefile.am (libitm_la_SOURCES): Add it.
1355         * Makefile.in: Rebuild.
1356         * beginend.c (GTM_rollback_transaction): Undo exception state.
1357         (GTM_trycommit_transaction): Mark inline.
1358         (GTM_trycommit_and_finalize_transaction): Split out from ...
1359         (_ITM_commitTransaction): ... here.
1360         (_ITM_commitTransactionEH): New function.
1361         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1362         cxa_unthrown, eh_in_flight; reorder.
1364         * testsuite/libitm.c++/c++.exp: New.
1365         * testsuite/libitm.c++/eh-1.C: New.
1367         * aatree.c (aa_free): Remove REGPARM.
1368         * aatree.h: Remove all REGPARM.
1370 2009-07-18  Richard Henderson  <rth@redhat.com>
1372         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1373         * Makefile.am (libitm_la_SOURCES): Add them.
1374         * Makefile.in: Rebuild.
1375         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1376         (GTM_trycommit_transaction): Likewise.
1377         * libitm.h: Include aatree.h
1378         (struct gtm_alloc_action): New.
1379         (struct gtm_transaction): Add alloc_actions.
1380         (GTM_record_allocation, GTM_forget_allocation): Declare.
1381         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1382         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1383         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1384         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1385         _ZGTtdaPvRKSt9nothrow_t): Export.
1387 2009-07-18  Richard Henderson  <rth@redhat.com>
1389         * target_tls.h: Move ...
1390         * config/posix/target_tls.h: ... here.
1392 2009-07-07  Richard Henderson  <rth@redhat.com>
1394         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1396 2009-07-07  Richard Henderson  <rth@redhat.com>
1398         * Update to GPL3.
1400 2009-07-07  Richard Henderson  <rth@redhat.com>
1402         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1403         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1405         * configure.tgt: Don't use -ftls-model for x86 linux.
1406         * libitm.h: Include target.h after standard includes.
1407         (_gtm_thr): Rename from gtm_thr.
1408         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1409         (gtm_disp, set_gtm_disp): New.
1410         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1411         retry.c, serial.c, useraction.c: Use accessor functions throughout.
1412         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1414 2009-07-07  Richard Henderson  <rth@redhat.com>
1416         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
1418 2009-07-06  Richard Henderson  <rth@redhat.com>
1420         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1421         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1422         (_ITM_beginTransaction): Take variadic arguments.
1423         (_ITM_registerThrownObject): Declare.
1424         * beginend.c, serial.c: Update.
1425         * libitm.map: Add _ITM_registerThrownObject.
1427 2009-01-28  Richard Henderson  <rth@redhat.com>
1429         * Makefile.am (libitm_la_SOURCES): Add clone.c.
1430         * Makefile.in: Rebuild.
1431         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1432         (GTM_restart_transaction): Fix uninstrumented code check.
1433         * retry.c (GTM_decide_retry_strategy): Add serial check.
1434         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
1435         automatically go irrevokable when in serial mode.
1436         * clone.c: New file.
1437         * libitm.h, libitm.map: Update.
1439 2009-01-27  Richard Henderson  <rth@redhat.com>
1441         * Makefile.am (LTCCASCOMPILE): Define.
1442         (libitm_la_SOURCES): Add methid-wbetl.c.
1443         * testsuite/Makefile.am: New
1444         * configure.ac: Add testsuite/Makefile.
1445         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1446         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1447         (_ITM_abortTransaction): Finalize implementation method; pass
1448         transaction properties to longjmp.
1449         (GTM_restart_transaction): Split out from ...
1450         (_ITM_commitTransaction): ... here.
1451         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1452         Move to config/x86/target.h.
1453         * config/linux/alpha/futex_bits.h: New.
1454         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1455         * config/x86/target.h: Disable target types for 32-bit.
1456         * config/alpha/sjlj.S, config/alpha/target.h: New.
1457         * libitm.h (struct gtm_dispatch): Add init, fini.
1458         (enum restart_reason): New.
1459         (struct gtm_transaction): Add method and restarts.
1460         * retry.c (GTM_decide_retry_strategy): Implement.
1461         * serial.c (serial_init, serial_fini): New.
1462         (GTM_serialmode): Finialize outgoing method.
1463         * method-wbetl.c: New.
1465 2008-12-09  Richard Henderson  <rth@redhat.com>
1467         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1468         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1469         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1470         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1471         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1472         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1473         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1474         * serial.c (serial_R##T, serial_W##T): Likewise.
1476 2008-11-21  Richard Henderson  <rth@redhat.com>
1478         * Initial commit.