1 2013-03-23 Andi Kleen <ak@linux.intel.com>
3 * local_atomic (__always_inline): Add.
4 (__calculate_memory_order, atomic_thread_fence,
5 atomic_signal_fence, test_and_set, clear, store, load,
6 exchange, compare_exchange_weak, compare_exchange_strong,
7 fetch_add, fetch_sub, fetch_and, fetch_or, fetch_xor):
8 Add __always_inline to force inlining.
10 2013-02-11 Iain Sandoe <iain@codesourcery.com>
11 Jack Howarth <howarth@bromo.med.uc.edu>
12 Patrick Marlier <patrick.marlier@gmail.com>
15 * alloc_cpp.cc: Enable function declarations on darwin.
16 * eh_cpp.cc: Likewise.
18 2013-02-03 Richard Sandiford <rdsandiford@googlemail.com>
20 Update copyright years.
22 2012-11-09 Torvald Riegel <triegel@redhat.com>
24 * beginend.cc (htm_fastpath): New.
25 (gtm_thread::begin_transaction, _ITM_commitTransaction,
26 _ITM_commitTransactionEH): Add HTM fastpath handling.
27 * config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
28 * config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
29 * config/x86/target.h (htm_available, htm_init, htm_begin_success,
30 htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
31 * configure.tgt: Add -mrtm to XCFLAGS.
32 * method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
33 (gtm_thread::serialirr_mode): Add HTM fastpath handling.
34 * libitm_i.h (htm_fastpath, dispatch_htm): Declare.
35 * retry.cc (parse_default_method): Add HTM method parsing.
36 (gtm_thread::number_of_threads_changed): Use HTM by default if
39 2012-11-04 Thomas Schwinge <thomas@codesourcery.com>
41 * configure: Regenerate.
43 2012-10-31 Richard Henderson <rth@redhat.com>
45 * acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
46 * configure.ac: Use it.
47 * config.h.in, configure: Rebuild.
48 * testsuite/Makefile.in: Rebuild.
50 2012-10-24 Torvald Riegel <triegel@redhat.com>
52 * libitm.texi: Clarify ABI requirements for data-logging functions.
54 2012-10-24 Torvald Riegel <triegel@redhat.com>
56 * retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
57 it requires serial mode instead of assuming that for certain
59 * dispatch.h (abi_dispatch::requires_serial): New.
60 (abi_dispatch::abi_dispatch): Adapt.
61 * method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
62 * method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
63 * method-serial.cc (serialirr_dispatch::serialirr_dispatch,
64 serial_dispatch::serial_dispatch,
65 serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
67 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
69 * config/x86/target.h (struct gtm_jmpbuf): Merge x86_64
70 and ia32 declarations some more.
71 * config/x86/sjlj.S (_ITM_beginTransaction): Move ret to common code.
73 2012-09-20 Jakub Jelinek <jakub@redhat.com>
76 * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
77 * configure: Regenerate.
78 * Makefile.in: Regenerate.
80 2012-09-14 David Edelsohn <dje.gcc@gmail.com>
82 * configure: Regenerated.
84 2012-07-31 Uros Bizjak <ubizjak@gmail.com>
86 * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.
88 2012-05-21 Patrick Marlier <patrick.marlier@gmail.com>
90 * eh_cpp.cc: Fix __cxa_end_catch declaration.
92 2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
94 * configure: Regenerated.
96 2012-04-04 H.J. Lu <hongjiu.lu@intel.com>
99 * config/x86/target.h (gtm_jmpbuf): Replace long with long long
102 2012-04-03 Tristan Gingold <gingold@adacore.com>
104 * configure: Regenerate.
106 2012-03-31 H.J. Lu <hongjiu.lu@intel.com>
109 * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
111 2012-03-16 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
113 * testsuite/lib/libitm.exp: load fortran-modules.exp
115 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
117 * configure.tgt (*-*-irix6*): Remove.
119 2012-03-13 Torvald Riegel <triegel@redhat.com>
122 * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
125 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
127 * configure.tgt (*-*-osf*): Remove.
128 * configure: Regenerate.
130 2012-03-05 Torvald Riegel <triegel@redhat.com>
132 * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
133 memtransfer/memset if size isn't larger than zero.
135 2012-03-02 Torvald Riegel <triegel@redhat.com>
137 * libitm.texi: Link to specification and add a usage example.
139 2012-02-24 Torvald Riegel <triegel@redhat.com>
141 * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
142 default dispatch for more than 1 thread to ml_wt.
144 2012-02-20 Torvald Riegel <triegel@redhat.com>
146 * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
148 2012-02-20 Torvald Riegel <triegel@redhat.com>
150 * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
152 2012-02-20 Torvald Riegel <triegel@redhat.com>
154 * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
155 serial mode corner cases made obsolete by prior gtm_rwlock changes.
156 (gl_wt_dispatch.rollback): Same.
158 2012-02-20 Torvald Riegel <triegel@redhat.com>
160 * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
162 2012-02-20 Torvald Riegel <triegel@redhat.com>
164 * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
165 for RfW src. Optimize number of calls to gtm_thr.
167 2012-02-20 Torvald Riegel <triegel@redhat.com>
169 * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
171 * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
172 (default_dispatch): Make atomic.
173 (GTM::gtm_thread::set_default_dispatch): Access atomically.
174 (GTM::gtm_thread::decide_retry_strategy): Access atomically and
175 use decide_begin_dispatch() if default_dispatch might have changed.
176 (GTM::gtm_thread::number_of_threads_changed): Initialize
177 default_dispatch here.
179 2012-02-15 Iain Sandoe <iains@gcc.gnu.org>
180 Patrick Marlier <patrick.marlier@gmail.com>
183 * alloc_cpp.cc: No dummy definitions for darwin.
184 * eh_cpp.cc: Likewise.
186 2012-02-14 Richard Henderson <rth@redhat.com>
188 * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
190 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
192 * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
194 2012-02-14 Torvald Riegel <triegel@redhat.com>
196 * libitm_i.h (GTM::gtm_rwlog_entry): New.
197 (GTM::gtm_thread): Add read and write logs.
198 (GTM::dispatch_ml_wt): Declare.
199 * retry.cc (parse_default_method): Support ml_wt.
200 * method-ml.cc: New file.
201 * Makefile.am: Add method-ml.cc.
202 * Makefile.in: Regenerate.
204 2012-02-14 Torvald Riegel <triegel@redhat.com>
206 * dispatch.h (GTM::abi_dispatch::supports): New.
207 (GTM::method_group::reinit): New.
208 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
209 (GTM::gtm_thread::number_of_threads_changed): Check that the method
210 supports the current situation.
212 2012-02-14 Torvald Riegel <triegel@redhat.com>
214 * util.cc (GTM::xcalloc): New.
215 * common.h (GTM::xcalloc): Declare.
217 2012-02-14 Eric Botcazou <ebotcazou@adacore.com>
219 * config/sparc/target.h (cpu_relax): Read from CC register.
220 * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
222 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
224 * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
226 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
228 * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
229 * config/sparc/cacheline.h: New file.
230 * config/sparc/target.h: Likewise.
231 * config/sparc/sjlj.S: Likewise.
232 * config/linux/sparc/futex_bits.h: Likewise.
234 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
236 * configure.ac (link_itm): Fix comment.
237 * configure: Regenerate.
238 * testsuite/lib/libitm.exp: Do not pass -litm for the link.
240 2012-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
243 * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
244 Correct libgomp references.
246 2012-01-24 Torvald Riegel <triegel@redhat.com>
248 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
251 2012-01-24 Uros Bizjak <ubizjak@gmail.com>
253 * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
255 * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
256 offset values. Do not copy return address. Decrement stack
258 (GTM_longjump) [__x86_64__]: Update offset values.
260 2012-01-23 Uros Bizjak <ubizjak@gmail.com>
263 * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
264 the first function argument to %eax.
266 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
268 * libitm.h (_ITM_getThreadnum): Remove.
269 * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
271 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
273 * clearcap.map: New file.
274 * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
275 * configure.ac: Call it.
276 Clear HWCAP_LDFLAGS if defaulting to -mavx.
277 * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
278 * configure: Regenerate.
279 * Makefile.in: Regenerate.
280 * testsuite/Makefile.in: Regenerate.
282 2012-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
285 * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
286 include, exclude options.
288 2012-01-14 Torvald Riegel <triegel@redhat.com>
290 * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
292 * containers.h (GTM::vector::set_size): New.
294 2012-01-14 Torvald Riegel <triegel@redhat.com>
297 * config/generic/tls.h (GTM::mask_stack_top): New.
298 (GTM::mask_stack_bottom): Declare.
299 * config/generic/tls.c (GTM::mask_stack_bottom): New.
300 * local.cc (gtm_undolog::rollback): Filter out any updates that
301 overlap the libitm stack. Add current transaction as parameter.
302 * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
303 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
304 * testsuite/libitm.c/stackundo.c: New test.
306 2012-01-10 Richard Henderson <rth@redhat.com>
308 * libitm_i.h (_Unwind_DeleteException): Declare weak.
309 * eh_cpp.cc (_Unwind_DeleteException): Define for
310 !HAVE_ELF_STYLE_WEAKREF.
312 2012-01-08 Torvald Riegel <triegel@redhat.com>
314 * local.cc (GTM_LB): Use GTM::gtm_undolog.
315 (GTM::gtm_thread::drop_references_undolog): Remove.
316 (GTM::gtm_thread::commit_undolog,
317 GTM::gtm_thread::rollback_undolog): Move to ...
318 * libitm_i.h (GTM::gtm_undolog): ...here. New.
319 (GTM::gtm_undolog_entry): Remove.
320 (GTM::gtm_thread): Adapt.
321 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
322 (GTM::gtm_thread::trycommit): Adapt.
323 * method-serial.cc (serial_dispatch::log): Adapt.
324 * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
325 (gl_wt_dispatch::store): Fix likely/unlikely.
326 * containers.h (GTM::vector::resize): Add additional_capacity
327 parameter and handle it.
328 (GTM::vector::resize_noinline): New/adapt.
329 (GTM::vector::push): New.
331 2012-01-06 Richard Henderson <rth@redhat.com>
333 * configure.tgt: Support powerpc-linux and powerpc-darwin.
334 * config/linux/powerpc/futex_bits.h: New file.
335 * config/powerpc/cacheline.h: New file.
336 * config/powerpc/sjlj.S: New file.
337 * config/powerpc/target.h: New file.
338 * config/generic/asmcfi.h (cfi_offset): New.
339 (cfi_restore, cfi_undefined): New.
341 2012-01-05 Aldy Hernandez <aldyh@redhat.com>
344 * testsuite/libitm.c/reentrant.c: Remove xfail.
345 (thread): Pass x to pure().
346 From Patrik Marlier <patrick.marlier@gmail.com>.
348 2011-12-24 Torvald Riegel <triegel@redhat.com>
350 * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
351 privatization safety if already in serial mode.
353 2011-12-24 Torvald Riegel <triegel@redhat.com>
355 * beginend.cc (GTM::gtm_thread::restart): Add and handle
356 finish_serial_upgrade parameter.
357 * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
358 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
359 Don't unset reader flag.
360 (GTM::gtm_rwlock::write_upgrade_finish): New.
361 * config/posix/rwlock.cc: Same.
362 * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
364 * config/posix/rwlock.h: Same.
365 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
366 flag after commit or after rollback when restarting.
368 2011-12-24 Torvald Riegel <triegel@redhat.com>
370 * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
371 (GTM::gtm_thread::try_commit): Changed memory order.
372 * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
374 * config/linux/x86/futex_bits.h (sys_futex0): Same.
375 * config/linux/sh/futex_bits.h (sys_futex0): Same.
376 * config/linux/futex_bits.h (sys_futex0): Same.
377 * config/linux/futex.cc (futex_wait, futex_wake): Same.
378 * config/linux/futex.h (futex_wait, futex_wake): Same.
379 * config/linux/rwlock.h (gtm_rwlock::writers,
380 gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
382 * config/linux/rwlock.cc (gtm_rwlock::read_lock,
383 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
384 gtm_rwlock::write_unlock): Fix memory orders and fences.
385 * config/posix/rwlock.cc (gtm_rwlock::read_lock,
386 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
387 gtm_rwlock::write_unlock): Same.
388 * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
389 * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
390 gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
392 (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
393 gl_wt_dispatch::load, gl_wt_dispatch::store,
394 gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
395 orders and fences. Add comments.
397 2011-12-21 Jakub Jelinek <jakub@redhat.com>
399 * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
400 * Makefile.in: Regenerated.
402 2011-12-17 Kaz Kojima <kkojima@gcc.gnu.org>
404 * configure.tgt: Add sh* case.
405 * config/sh/target.h: New file.
406 * config/sh/sjlj.S: New file.
407 * config/linux/sh/futex_bits.h: New file.
409 2011-12-14 Richard Henderson <rth@redhat.com>
411 * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
412 * config/arm/sjlj.S, config/arm/target.h: New files.
413 * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
414 (cfi_rel_offset): New.
415 * config/linux/futex_bits.h: New file.
416 * config/linux/futex.cc: Include futex_bits.h here...
417 * config/linux/futex.h: ... not here.
418 * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
419 * configure.ac (ARCH_AM): New conditional.
420 * Makefile.in, configure: Rebuild.
421 * configure.tgt: Handle ARM.
423 2011-12-13 Richard Henderson <rth@redhat.com>
425 * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
426 signed/unsigned comparison werror.
428 * local_atomic: New file.
429 * libitm_i.h: Include it.
430 (gtm_thread::shared_state): Use atomic template.
431 * beginend.cc (GTM::gtm_clock): Use atomic template.
432 (global_tid): Use atomic template if 64-bit atomics available.
433 (gtm_thread::gtm_thread): Update shared_state access.
434 (gtm_thread::trycommit): Likewise.
435 (choose_code_path): Update global_tid access.
436 * method-gl.cc (gl_mg::orec): Use atomic template. Update all users.
437 * stmlock.h (GTM::gtm_clock): Use atomic template.
438 (gtm_get_clock, gtm_inc_clock): Update accesses.
439 * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
440 redundant __sync_synchronize after atomic shared_state access.
441 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
442 (gtm_rwlock::write_lock_generic): Likewise.
443 (gtm_rwlock::read_unlock): Likewise.
444 * config/alpha/target.h (atomic_read_barrier): Remove.
445 (atomic_write_barrier): Remove.
446 * config/x86/target.h (atomic_read_barrier): Remove.
447 (atomic_write_barrier): Remove.
449 2011-11-30 Richard Henderson <rth@redhat.com>
451 * libitm_i.h (GTM_longjmp): Swap first and second arguments.
452 * beginend.c (_ITM_abortTransaction): Update to match.
453 (GTM::gtm_thread::restart): Likewise.
454 * config/alpha/sjlj.S (GTM_longjmp): Likewise.
455 * config/x86/sjlj.S (GTM_longjmp): Likewise.
457 2011-11-23 Iain Sandoe <iains@gcc.gnu.org>
459 * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
460 * Makefile.in: Regenerate.
462 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
464 * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
465 * alloc_cpp.cc: Generate dummy functions if we don't
466 HAVE_ELF_STYLE_WEAKREF.
467 * eh_cpp.cc: Likewise.
468 * configure: Regenerate.
469 * aclocal.m4: Likewise.
470 * config.h.in: Likewise.
471 * Makefile.in: Likewise.
472 * testsuite/Makefile.in: Likewise.
474 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
476 * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
477 __USER_LABEL_PREFIX__ for targets that use it.
478 (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
479 (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
480 in portability to non-elf targets.
481 (GTM_longjmp): Likewise.
482 * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
485 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
487 * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
488 * testsuite/libitm.c/memset-1.c: Likewise.
490 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
492 * configure: Regenerate.
494 2011-11-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
496 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
497 (LIBITM_ENABLE_SYMVERS): Handle sun style.
498 * Makefile.am: Handle sun style versioning.
499 (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
500 * configure: Regenerate.
501 * Makefile.in: Regenerate.
503 2011-11-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
505 * config/generic/asmcfi.h: Fix comment.
506 * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
507 sequence without .hidden support, error for non-ELF targets.
508 (GTM_longjmp) [__ELF__]: Only use .hidden if
509 HAVE_ATTRIBUTE_VISIBILITY.
511 2011-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
513 * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
514 _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
516 * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
517 __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
519 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
522 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
523 * configure: Regenerate.
525 2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
527 * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
529 2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
531 * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
533 (.note.GNU-stack): Only use if __linux__.
534 * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
535 * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
536 * testsuite/libitm.c/reentrant.c: Likewise.
537 * testsuite/libitm.c/simple-2.c: Likewise.
538 * testsuite/libitm.c/txrelease.c: Likewise.
539 * testsuite/libitm.c++/static_ctor.C: Likewise.
541 2011-11-10 Richard Henderson <rth@redhat.com>
543 * config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
544 * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
545 * configure.ac (ARCH_X86_AVX): New conditional.
546 * Makefile.in, configure: Rebuild.
548 2011-11-09 Richard Henderson <rth@redhat.com>
550 * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
551 * configure.ac: Use it.
552 * config.h.in, configure: Rebuild.
553 * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
555 2011-11-09 Richard Henderson <rth@redhat.com>
557 * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
558 * config/alpha/unaligned.h: Remove file.
559 * config/generic/unaligned.h: Remove file.
560 * config/x86/unaligned.h: Remove file.
561 * config/generic/cachepage.h: Remove file.
562 * config/posix/cachepage.cc: Remove file.
563 * config/generic/cacheline.cc: Remove file.
564 * config/x86/cacheline.cc: Remove file.
565 * config/generic/cacheline.h (gtm_cacheline): Remove the
566 store_mask, copy_mask, copy_mask_wb methods.
567 * config/x86/cacheline.h: Likewise.
568 * config/alpha/cacheline.h: Fall back to generic after setting size.
569 * config/generic/tls.cc (gtm_mask_stack): Remove.
570 * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
571 (GTM_vpalignr_table): Remove.
572 * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
573 (GTM_pshift_table): Remove.
574 * config/libitm_i.h: Don't include cachepage.h.
575 * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
576 * Makefile.in, testsuite/Makefile.in: Rebuild.
578 2011-11-09 Richard Henderson <rth@redhat.com>
580 * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
581 to emit branch prediction hint.
583 * config/x86/sjlj.S: Protect elf directives with __ELF__.
584 Protect .note.GNU-stack with __linux__.
586 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
587 * configure, aclocal.m4, config.h.in: Rebuild.
588 * config/generic/asmcfi.h: New file.
589 * config/x86/sjlj.S: Use it.
591 2011-11-08 Richard Henderson <rth@redhat.com>
593 * local.cc (_ITM_LB): Use a normal call, not a function alias.
595 2011-11-08 Richard Henderson <rth@redhat.com>
597 * configure.tgt: Test correct directory for supported cpus.
599 * configure.ac: Exit if unsupported.
600 * configure: Rebuild.
601 * configure.tgt: Delete boilerplate from libgomp for unsupported
602 targets. Set UNSUPPORTED for unsupported targets.
604 2011-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
606 * configure.tgt: Handle i386 like i[456]86.
607 * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
609 * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
610 !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
612 2011-11-05 Aldy Hernandez <aldyh@redhat.com>
614 * method-wbetl.cc: Update copyright notice.
621 * useraction.cc: Same.
625 * config/generic/tls.cc: Same.
626 * config/generic/cacheline.h: Same.
627 * config/generic/cachepage.h: Same.
628 * config/generic/cacheline.cc: Same.
629 * config/generic/unaligned.h: Same.
630 * config/x86/cacheline.h: Same.
631 * config/x86/cacheline.cc: Same.
632 * config/x86/unaligned.h: Same.
633 * config/alpha/cacheline.h: Same.
634 * config/alpha/unaligned.h: Same.
635 * config/alpha/sjlj.S: Same.
636 * config/posix/cachepage.cc: Same.
637 * config/linux/futex.h: Same.
638 * config/linux/alpha/futex_bits.h: Same.
640 2011-11-04 Torvald Riegel <triegel@redhat.com>
642 * libitm.texi: No cover text and invariant sections.
644 2011-11-03 Richard Henderson <rth@redhat.com>
646 * local_type_traits: New file.
647 * libitm_i.h: Use it. Use C headers, not C++ wrappers.
649 2011-11-03 Richard Henderson <rth@redhat.com>
651 * configure.ac: Don't test for gfortran.
652 * configure: Rebuild.
654 * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
655 * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
657 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
659 * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
660 * testsuite/libitm.c/memset-1.c: Same.
661 * testsuite/libitm.c/c.exp: Same.
662 * testsuite/lib/libitm-dg.exp: Same.
663 * testsuite/lib/libitm.exp: Same.
664 * testsuite/libitm.c++/c++.exp: Same.
666 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
668 * testsuite/config/default.exp: Update copyright date.
669 * configure.ac: Add copyright info.
670 * configure.tgt: Same.
672 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
674 * testsuite/libitm.c/reentrant.c: XFAIL.
675 * testsuite/libitm.c++/static_ctor.C: XFAIL.
677 2011-10-29 Torvald Riegel <triegel@redhat.com>
679 * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
681 (_ITM_abortTransaction): Handle aborts of outer transactions.
683 * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
684 * libitm.texi: Document aborts of outer transactions.
685 * testsuite/libitm.c/cancel.c: New file.
687 2011-10-19 Torvald Riegel <triegel@redhat.com>
689 * testsuite/*: Change __transaction to __transaction_atomic or
690 __transaction_relaxed.
692 2011-10-19 Torvald Riegel <triegel@redhat.com>
694 * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
697 2011-10-19 Torvald Riegel <triegel@redhat.com>
699 * libitm_i.h: Add gl_wt dispatch.
700 * retry.cc (parse_default_method): Same.
701 * method-gl.cc: New file.
702 * Makefile.am: Use method-gl.cc.
703 * Makefile.in: Rebuild.
705 2011-10-19 Torvald Riegel <triegel@redhat.com>
707 * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
708 safety if requested by a TM method.
709 * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
710 privatization safety.
711 * method-serial.cc: Same.
713 2011-10-19 Torvald Riegel <triegel@redhat.com>
715 * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
716 (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
717 undolog-related member functions from *_local to *_undolog.
718 * local.cc (gtm_thread::commit_undolog): Same.
719 * beginend.cc (GTM::gtm_thread::trycommit): Same.
720 (GTM::gtm_thread::rollback): Roll back undolog before
721 dispatch-specific rollback.
723 2011-10-19 Torvald Riegel <triegel@redhat.com>
725 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
726 re-initialization of the current method group.
727 * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
729 2011-10-19 Torvald Riegel <triegel@redhat.com>
731 * alloc.cc (commit_allocations_2): Do not free transaction-local
732 memory when committing a nested transaction.
734 2011-10-19 Torvald Riegel <triegel@redhat.com>
736 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
737 serial-irrevocable dispatch, not serial.
739 2011-10-19 Torvald Riegel <triegel@redhat.com>
741 * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
743 * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
744 * method-serial.cc: Implement begin_or_restart().
745 * beginend.cc (GTM::gtm_thread::begin_transaction): Call
746 dispatch-specific begin_or_restart().
747 (GTM::gtm_thread::restart): Same.
749 2011-08-23 Torvald Riegel <triegel@redhat.com>
751 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
752 restarting without switching to serial mode.
753 (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
754 transaction state. Choose closed-nesting alternative if available.
755 (GTM::gtm_thread::set_default_dispatch): New.
756 (parse_default_method): New.
757 (GTM::gtm_thread::number_of_threads_changed): New.
758 * method-serial.cc (GTM::serial_mg): New method group class.
759 (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
761 (GTM::serial_dispatch): Same.
762 (GTM::serialirr_onwrite_dispatch): Same.
763 (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
764 * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
766 (GTM::gtm_thread::gtm_thread): Same.
767 (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
768 (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
769 (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
770 choose dispatch but set state according to dispatch here.
771 * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
772 (GTM::method_group): New class.
773 (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
774 * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
775 * libitm.texi: Document TM methods, method groups, method life cycle.
776 Rename method sets to method groups.
778 2011-08-23 Torvald Riegel <triegel@redhat.com>
780 * config/x86/tls.h: Moved to ...
781 * config/linux/x86/tls.h: ... here.
783 2011-08-23 Torvald Riegel <triegel@redhat.com>
785 * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
787 * config/x86/sjlj.S: Same.
789 2011-08-19 Torvald Riegel <triegel@redhat.com>
791 * config/linux/rwlock.h: New file.
792 * config/linux/rwlock.c: New file.
793 * configure.ac: Reenable futex support (undo SVN rev 157758).
795 * configure.tgt: Same.
796 * config/linux/alpha/futex_bits.h: Same.
797 * config/linux/futex.h: Same. Return number of woken processes.
798 * config/linux/futex.cc: Same.
799 (futex_wait): Remove spinning.
800 * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
801 Use __x86_64__ instead of __LP64__.
802 * aclocal.m4: Include generic futex checks.
803 * configure: Rebuild.
804 * Makefile.in: Rebuild.
805 * testsuite/Makefile.in: Rebuild.
806 * beginend.cc: Include pthread.h.
807 * config/posix/cachepage.cc: Same.
809 2011-08-12 Torvald Riegel <triegel@redhat.com>
811 * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
812 (abi_disp, set_abi_disp): Move to tx's TLS slot.
814 * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
816 (GTM::gtm_thread::thread_num): Removed.
817 (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
818 * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
819 tx-to-thread renaming.
820 * beginend.cc: Adapted to tx-to-thread renaming.
821 (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
822 (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
823 * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
824 gtm_transaction to gtm_thread.
825 (_ITM_getThreadnum): Removed. Not supported anymore.
826 * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
827 * libitm.texi: Documented that _ITM_getThreadnum is not supported.
828 * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
829 gtm_tx-to-gtm_thr renaming if necessary.
836 * alloc_cpp.cc: Same.
837 * method-serial.cc: Same.
838 * config/generic/tls.cc: Same.
839 * config/posix/rwlock.h (gtm_rwlock): Same.
840 * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
842 2011-08-12 Torvald Riegel <triegel@redhat.com>
844 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
846 (gtm_rwlock::read_unlock): Same.
847 (gtm_rwlock::write_lock_generic): New. Generalized from ...
848 (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
849 * libitm_i.h (GTM::gtm_transaction): Added shared_state.
850 * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
851 w_upgrade. Replaced by per-transaction flags (in shared_state).
852 Added c_confirmed_writers.
853 (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
854 GTM::gtm_rwlock::write_upgrade): Add tx parameter.
855 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
856 * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
857 * beginend.cc (GTM::gtm_transaction::begin_transaction,
858 _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
859 * libitm.texi: Document locking conventions and implementations in
862 2011-08-12 Torvald Riegel <triegel@redhat.com>
864 * libitm_i.h (next_tx): Add list of all threads' transaction.
865 * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
866 transaction with list of transactions and ...
867 (thread_exit_handler): ... deregister here.
868 * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
869 * config/x86/target.h: Same.
871 2011-08-12 Torvald Riegel <triegel@redhat.com>
873 * testsuite/libitm.c++/static_ctor.C: New file.
875 2011-08-12 Torvald Riegel <triegel@redhat.com>
877 * testsuite/libitm.c/reentrant.c: New file.
879 2011-08-12 Torvald Riegel <triegel@redhat.com>
881 * config/generic/tls.h: Remove the free list for transactions and ...
882 * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
883 (GTM::gtm_transaction::operator delete): ... and release here.
884 (thread_exit_handler): New. Delete tx when thread terminates.
885 (thread_exit_init): New.
886 (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
887 * testsuite/libitm.c/txrelease.c: New file.
889 2011-08-12 Torvald Riegel <triegel@redhat.com>
891 * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
892 * testsuite/libitm.c/notx.c: New file.
894 2011-08-12 Torvald Riegel <triegel@redhat.com>
896 * config/generic/tls.h (gtm_thread): Move local_tid from here ...
897 * libitm_i.h (local_tid): ... to here.
898 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
899 (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
901 2011-08-12 Torvald Riegel <triegel@redhat.com>
903 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
904 serialirr_onwrite_dispatch as new default for now.
905 * method-serial.cc (serialirr_onwrite_dispatch): New.
906 (GTM::dispatch_serialirr_onwrite): New.
909 2011-08-12 Torvald Riegel <triegel@redhat.com>
911 * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
912 * query.cc (_ITM_getTransactionId): There is no active transaction if
913 the current nesting level is zero.
915 2011-07-28 Torvald Riegel <triegel@redhat.com>
917 * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
920 2011-07-28 Torvald Riegel <triegel@redhat.com>
922 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
923 transaction properties from the caller instead of from the
926 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
928 2011-07-28 Torvald Riegel <triegel@redhat.com>
930 * local.cc (gtm_transaction::rollback_local): Support closed nesting.
931 * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
933 * method-serial.cc: Same.
934 * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
935 flat nesting as default, and closed nesting on demand.
936 (GTM::gtm_transaction::rollback): Same.
937 (_ITM_abortTransaction): Same.
938 (GTM::gtm_transaction::restart): Same.
939 (GTM::gtm_transaction::trycommit): Same.
940 (GTM::gtm_transaction::trycommit_and_finalize): Removed.
941 (choose_code_path): New.
942 (GTM::gtm_transaction_cp::save): New.
943 (GTM::gtm_transaction_cp::commit): New.
944 * query.cc (_ITM_inTransaction): Support flat nesting.
945 * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
946 (GTM::gtm_transaction): Support flat and closed nesting.
947 * alloc.cc (commit_allocations_2): New.
948 (commit_cb_data): New helper struct.
949 (GTM::gtm_transaction::commit_allocations): Handle nested
951 * libitm.texi: Update user action section, add description of nesting.
953 2011-07-28 Torvald Riegel <triegel@redhat.com>
955 * libitm_i.h: Add closed nesting as restart reason.
956 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
958 2011-07-28 Torvald Riegel <triegel@redhat.com>
960 * useraction.cc: Use vector instead of list to store actions.
961 Also support partial rollbacks for closed nesting.
962 * libitm_i.h (GTM::gtm_transaction::user_action): Same.
965 2011-07-28 Torvald Riegel <triegel@redhat.com>
967 * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
968 closed_nesting flags, as well as a closed nesting alternative.
969 * method-serial.cc: Same.
970 (serial_dispatch): Renamed to serialirr_dispatch.
971 (GTM::dispatch_serialirr): Same.
972 (serial_dispatch_ul): Renamed to serial_dispatch.
973 (GTM::dispatch_serial): Same.
975 2011-07-28 Torvald Riegel <triegel@redhat.com>
977 * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
979 2011-07-28 Torvald Riegel <triegel@redhat.com>
981 * aatree.h (aa_tree::remove): New.
982 (aa_tree::operator new): Add placement new.
984 2011-07-02 Torvald Riegel <triegel@redhat.com>
986 * containers.h: New file.
987 * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
988 * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
989 * common.h: ... to here.
990 (local_undo): Use GTM::vector for gtm_transaction::local_undo.
993 2011-06-30 Torvald Riegel <triegel@redhat.com>
995 * libitm_i.h (STATE_ABORTING): Remove.
996 * beginend.cc (_ITM_abortTransaction): Same.
997 (GTM::gtm_transaction::trycommit_and_finalize): Same.
998 * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
999 (_ITM_rollbackTransaction): Remove.
1000 * beginend.cc: Same.
1002 * libitm.texi: Document these ABI changes.
1004 2011-06-30 Torvald Riegel <triegel@redhat.com>
1006 * libitm.texi: New file.
1007 * Makefile.am: Add libitm.texi.
1008 * Makefile.in: Rebuild.
1010 2011-06-30 Torvald Riegel <triegel@redhat.com>
1012 * libitm_i.h: Move parts to common.h and dispatch.h.
1013 * common.h: New file.
1014 * dispatch.h: New file, new dispatch class.
1015 Rename GTM::abi_dispatch::lock_type to ls_modifier.
1016 RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
1017 * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
1018 decision to retry.cc.
1019 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
1021 (GTM::gtm_transaction::decide_begin_dispatch): Same.
1022 * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
1024 * barrier.cc: Use new barriers definitions.
1025 (abi_dispatch::memmove_overlap_check): New.
1026 * config/x86/x86_sse.cc: Same.
1027 * config/x86/x86_avx.cc: Same.
1028 * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
1030 * Makefile.in: Rebuild.
1031 * method-readonly.cc: Remove.
1032 * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
1033 Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
1035 2011-06-30 Torvald Riegel <triegel@redhat.com>
1037 * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
1038 * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
1039 * testsuite/libitm.c/dropref-2.c: Same.
1040 * testsuite/libitm.c/dropref.c: Same.
1042 2011-06-30 Torvald Riegel <triegel@redhat.com>
1044 * config/generic/tls.h (gtm_disp): Rename to abi_disp.
1045 * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
1046 * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
1048 * barrier.tpl: Same.
1050 * config/generic/tls.h: Same.
1051 * config/x86/tls.h: Same.
1055 * method-readonly.cc: Same.
1056 * method-serial.cc: Same.
1057 * method-wbetl.cc: Same.
1060 2011-03-03 Richard Henderson <rth@redhat.com>
1062 * config/posix/rwlock.cc (write_upgrade): Add missing case.
1063 From Patrik Marlier <patrick.marlier@unine.ch>.
1065 2011-02-03 Richard Henderson <rth@redhat.com>
1067 * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
1068 * configure.ac: Use it.
1069 * configure, config.h.in: Rebuild.
1070 * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
1071 (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
1072 _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
1073 * libitm.map: Use wildcards to match size_t mangling.
1075 2010-12-14 Richard Henderson <rth@redhat.com>
1077 * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
1078 blocks of TIDs per thread.
1079 * config/generic/tls.h (struct gtm_thread): Add local_tid member.
1080 (setup_gtm_thr): Return the thread structure.
1081 * config/x86/tls.h (setup_gtm_thr): Likewise.
1083 2010-12-14 Richard Henderson <rth@redhat.com>
1085 * clone.cc (table_lock): Remove.
1086 (find_clone): Don't take it.
1087 (ExcludeTransaction): New helper class.
1088 (_ITM_registerTMCloneTable): Use it.
1089 (_ITM_deregisterTMCloneTable): Likewise.
1091 2010-12-14 Richard Henderson <rth@redhat.com>
1093 * config/x86/tls.h: New file.
1095 2010-07-15 Richard Henderson <rth@redhat.com>
1097 * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1098 * Makefile.in: Rebuild.
1100 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
1102 * method-wbetl.cc (trydropreference): Fix source line.
1104 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
1106 * libitm.h: Add comment.
1107 * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1109 2010-07-07 Aldy Hernandez <aldyh@redhat.com>
1111 * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1112 * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1113 available, use pthread mutexes.
1114 * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1115 * config.h.in: Regenerate.
1116 * configure: Regenerate.
1118 2010-07-06 Aldy Hernandez <aldyh@redhat.com>
1120 * libitm.h (ITM_PURE): Define.
1121 Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1123 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
1125 * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1126 (validate): Add comment.
1127 (trydropreference): New.
1128 * method-readonly.cc (class readonly_dispatch): Add
1130 * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1131 Call trydropreference().
1132 * libitm.h (_ITM_dropReferences): Remove const attribute.
1133 * method-serial.cc (class serial_dispatch): Add trydropreference.
1134 * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1136 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
1138 * memcpy.cc (do_memcpy): Comment.
1140 2010-06-25 Aldy Hernandez <aldyh@redhat.com>
1142 * barrier.tpl: Add comments throughout.
1144 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
1146 * method-wbetl.cc (struct w_entry): Add comments.
1150 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
1152 * alloc_c.cc (_ITM_dropReferences): New.
1153 * libitm.map (_ITM_dropReferences): Add.
1154 * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1155 * libitm_i.h (struct gtm_transaction): Declare
1156 drop_references_allocations and drop_references_local.
1157 * local.cc (rollback_local): Ignore memory when applicable.
1158 (drop_references_local): New.
1160 2010-06-23 Richard Henderson <rth@redhat.com>
1162 * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1163 memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1164 * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1165 * config/alpha/target.h: Likewise.
1166 * config/generic/tls.cc (gtm_mask_stack): Use it.
1168 2010-06-23 Richard Henderson <rth@redhat.com>
1170 * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1171 a mutex instead of trying a lock-free compare-and-swap on the list.
1172 (gtm_cacheline_page::operator delete): Likewise.
1174 2010-06-16 Richard Henderson <rth@redhat.com>
1176 * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1177 that overlap the libitm stack.
1178 * barrier.tpl: Mark incoming stack.
1179 * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1180 _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1181 * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1182 * memcpy.cc, memset.cc: Likewise.
1183 * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1184 * config/generic/tls.h (gtm_thread): Add stack_top member.
1185 (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1186 * libitm_i.h (gtm_mask_stack): Declare.
1187 * config/generic/tls.cc: New file.
1188 * Makefile.am (libitm_la_SOURCES): Add it.
1189 (AM_CXXFLAGS): Turn off exceptions.
1190 * Makefile.in: Rebuild.
1192 2010-06-16 Richard Henderson <rth@redhat.com>
1194 * alloc.cc (struct gtm_alloc_action): Move definition ...
1195 * libitm_i.h: ... here.
1196 (class gtm_transaction): Declare new and delete.
1197 * beginend.cc (alloc_tx): Reformulate as operator new.
1198 (free_tx): Reformulate as operator delete.
1199 * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1201 2010-06-11 Richard Henderson <rth@redhat.com>
1203 * clone.cc (clone_entry_compare): Fix typo.
1204 From Patrik Marlier <patrick.marlier@unine.ch>.
1206 2010-05-13 Richard Henderson <rth@redhat.com>
1208 * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1211 2010-05-07 Aldy Hernandez <aldyh@redhat.com>
1213 * libitm_i.h (struct gtm_transaction): Remove
1214 get_allocation_size.
1215 (record_allocation): Remove size parameter.
1216 * libitm.map (_ITM_realloc): Remove.
1217 * alloc_c.cc (_ITM_realloc): Remove.
1218 (_ITM_malloc): Remove size argument to record_allocation.
1219 (_ITM_calloc): Same.
1220 * alloc_cpp.cc (_ZGTtnwm): Same.
1221 (_ZGTtnwmRKSt9nothrow_t): Same.
1223 (_ZGTtnamRKSt9nothrow_t): Same.
1224 * alloc.cc (struct gtm_alloc_action): Remove size.
1225 (get_allocation_size): Remove.
1226 (commit_allocations): Add comment.
1227 (record_allocation): Remove size parameter.
1228 (forget_allocation): Remove set of size.
1230 2010-04-19 Aldy Hernandez <aldyh@redhat.com>
1232 * Makefile.am (abi_version): New.
1233 (AM_CXXFLAGS): Pass abi_version.
1234 * Makefile.in: Regenerate.
1235 * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1237 2010-04-06 Aldy Hernandez <aldyh@redhat.com>
1239 * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1240 _ITM_getTMCloneOrIrrevokable.
1241 * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1242 * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1244 2010-03-26 Aldy Hernandez <aldyh@redhat.com>
1246 * configure.ac: Remove Linux futex support.
1247 * configure.tgt (config_path): Same.
1248 * Makefile.am: Same.
1249 * config/linux: Remove entire directory.
1250 * configure: Rebuild.
1251 * Makefile.in: Rebuild.
1252 * testsuite/Makefile.in: Rebuild.
1254 2010-03-09 Aldy Hernandez <aldyh@redhat.com>
1256 * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1257 switching to serial mode.
1258 * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1260 2010-03-03 Aldy Hernandez <aldyh@redhat.com>
1262 * configure.tgt: Add emacs -*- tags.
1263 * barrier.tpl: Same.
1265 2010-02-23 Aldy Hernandez <aldyh@redhat.com>
1267 * Makefile.am: Rename serial.cc to method-serial.cc.
1268 * Makefile.in: Regenerate with automake 1.11.1.
1269 * testsuite/Makefile.in: Same.
1270 * aclocal.m4: Regenerate with aclocal 1.11.1.
1271 * method-serial.cc: Rename from serial.cc.
1272 * libitm_i.h (struct gtm_transaction): Update comment on
1275 2010-02-22 Aldy Hernandez <aldyh@redhat.com>
1277 * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1278 * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1280 2010-02-11 Aldy Hernandez <aldyh@redhat.com>
1282 * configure: Rebuild.
1284 2009-11-12 Richard Henderson <rth@redhat.com>
1286 * Rewrite everything in C++.
1288 2009-11-03 Richard Henderson <rth@redhat.com>
1290 * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1291 * Makefile.am (libitm_la_SOURCES): Add them.
1292 * configure.ac (ARCH_X86): New conditional.
1293 * Makefile.in, configure: Rebuild.
1294 * configure.tgt: Set up ARCH; do cflags setup at the same time.
1295 Move futex setup into "other system configury" case.
1296 * local.c (rollback_local): Merge into ...
1297 (GTM_rollback_local): ... here.
1298 (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1299 (_ITM_LB): Define as an alias to GTM_LB.
1301 2009-11-03 Richard Henderson <rth@redhat.com>
1303 * method-readonly.c: New file.
1304 * Makefile.am (libitm_la_SOURCES): Add it.
1305 * Makefile.in: Rebuild.
1306 * beginend.c (gtm_stmlock_array, gtm_clock): New.
1307 (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1308 * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1309 (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1310 gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1311 gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1312 gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1313 gtm_get_clock, gtm_inc_clock): New.
1314 * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1315 LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1316 LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1317 locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1318 replace uses with new libitm_i.h symbols.
1319 (dispatch_wbetl): Rename from wbetl_dispatch.
1320 * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1321 away from dispatch_readonly; abort if the beginTransaction call
1322 asserted that the transaction was readonly.
1324 2009-11-03 Richard Henderson <rth@redhat.com>
1326 * memset.c: New file.
1327 * Makefile.am (libitm_la_SOURCES): Add it.
1328 * Makefile.in: Rebuild.
1329 * testsuite/libitm.c/memset-1.c: New.
1331 2009-11-03 Richard Henderson <rth@redhat.com>
1333 * dispatch.c: Remove file.
1334 * useraction.c (struct gtm_user_action): Move from libitm.h.
1335 * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1336 (serial_memset, serial_memmove, serial_memcpy): Remove.
1337 (serial_W*, serial_R*): Remove.
1338 (serial_dispatch): Update to match.
1339 * configure.ac: Move Werror down below configure checks. Don't
1340 check for sys/loadavg.h, do check for malloc.h. Don't check for
1341 getloadavg and clock_gettime; do check for memalign, posix_memalign.
1342 Use GCC_AC_FUNC_MMAP_BLACKLIST
1343 * libitm.h: Split out all internal items to...
1344 * libitm_i.h: ... here. New file.
1345 * copymask.c: New file.
1346 * local.c (struct gtm_local_undo): Move from libitm.h.
1347 (GTM_alloc_local): Rename from alloc_local; export.
1348 * memcpy.c: New file.
1349 * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1350 * config/posix/page.c: New file.
1351 * config/posix/target_tls.h: Remove file.
1352 * barrier.c: New file.
1353 * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1355 * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1356 * method-wbetl.c: Rewrite for new cacheline methods.
1357 * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1359 * config/alpha/sjlj.S: Fix typo.
1360 * config/alpha/target_i.h: Copy functions from alpha/target.h.
1361 * config/alpha/copymask.c: New file.
1362 * config/alpha/target.h (CACHELINE_SIZE): New.
1363 (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1365 * config/x86/target_i.h: Copy functions from x86/target.h.
1366 * config/x86/copymask.c: New file.
1367 * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1368 (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1369 (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1370 * config/x86/target_tls.h: Move contents to target_i.h.
1372 * testsuite/libitm.c/clone-1.c: Include libitm.h.
1373 * testsuite/libitm.c/memcpy-1.c: New.
1375 2009-10-22 Richard Henderson <rth@redhat.com>
1377 * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1378 (AM_CCASFLAGS): New.
1379 * configure.ac: Add AM_PROG_AS. Use m4_rename_force for
1380 saving/restoring _AC_ARG_VAR_PRECIOUS.
1381 * Makefile.in, aclocal.m4, config.h.in, configure,
1382 testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1384 2009-10-22 Richard Henderson <rth@redhat.com>
1386 * testsuite/*: Update for new compiler syntax.
1388 2009-10-21 Richard Henderson <rth@redhat.com>
1390 * libitm.h (_ITM_abortReason): Add outerAbort.
1392 2009-08-03 Richard Henderson <rth@redhat.com>
1394 * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1395 _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1396 * method-wbetl.c (struct w_entry): Remove mask.
1397 (wbetl_write, wbetl_load): Return pointer to word containing the data;
1400 2009-07-22 Richard Henderson <rth@redhat.com>
1402 * eh_cpp.c: New file.
1403 * Makefile.am (libitm_la_SOURCES): Add it.
1404 * Makefile.in: Rebuild.
1405 * beginend.c (GTM_rollback_transaction): Undo exception state.
1406 (GTM_trycommit_transaction): Mark inline.
1407 (GTM_trycommit_and_finalize_transaction): Split out from ...
1408 (_ITM_commitTransaction): ... here.
1409 (_ITM_commitTransactionEH): New function.
1410 * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1411 cxa_unthrown, eh_in_flight; reorder.
1413 * testsuite/libitm.c++/c++.exp: New.
1414 * testsuite/libitm.c++/eh-1.C: New.
1416 * aatree.c (aa_free): Remove REGPARM.
1417 * aatree.h: Remove all REGPARM.
1419 2009-07-18 Richard Henderson <rth@redhat.com>
1421 * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1422 * Makefile.am (libitm_la_SOURCES): Add them.
1423 * Makefile.in: Rebuild.
1424 * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1425 (GTM_trycommit_transaction): Likewise.
1426 * libitm.h: Include aatree.h
1427 (struct gtm_alloc_action): New.
1428 (struct gtm_transaction): Add alloc_actions.
1429 (GTM_record_allocation, GTM_forget_allocation): Declare.
1430 (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1431 * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1432 _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1433 _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1434 _ZGTtdaPvRKSt9nothrow_t): Export.
1436 2009-07-18 Richard Henderson <rth@redhat.com>
1438 * target_tls.h: Move ...
1439 * config/posix/target_tls.h: ... here.
1441 2009-07-07 Richard Henderson <rth@redhat.com>
1443 * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1445 2009-07-07 Richard Henderson <rth@redhat.com>
1449 2009-07-07 Richard Henderson <rth@redhat.com>
1451 * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1452 * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1454 * configure.tgt: Don't use -ftls-model for x86 linux.
1455 * libitm.h: Include target.h after standard includes.
1456 (_gtm_thr): Rename from gtm_thr.
1457 (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1458 (gtm_disp, set_gtm_disp): New.
1459 * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1460 retry.c, serial.c, useraction.c: Use accessor functions throughout.
1461 * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1463 2009-07-07 Richard Henderson <rth@redhat.com>
1465 * config/linux/rwlock.c (EZ): New define. Use it throughout.
1467 2009-07-06 Richard Henderson <rth@redhat.com>
1469 * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1470 (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1471 (_ITM_beginTransaction): Take variadic arguments.
1472 (_ITM_registerThrownObject): Declare.
1473 * beginend.c, serial.c: Update.
1474 * libitm.map: Add _ITM_registerThrownObject.
1476 2009-01-28 Richard Henderson <rth@redhat.com>
1478 * Makefile.am (libitm_la_SOURCES): Add clone.c.
1479 * Makefile.in: Rebuild.
1480 * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1481 (GTM_restart_transaction): Fix uninstrumented code check.
1482 * retry.c (GTM_decide_retry_strategy): Add serial check.
1483 * serial.c (GTM_serialmode): Add irrevokable variable. Don't
1484 automatically go irrevokable when in serial mode.
1485 * clone.c: New file.
1486 * libitm.h, libitm.map: Update.
1488 2009-01-27 Richard Henderson <rth@redhat.com>
1490 * Makefile.am (LTCCASCOMPILE): Define.
1491 (libitm_la_SOURCES): Add methid-wbetl.c.
1492 * testsuite/Makefile.am: New
1493 * configure.ac: Add testsuite/Makefile.
1494 * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1495 * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1496 (_ITM_abortTransaction): Finalize implementation method; pass
1497 transaction properties to longjmp.
1498 (GTM_restart_transaction): Split out from ...
1499 (_ITM_commitTransaction): ... here.
1500 * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1501 Move to config/x86/target.h.
1502 * config/linux/alpha/futex_bits.h: New.
1503 * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1504 * config/x86/target.h: Disable target types for 32-bit.
1505 * config/alpha/sjlj.S, config/alpha/target.h: New.
1506 * libitm.h (struct gtm_dispatch): Add init, fini.
1507 (enum restart_reason): New.
1508 (struct gtm_transaction): Add method and restarts.
1509 * retry.c (GTM_decide_retry_strategy): Implement.
1510 * serial.c (serial_init, serial_fini): New.
1511 (GTM_serialmode): Finialize outgoing method.
1512 * method-wbetl.c: New.
1514 2008-12-09 Richard Henderson <rth@redhat.com>
1516 * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1517 * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1518 * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1519 * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1520 (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1521 (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1522 * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1523 * serial.c (serial_R##T, serial_W##T): Likewise.
1525 2008-11-21 Richard Henderson <rth@redhat.com>