1 2013-04-23 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
3 * config/s390/sjlj.S: New file.
4 * config/s390/target.h: New file.
5 * configure.tgt: Set options for S/390.
7 2013-03-23 Andi Kleen <ak@linux.intel.com>
9 * local_atomic (__always_inline): Add.
10 (__calculate_memory_order, atomic_thread_fence,
11 atomic_signal_fence, test_and_set, clear, store, load,
12 exchange, compare_exchange_weak, compare_exchange_strong,
13 fetch_add, fetch_sub, fetch_and, fetch_or, fetch_xor):
14 Add __always_inline to force inlining.
16 2013-02-11 Iain Sandoe <iain@codesourcery.com>
17 Jack Howarth <howarth@bromo.med.uc.edu>
18 Patrick Marlier <patrick.marlier@gmail.com>
21 * alloc_cpp.cc: Enable function declarations on darwin.
22 * eh_cpp.cc: Likewise.
24 2013-02-03 Richard Sandiford <rdsandiford@googlemail.com>
26 Update copyright years.
28 2012-11-09 Torvald Riegel <triegel@redhat.com>
30 * beginend.cc (htm_fastpath): New.
31 (gtm_thread::begin_transaction, _ITM_commitTransaction,
32 _ITM_commitTransactionEH): Add HTM fastpath handling.
33 * config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
34 * config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
35 * config/x86/target.h (htm_available, htm_init, htm_begin_success,
36 htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
37 * configure.tgt: Add -mrtm to XCFLAGS.
38 * method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
39 (gtm_thread::serialirr_mode): Add HTM fastpath handling.
40 * libitm_i.h (htm_fastpath, dispatch_htm): Declare.
41 * retry.cc (parse_default_method): Add HTM method parsing.
42 (gtm_thread::number_of_threads_changed): Use HTM by default if
45 2012-11-04 Thomas Schwinge <thomas@codesourcery.com>
47 * configure: Regenerate.
49 2012-10-31 Richard Henderson <rth@redhat.com>
51 * acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
52 * configure.ac: Use it.
53 * config.h.in, configure: Rebuild.
54 * testsuite/Makefile.in: Rebuild.
56 2012-10-24 Torvald Riegel <triegel@redhat.com>
58 * libitm.texi: Clarify ABI requirements for data-logging functions.
60 2012-10-24 Torvald Riegel <triegel@redhat.com>
62 * retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
63 it requires serial mode instead of assuming that for certain
65 * dispatch.h (abi_dispatch::requires_serial): New.
66 (abi_dispatch::abi_dispatch): Adapt.
67 * method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
68 * method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
69 * method-serial.cc (serialirr_dispatch::serialirr_dispatch,
70 serial_dispatch::serial_dispatch,
71 serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
73 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
75 * config/x86/target.h (struct gtm_jmpbuf): Merge x86_64
76 and ia32 declarations some more.
77 * config/x86/sjlj.S (_ITM_beginTransaction): Move ret to common code.
79 2012-09-20 Jakub Jelinek <jakub@redhat.com>
82 * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
83 * configure: Regenerate.
84 * Makefile.in: Regenerate.
86 2012-09-14 David Edelsohn <dje.gcc@gmail.com>
88 * configure: Regenerated.
90 2012-07-31 Uros Bizjak <ubizjak@gmail.com>
92 * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.
94 2012-05-21 Patrick Marlier <patrick.marlier@gmail.com>
96 * eh_cpp.cc: Fix __cxa_end_catch declaration.
98 2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
100 * configure: Regenerated.
102 2012-04-04 H.J. Lu <hongjiu.lu@intel.com>
105 * config/x86/target.h (gtm_jmpbuf): Replace long with long long
108 2012-04-03 Tristan Gingold <gingold@adacore.com>
110 * configure: Regenerate.
112 2012-03-31 H.J. Lu <hongjiu.lu@intel.com>
115 * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
117 2012-03-16 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
119 * testsuite/lib/libitm.exp: load fortran-modules.exp
121 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
123 * configure.tgt (*-*-irix6*): Remove.
125 2012-03-13 Torvald Riegel <triegel@redhat.com>
128 * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
131 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
133 * configure.tgt (*-*-osf*): Remove.
134 * configure: Regenerate.
136 2012-03-05 Torvald Riegel <triegel@redhat.com>
138 * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
139 memtransfer/memset if size isn't larger than zero.
141 2012-03-02 Torvald Riegel <triegel@redhat.com>
143 * libitm.texi: Link to specification and add a usage example.
145 2012-02-24 Torvald Riegel <triegel@redhat.com>
147 * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
148 default dispatch for more than 1 thread to ml_wt.
150 2012-02-20 Torvald Riegel <triegel@redhat.com>
152 * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
154 2012-02-20 Torvald Riegel <triegel@redhat.com>
156 * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
158 2012-02-20 Torvald Riegel <triegel@redhat.com>
160 * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
161 serial mode corner cases made obsolete by prior gtm_rwlock changes.
162 (gl_wt_dispatch.rollback): Same.
164 2012-02-20 Torvald Riegel <triegel@redhat.com>
166 * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
168 2012-02-20 Torvald Riegel <triegel@redhat.com>
170 * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
171 for RfW src. Optimize number of calls to gtm_thr.
173 2012-02-20 Torvald Riegel <triegel@redhat.com>
175 * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
177 * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
178 (default_dispatch): Make atomic.
179 (GTM::gtm_thread::set_default_dispatch): Access atomically.
180 (GTM::gtm_thread::decide_retry_strategy): Access atomically and
181 use decide_begin_dispatch() if default_dispatch might have changed.
182 (GTM::gtm_thread::number_of_threads_changed): Initialize
183 default_dispatch here.
185 2012-02-15 Iain Sandoe <iains@gcc.gnu.org>
186 Patrick Marlier <patrick.marlier@gmail.com>
189 * alloc_cpp.cc: No dummy definitions for darwin.
190 * eh_cpp.cc: Likewise.
192 2012-02-14 Richard Henderson <rth@redhat.com>
194 * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
196 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
198 * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
200 2012-02-14 Torvald Riegel <triegel@redhat.com>
202 * libitm_i.h (GTM::gtm_rwlog_entry): New.
203 (GTM::gtm_thread): Add read and write logs.
204 (GTM::dispatch_ml_wt): Declare.
205 * retry.cc (parse_default_method): Support ml_wt.
206 * method-ml.cc: New file.
207 * Makefile.am: Add method-ml.cc.
208 * Makefile.in: Regenerate.
210 2012-02-14 Torvald Riegel <triegel@redhat.com>
212 * dispatch.h (GTM::abi_dispatch::supports): New.
213 (GTM::method_group::reinit): New.
214 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
215 (GTM::gtm_thread::number_of_threads_changed): Check that the method
216 supports the current situation.
218 2012-02-14 Torvald Riegel <triegel@redhat.com>
220 * util.cc (GTM::xcalloc): New.
221 * common.h (GTM::xcalloc): Declare.
223 2012-02-14 Eric Botcazou <ebotcazou@adacore.com>
225 * config/sparc/target.h (cpu_relax): Read from CC register.
226 * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
228 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
230 * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
232 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
234 * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
235 * config/sparc/cacheline.h: New file.
236 * config/sparc/target.h: Likewise.
237 * config/sparc/sjlj.S: Likewise.
238 * config/linux/sparc/futex_bits.h: Likewise.
240 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
242 * configure.ac (link_itm): Fix comment.
243 * configure: Regenerate.
244 * testsuite/lib/libitm.exp: Do not pass -litm for the link.
246 2012-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
249 * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
250 Correct libgomp references.
252 2012-01-24 Torvald Riegel <triegel@redhat.com>
254 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
257 2012-01-24 Uros Bizjak <ubizjak@gmail.com>
259 * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
261 * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
262 offset values. Do not copy return address. Decrement stack
264 (GTM_longjump) [__x86_64__]: Update offset values.
266 2012-01-23 Uros Bizjak <ubizjak@gmail.com>
269 * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
270 the first function argument to %eax.
272 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
274 * libitm.h (_ITM_getThreadnum): Remove.
275 * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
277 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
279 * clearcap.map: New file.
280 * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
281 * configure.ac: Call it.
282 Clear HWCAP_LDFLAGS if defaulting to -mavx.
283 * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
284 * configure: Regenerate.
285 * Makefile.in: Regenerate.
286 * testsuite/Makefile.in: Regenerate.
288 2012-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
291 * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
292 include, exclude options.
294 2012-01-14 Torvald Riegel <triegel@redhat.com>
296 * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
298 * containers.h (GTM::vector::set_size): New.
300 2012-01-14 Torvald Riegel <triegel@redhat.com>
303 * config/generic/tls.h (GTM::mask_stack_top): New.
304 (GTM::mask_stack_bottom): Declare.
305 * config/generic/tls.c (GTM::mask_stack_bottom): New.
306 * local.cc (gtm_undolog::rollback): Filter out any updates that
307 overlap the libitm stack. Add current transaction as parameter.
308 * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
309 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
310 * testsuite/libitm.c/stackundo.c: New test.
312 2012-01-10 Richard Henderson <rth@redhat.com>
314 * libitm_i.h (_Unwind_DeleteException): Declare weak.
315 * eh_cpp.cc (_Unwind_DeleteException): Define for
316 !HAVE_ELF_STYLE_WEAKREF.
318 2012-01-08 Torvald Riegel <triegel@redhat.com>
320 * local.cc (GTM_LB): Use GTM::gtm_undolog.
321 (GTM::gtm_thread::drop_references_undolog): Remove.
322 (GTM::gtm_thread::commit_undolog,
323 GTM::gtm_thread::rollback_undolog): Move to ...
324 * libitm_i.h (GTM::gtm_undolog): ...here. New.
325 (GTM::gtm_undolog_entry): Remove.
326 (GTM::gtm_thread): Adapt.
327 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
328 (GTM::gtm_thread::trycommit): Adapt.
329 * method-serial.cc (serial_dispatch::log): Adapt.
330 * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
331 (gl_wt_dispatch::store): Fix likely/unlikely.
332 * containers.h (GTM::vector::resize): Add additional_capacity
333 parameter and handle it.
334 (GTM::vector::resize_noinline): New/adapt.
335 (GTM::vector::push): New.
337 2012-01-06 Richard Henderson <rth@redhat.com>
339 * configure.tgt: Support powerpc-linux and powerpc-darwin.
340 * config/linux/powerpc/futex_bits.h: New file.
341 * config/powerpc/cacheline.h: New file.
342 * config/powerpc/sjlj.S: New file.
343 * config/powerpc/target.h: New file.
344 * config/generic/asmcfi.h (cfi_offset): New.
345 (cfi_restore, cfi_undefined): New.
347 2012-01-05 Aldy Hernandez <aldyh@redhat.com>
350 * testsuite/libitm.c/reentrant.c: Remove xfail.
351 (thread): Pass x to pure().
352 From Patrik Marlier <patrick.marlier@gmail.com>.
354 2011-12-24 Torvald Riegel <triegel@redhat.com>
356 * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
357 privatization safety if already in serial mode.
359 2011-12-24 Torvald Riegel <triegel@redhat.com>
361 * beginend.cc (GTM::gtm_thread::restart): Add and handle
362 finish_serial_upgrade parameter.
363 * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
364 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
365 Don't unset reader flag.
366 (GTM::gtm_rwlock::write_upgrade_finish): New.
367 * config/posix/rwlock.cc: Same.
368 * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
370 * config/posix/rwlock.h: Same.
371 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
372 flag after commit or after rollback when restarting.
374 2011-12-24 Torvald Riegel <triegel@redhat.com>
376 * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
377 (GTM::gtm_thread::try_commit): Changed memory order.
378 * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
380 * config/linux/x86/futex_bits.h (sys_futex0): Same.
381 * config/linux/sh/futex_bits.h (sys_futex0): Same.
382 * config/linux/futex_bits.h (sys_futex0): Same.
383 * config/linux/futex.cc (futex_wait, futex_wake): Same.
384 * config/linux/futex.h (futex_wait, futex_wake): Same.
385 * config/linux/rwlock.h (gtm_rwlock::writers,
386 gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
388 * config/linux/rwlock.cc (gtm_rwlock::read_lock,
389 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
390 gtm_rwlock::write_unlock): Fix memory orders and fences.
391 * config/posix/rwlock.cc (gtm_rwlock::read_lock,
392 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
393 gtm_rwlock::write_unlock): Same.
394 * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
395 * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
396 gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
398 (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
399 gl_wt_dispatch::load, gl_wt_dispatch::store,
400 gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
401 orders and fences. Add comments.
403 2011-12-21 Jakub Jelinek <jakub@redhat.com>
405 * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
406 * Makefile.in: Regenerated.
408 2011-12-17 Kaz Kojima <kkojima@gcc.gnu.org>
410 * configure.tgt: Add sh* case.
411 * config/sh/target.h: New file.
412 * config/sh/sjlj.S: New file.
413 * config/linux/sh/futex_bits.h: New file.
415 2011-12-14 Richard Henderson <rth@redhat.com>
417 * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
418 * config/arm/sjlj.S, config/arm/target.h: New files.
419 * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
420 (cfi_rel_offset): New.
421 * config/linux/futex_bits.h: New file.
422 * config/linux/futex.cc: Include futex_bits.h here...
423 * config/linux/futex.h: ... not here.
424 * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
425 * configure.ac (ARCH_AM): New conditional.
426 * Makefile.in, configure: Rebuild.
427 * configure.tgt: Handle ARM.
429 2011-12-13 Richard Henderson <rth@redhat.com>
431 * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
432 signed/unsigned comparison werror.
434 * local_atomic: New file.
435 * libitm_i.h: Include it.
436 (gtm_thread::shared_state): Use atomic template.
437 * beginend.cc (GTM::gtm_clock): Use atomic template.
438 (global_tid): Use atomic template if 64-bit atomics available.
439 (gtm_thread::gtm_thread): Update shared_state access.
440 (gtm_thread::trycommit): Likewise.
441 (choose_code_path): Update global_tid access.
442 * method-gl.cc (gl_mg::orec): Use atomic template. Update all users.
443 * stmlock.h (GTM::gtm_clock): Use atomic template.
444 (gtm_get_clock, gtm_inc_clock): Update accesses.
445 * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
446 redundant __sync_synchronize after atomic shared_state access.
447 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
448 (gtm_rwlock::write_lock_generic): Likewise.
449 (gtm_rwlock::read_unlock): Likewise.
450 * config/alpha/target.h (atomic_read_barrier): Remove.
451 (atomic_write_barrier): Remove.
452 * config/x86/target.h (atomic_read_barrier): Remove.
453 (atomic_write_barrier): Remove.
455 2011-11-30 Richard Henderson <rth@redhat.com>
457 * libitm_i.h (GTM_longjmp): Swap first and second arguments.
458 * beginend.c (_ITM_abortTransaction): Update to match.
459 (GTM::gtm_thread::restart): Likewise.
460 * config/alpha/sjlj.S (GTM_longjmp): Likewise.
461 * config/x86/sjlj.S (GTM_longjmp): Likewise.
463 2011-11-23 Iain Sandoe <iains@gcc.gnu.org>
465 * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
466 * Makefile.in: Regenerate.
468 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
470 * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
471 * alloc_cpp.cc: Generate dummy functions if we don't
472 HAVE_ELF_STYLE_WEAKREF.
473 * eh_cpp.cc: Likewise.
474 * configure: Regenerate.
475 * aclocal.m4: Likewise.
476 * config.h.in: Likewise.
477 * Makefile.in: Likewise.
478 * testsuite/Makefile.in: Likewise.
480 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
482 * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
483 __USER_LABEL_PREFIX__ for targets that use it.
484 (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
485 (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
486 in portability to non-elf targets.
487 (GTM_longjmp): Likewise.
488 * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
491 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
493 * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
494 * testsuite/libitm.c/memset-1.c: Likewise.
496 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
498 * configure: Regenerate.
500 2011-11-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
502 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
503 (LIBITM_ENABLE_SYMVERS): Handle sun style.
504 * Makefile.am: Handle sun style versioning.
505 (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
506 * configure: Regenerate.
507 * Makefile.in: Regenerate.
509 2011-11-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
511 * config/generic/asmcfi.h: Fix comment.
512 * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
513 sequence without .hidden support, error for non-ELF targets.
514 (GTM_longjmp) [__ELF__]: Only use .hidden if
515 HAVE_ATTRIBUTE_VISIBILITY.
517 2011-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
519 * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
520 _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
522 * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
523 __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
525 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
528 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
529 * configure: Regenerate.
531 2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
533 * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
535 2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
537 * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
539 (.note.GNU-stack): Only use if __linux__.
540 * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
541 * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
542 * testsuite/libitm.c/reentrant.c: Likewise.
543 * testsuite/libitm.c/simple-2.c: Likewise.
544 * testsuite/libitm.c/txrelease.c: Likewise.
545 * testsuite/libitm.c++/static_ctor.C: Likewise.
547 2011-11-10 Richard Henderson <rth@redhat.com>
549 * config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
550 * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
551 * configure.ac (ARCH_X86_AVX): New conditional.
552 * Makefile.in, configure: Rebuild.
554 2011-11-09 Richard Henderson <rth@redhat.com>
556 * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
557 * configure.ac: Use it.
558 * config.h.in, configure: Rebuild.
559 * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
561 2011-11-09 Richard Henderson <rth@redhat.com>
563 * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
564 * config/alpha/unaligned.h: Remove file.
565 * config/generic/unaligned.h: Remove file.
566 * config/x86/unaligned.h: Remove file.
567 * config/generic/cachepage.h: Remove file.
568 * config/posix/cachepage.cc: Remove file.
569 * config/generic/cacheline.cc: Remove file.
570 * config/x86/cacheline.cc: Remove file.
571 * config/generic/cacheline.h (gtm_cacheline): Remove the
572 store_mask, copy_mask, copy_mask_wb methods.
573 * config/x86/cacheline.h: Likewise.
574 * config/alpha/cacheline.h: Fall back to generic after setting size.
575 * config/generic/tls.cc (gtm_mask_stack): Remove.
576 * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
577 (GTM_vpalignr_table): Remove.
578 * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
579 (GTM_pshift_table): Remove.
580 * config/libitm_i.h: Don't include cachepage.h.
581 * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
582 * Makefile.in, testsuite/Makefile.in: Rebuild.
584 2011-11-09 Richard Henderson <rth@redhat.com>
586 * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
587 to emit branch prediction hint.
589 * config/x86/sjlj.S: Protect elf directives with __ELF__.
590 Protect .note.GNU-stack with __linux__.
592 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
593 * configure, aclocal.m4, config.h.in: Rebuild.
594 * config/generic/asmcfi.h: New file.
595 * config/x86/sjlj.S: Use it.
597 2011-11-08 Richard Henderson <rth@redhat.com>
599 * local.cc (_ITM_LB): Use a normal call, not a function alias.
601 2011-11-08 Richard Henderson <rth@redhat.com>
603 * configure.tgt: Test correct directory for supported cpus.
605 * configure.ac: Exit if unsupported.
606 * configure: Rebuild.
607 * configure.tgt: Delete boilerplate from libgomp for unsupported
608 targets. Set UNSUPPORTED for unsupported targets.
610 2011-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
612 * configure.tgt: Handle i386 like i[456]86.
613 * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
615 * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
616 !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
618 2011-11-05 Aldy Hernandez <aldyh@redhat.com>
620 * method-wbetl.cc: Update copyright notice.
627 * useraction.cc: Same.
631 * config/generic/tls.cc: Same.
632 * config/generic/cacheline.h: Same.
633 * config/generic/cachepage.h: Same.
634 * config/generic/cacheline.cc: Same.
635 * config/generic/unaligned.h: Same.
636 * config/x86/cacheline.h: Same.
637 * config/x86/cacheline.cc: Same.
638 * config/x86/unaligned.h: Same.
639 * config/alpha/cacheline.h: Same.
640 * config/alpha/unaligned.h: Same.
641 * config/alpha/sjlj.S: Same.
642 * config/posix/cachepage.cc: Same.
643 * config/linux/futex.h: Same.
644 * config/linux/alpha/futex_bits.h: Same.
646 2011-11-04 Torvald Riegel <triegel@redhat.com>
648 * libitm.texi: No cover text and invariant sections.
650 2011-11-03 Richard Henderson <rth@redhat.com>
652 * local_type_traits: New file.
653 * libitm_i.h: Use it. Use C headers, not C++ wrappers.
655 2011-11-03 Richard Henderson <rth@redhat.com>
657 * configure.ac: Don't test for gfortran.
658 * configure: Rebuild.
660 * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
661 * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
663 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
665 * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
666 * testsuite/libitm.c/memset-1.c: Same.
667 * testsuite/libitm.c/c.exp: Same.
668 * testsuite/lib/libitm-dg.exp: Same.
669 * testsuite/lib/libitm.exp: Same.
670 * testsuite/libitm.c++/c++.exp: Same.
672 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
674 * testsuite/config/default.exp: Update copyright date.
675 * configure.ac: Add copyright info.
676 * configure.tgt: Same.
678 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
680 * testsuite/libitm.c/reentrant.c: XFAIL.
681 * testsuite/libitm.c++/static_ctor.C: XFAIL.
683 2011-10-29 Torvald Riegel <triegel@redhat.com>
685 * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
687 (_ITM_abortTransaction): Handle aborts of outer transactions.
689 * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
690 * libitm.texi: Document aborts of outer transactions.
691 * testsuite/libitm.c/cancel.c: New file.
693 2011-10-19 Torvald Riegel <triegel@redhat.com>
695 * testsuite/*: Change __transaction to __transaction_atomic or
696 __transaction_relaxed.
698 2011-10-19 Torvald Riegel <triegel@redhat.com>
700 * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
703 2011-10-19 Torvald Riegel <triegel@redhat.com>
705 * libitm_i.h: Add gl_wt dispatch.
706 * retry.cc (parse_default_method): Same.
707 * method-gl.cc: New file.
708 * Makefile.am: Use method-gl.cc.
709 * Makefile.in: Rebuild.
711 2011-10-19 Torvald Riegel <triegel@redhat.com>
713 * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
714 safety if requested by a TM method.
715 * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
716 privatization safety.
717 * method-serial.cc: Same.
719 2011-10-19 Torvald Riegel <triegel@redhat.com>
721 * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
722 (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
723 undolog-related member functions from *_local to *_undolog.
724 * local.cc (gtm_thread::commit_undolog): Same.
725 * beginend.cc (GTM::gtm_thread::trycommit): Same.
726 (GTM::gtm_thread::rollback): Roll back undolog before
727 dispatch-specific rollback.
729 2011-10-19 Torvald Riegel <triegel@redhat.com>
731 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
732 re-initialization of the current method group.
733 * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
735 2011-10-19 Torvald Riegel <triegel@redhat.com>
737 * alloc.cc (commit_allocations_2): Do not free transaction-local
738 memory when committing a nested transaction.
740 2011-10-19 Torvald Riegel <triegel@redhat.com>
742 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
743 serial-irrevocable dispatch, not serial.
745 2011-10-19 Torvald Riegel <triegel@redhat.com>
747 * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
749 * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
750 * method-serial.cc: Implement begin_or_restart().
751 * beginend.cc (GTM::gtm_thread::begin_transaction): Call
752 dispatch-specific begin_or_restart().
753 (GTM::gtm_thread::restart): Same.
755 2011-08-23 Torvald Riegel <triegel@redhat.com>
757 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
758 restarting without switching to serial mode.
759 (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
760 transaction state. Choose closed-nesting alternative if available.
761 (GTM::gtm_thread::set_default_dispatch): New.
762 (parse_default_method): New.
763 (GTM::gtm_thread::number_of_threads_changed): New.
764 * method-serial.cc (GTM::serial_mg): New method group class.
765 (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
767 (GTM::serial_dispatch): Same.
768 (GTM::serialirr_onwrite_dispatch): Same.
769 (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
770 * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
772 (GTM::gtm_thread::gtm_thread): Same.
773 (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
774 (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
775 (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
776 choose dispatch but set state according to dispatch here.
777 * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
778 (GTM::method_group): New class.
779 (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
780 * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
781 * libitm.texi: Document TM methods, method groups, method life cycle.
782 Rename method sets to method groups.
784 2011-08-23 Torvald Riegel <triegel@redhat.com>
786 * config/x86/tls.h: Moved to ...
787 * config/linux/x86/tls.h: ... here.
789 2011-08-23 Torvald Riegel <triegel@redhat.com>
791 * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
793 * config/x86/sjlj.S: Same.
795 2011-08-19 Torvald Riegel <triegel@redhat.com>
797 * config/linux/rwlock.h: New file.
798 * config/linux/rwlock.c: New file.
799 * configure.ac: Reenable futex support (undo SVN rev 157758).
801 * configure.tgt: Same.
802 * config/linux/alpha/futex_bits.h: Same.
803 * config/linux/futex.h: Same. Return number of woken processes.
804 * config/linux/futex.cc: Same.
805 (futex_wait): Remove spinning.
806 * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
807 Use __x86_64__ instead of __LP64__.
808 * aclocal.m4: Include generic futex checks.
809 * configure: Rebuild.
810 * Makefile.in: Rebuild.
811 * testsuite/Makefile.in: Rebuild.
812 * beginend.cc: Include pthread.h.
813 * config/posix/cachepage.cc: Same.
815 2011-08-12 Torvald Riegel <triegel@redhat.com>
817 * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
818 (abi_disp, set_abi_disp): Move to tx's TLS slot.
820 * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
822 (GTM::gtm_thread::thread_num): Removed.
823 (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
824 * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
825 tx-to-thread renaming.
826 * beginend.cc: Adapted to tx-to-thread renaming.
827 (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
828 (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
829 * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
830 gtm_transaction to gtm_thread.
831 (_ITM_getThreadnum): Removed. Not supported anymore.
832 * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
833 * libitm.texi: Documented that _ITM_getThreadnum is not supported.
834 * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
835 gtm_tx-to-gtm_thr renaming if necessary.
842 * alloc_cpp.cc: Same.
843 * method-serial.cc: Same.
844 * config/generic/tls.cc: Same.
845 * config/posix/rwlock.h (gtm_rwlock): Same.
846 * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
848 2011-08-12 Torvald Riegel <triegel@redhat.com>
850 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
852 (gtm_rwlock::read_unlock): Same.
853 (gtm_rwlock::write_lock_generic): New. Generalized from ...
854 (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
855 * libitm_i.h (GTM::gtm_transaction): Added shared_state.
856 * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
857 w_upgrade. Replaced by per-transaction flags (in shared_state).
858 Added c_confirmed_writers.
859 (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
860 GTM::gtm_rwlock::write_upgrade): Add tx parameter.
861 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
862 * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
863 * beginend.cc (GTM::gtm_transaction::begin_transaction,
864 _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
865 * libitm.texi: Document locking conventions and implementations in
868 2011-08-12 Torvald Riegel <triegel@redhat.com>
870 * libitm_i.h (next_tx): Add list of all threads' transaction.
871 * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
872 transaction with list of transactions and ...
873 (thread_exit_handler): ... deregister here.
874 * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
875 * config/x86/target.h: Same.
877 2011-08-12 Torvald Riegel <triegel@redhat.com>
879 * testsuite/libitm.c++/static_ctor.C: New file.
881 2011-08-12 Torvald Riegel <triegel@redhat.com>
883 * testsuite/libitm.c/reentrant.c: New file.
885 2011-08-12 Torvald Riegel <triegel@redhat.com>
887 * config/generic/tls.h: Remove the free list for transactions and ...
888 * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
889 (GTM::gtm_transaction::operator delete): ... and release here.
890 (thread_exit_handler): New. Delete tx when thread terminates.
891 (thread_exit_init): New.
892 (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
893 * testsuite/libitm.c/txrelease.c: New file.
895 2011-08-12 Torvald Riegel <triegel@redhat.com>
897 * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
898 * testsuite/libitm.c/notx.c: New file.
900 2011-08-12 Torvald Riegel <triegel@redhat.com>
902 * config/generic/tls.h (gtm_thread): Move local_tid from here ...
903 * libitm_i.h (local_tid): ... to here.
904 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
905 (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
907 2011-08-12 Torvald Riegel <triegel@redhat.com>
909 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
910 serialirr_onwrite_dispatch as new default for now.
911 * method-serial.cc (serialirr_onwrite_dispatch): New.
912 (GTM::dispatch_serialirr_onwrite): New.
915 2011-08-12 Torvald Riegel <triegel@redhat.com>
917 * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
918 * query.cc (_ITM_getTransactionId): There is no active transaction if
919 the current nesting level is zero.
921 2011-07-28 Torvald Riegel <triegel@redhat.com>
923 * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
926 2011-07-28 Torvald Riegel <triegel@redhat.com>
928 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
929 transaction properties from the caller instead of from the
932 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
934 2011-07-28 Torvald Riegel <triegel@redhat.com>
936 * local.cc (gtm_transaction::rollback_local): Support closed nesting.
937 * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
939 * method-serial.cc: Same.
940 * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
941 flat nesting as default, and closed nesting on demand.
942 (GTM::gtm_transaction::rollback): Same.
943 (_ITM_abortTransaction): Same.
944 (GTM::gtm_transaction::restart): Same.
945 (GTM::gtm_transaction::trycommit): Same.
946 (GTM::gtm_transaction::trycommit_and_finalize): Removed.
947 (choose_code_path): New.
948 (GTM::gtm_transaction_cp::save): New.
949 (GTM::gtm_transaction_cp::commit): New.
950 * query.cc (_ITM_inTransaction): Support flat nesting.
951 * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
952 (GTM::gtm_transaction): Support flat and closed nesting.
953 * alloc.cc (commit_allocations_2): New.
954 (commit_cb_data): New helper struct.
955 (GTM::gtm_transaction::commit_allocations): Handle nested
957 * libitm.texi: Update user action section, add description of nesting.
959 2011-07-28 Torvald Riegel <triegel@redhat.com>
961 * libitm_i.h: Add closed nesting as restart reason.
962 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
964 2011-07-28 Torvald Riegel <triegel@redhat.com>
966 * useraction.cc: Use vector instead of list to store actions.
967 Also support partial rollbacks for closed nesting.
968 * libitm_i.h (GTM::gtm_transaction::user_action): Same.
971 2011-07-28 Torvald Riegel <triegel@redhat.com>
973 * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
974 closed_nesting flags, as well as a closed nesting alternative.
975 * method-serial.cc: Same.
976 (serial_dispatch): Renamed to serialirr_dispatch.
977 (GTM::dispatch_serialirr): Same.
978 (serial_dispatch_ul): Renamed to serial_dispatch.
979 (GTM::dispatch_serial): Same.
981 2011-07-28 Torvald Riegel <triegel@redhat.com>
983 * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
985 2011-07-28 Torvald Riegel <triegel@redhat.com>
987 * aatree.h (aa_tree::remove): New.
988 (aa_tree::operator new): Add placement new.
990 2011-07-02 Torvald Riegel <triegel@redhat.com>
992 * containers.h: New file.
993 * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
994 * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
995 * common.h: ... to here.
996 (local_undo): Use GTM::vector for gtm_transaction::local_undo.
999 2011-06-30 Torvald Riegel <triegel@redhat.com>
1001 * libitm_i.h (STATE_ABORTING): Remove.
1002 * beginend.cc (_ITM_abortTransaction): Same.
1003 (GTM::gtm_transaction::trycommit_and_finalize): Same.
1004 * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
1005 (_ITM_rollbackTransaction): Remove.
1006 * beginend.cc: Same.
1008 * libitm.texi: Document these ABI changes.
1010 2011-06-30 Torvald Riegel <triegel@redhat.com>
1012 * libitm.texi: New file.
1013 * Makefile.am: Add libitm.texi.
1014 * Makefile.in: Rebuild.
1016 2011-06-30 Torvald Riegel <triegel@redhat.com>
1018 * libitm_i.h: Move parts to common.h and dispatch.h.
1019 * common.h: New file.
1020 * dispatch.h: New file, new dispatch class.
1021 Rename GTM::abi_dispatch::lock_type to ls_modifier.
1022 RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
1023 * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
1024 decision to retry.cc.
1025 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
1027 (GTM::gtm_transaction::decide_begin_dispatch): Same.
1028 * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
1030 * barrier.cc: Use new barriers definitions.
1031 (abi_dispatch::memmove_overlap_check): New.
1032 * config/x86/x86_sse.cc: Same.
1033 * config/x86/x86_avx.cc: Same.
1034 * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
1036 * Makefile.in: Rebuild.
1037 * method-readonly.cc: Remove.
1038 * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
1039 Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
1041 2011-06-30 Torvald Riegel <triegel@redhat.com>
1043 * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
1044 * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
1045 * testsuite/libitm.c/dropref-2.c: Same.
1046 * testsuite/libitm.c/dropref.c: Same.
1048 2011-06-30 Torvald Riegel <triegel@redhat.com>
1050 * config/generic/tls.h (gtm_disp): Rename to abi_disp.
1051 * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
1052 * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
1054 * barrier.tpl: Same.
1056 * config/generic/tls.h: Same.
1057 * config/x86/tls.h: Same.
1061 * method-readonly.cc: Same.
1062 * method-serial.cc: Same.
1063 * method-wbetl.cc: Same.
1066 2011-03-03 Richard Henderson <rth@redhat.com>
1068 * config/posix/rwlock.cc (write_upgrade): Add missing case.
1069 From Patrik Marlier <patrick.marlier@unine.ch>.
1071 2011-02-03 Richard Henderson <rth@redhat.com>
1073 * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
1074 * configure.ac: Use it.
1075 * configure, config.h.in: Rebuild.
1076 * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
1077 (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
1078 _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
1079 * libitm.map: Use wildcards to match size_t mangling.
1081 2010-12-14 Richard Henderson <rth@redhat.com>
1083 * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
1084 blocks of TIDs per thread.
1085 * config/generic/tls.h (struct gtm_thread): Add local_tid member.
1086 (setup_gtm_thr): Return the thread structure.
1087 * config/x86/tls.h (setup_gtm_thr): Likewise.
1089 2010-12-14 Richard Henderson <rth@redhat.com>
1091 * clone.cc (table_lock): Remove.
1092 (find_clone): Don't take it.
1093 (ExcludeTransaction): New helper class.
1094 (_ITM_registerTMCloneTable): Use it.
1095 (_ITM_deregisterTMCloneTable): Likewise.
1097 2010-12-14 Richard Henderson <rth@redhat.com>
1099 * config/x86/tls.h: New file.
1101 2010-07-15 Richard Henderson <rth@redhat.com>
1103 * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1104 * Makefile.in: Rebuild.
1106 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
1108 * method-wbetl.cc (trydropreference): Fix source line.
1110 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
1112 * libitm.h: Add comment.
1113 * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1115 2010-07-07 Aldy Hernandez <aldyh@redhat.com>
1117 * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1118 * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1119 available, use pthread mutexes.
1120 * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1121 * config.h.in: Regenerate.
1122 * configure: Regenerate.
1124 2010-07-06 Aldy Hernandez <aldyh@redhat.com>
1126 * libitm.h (ITM_PURE): Define.
1127 Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1129 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
1131 * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1132 (validate): Add comment.
1133 (trydropreference): New.
1134 * method-readonly.cc (class readonly_dispatch): Add
1136 * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1137 Call trydropreference().
1138 * libitm.h (_ITM_dropReferences): Remove const attribute.
1139 * method-serial.cc (class serial_dispatch): Add trydropreference.
1140 * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1142 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
1144 * memcpy.cc (do_memcpy): Comment.
1146 2010-06-25 Aldy Hernandez <aldyh@redhat.com>
1148 * barrier.tpl: Add comments throughout.
1150 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
1152 * method-wbetl.cc (struct w_entry): Add comments.
1156 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
1158 * alloc_c.cc (_ITM_dropReferences): New.
1159 * libitm.map (_ITM_dropReferences): Add.
1160 * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1161 * libitm_i.h (struct gtm_transaction): Declare
1162 drop_references_allocations and drop_references_local.
1163 * local.cc (rollback_local): Ignore memory when applicable.
1164 (drop_references_local): New.
1166 2010-06-23 Richard Henderson <rth@redhat.com>
1168 * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1169 memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1170 * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1171 * config/alpha/target.h: Likewise.
1172 * config/generic/tls.cc (gtm_mask_stack): Use it.
1174 2010-06-23 Richard Henderson <rth@redhat.com>
1176 * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1177 a mutex instead of trying a lock-free compare-and-swap on the list.
1178 (gtm_cacheline_page::operator delete): Likewise.
1180 2010-06-16 Richard Henderson <rth@redhat.com>
1182 * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1183 that overlap the libitm stack.
1184 * barrier.tpl: Mark incoming stack.
1185 * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1186 _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1187 * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1188 * memcpy.cc, memset.cc: Likewise.
1189 * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1190 * config/generic/tls.h (gtm_thread): Add stack_top member.
1191 (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1192 * libitm_i.h (gtm_mask_stack): Declare.
1193 * config/generic/tls.cc: New file.
1194 * Makefile.am (libitm_la_SOURCES): Add it.
1195 (AM_CXXFLAGS): Turn off exceptions.
1196 * Makefile.in: Rebuild.
1198 2010-06-16 Richard Henderson <rth@redhat.com>
1200 * alloc.cc (struct gtm_alloc_action): Move definition ...
1201 * libitm_i.h: ... here.
1202 (class gtm_transaction): Declare new and delete.
1203 * beginend.cc (alloc_tx): Reformulate as operator new.
1204 (free_tx): Reformulate as operator delete.
1205 * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1207 2010-06-11 Richard Henderson <rth@redhat.com>
1209 * clone.cc (clone_entry_compare): Fix typo.
1210 From Patrik Marlier <patrick.marlier@unine.ch>.
1212 2010-05-13 Richard Henderson <rth@redhat.com>
1214 * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1217 2010-05-07 Aldy Hernandez <aldyh@redhat.com>
1219 * libitm_i.h (struct gtm_transaction): Remove
1220 get_allocation_size.
1221 (record_allocation): Remove size parameter.
1222 * libitm.map (_ITM_realloc): Remove.
1223 * alloc_c.cc (_ITM_realloc): Remove.
1224 (_ITM_malloc): Remove size argument to record_allocation.
1225 (_ITM_calloc): Same.
1226 * alloc_cpp.cc (_ZGTtnwm): Same.
1227 (_ZGTtnwmRKSt9nothrow_t): Same.
1229 (_ZGTtnamRKSt9nothrow_t): Same.
1230 * alloc.cc (struct gtm_alloc_action): Remove size.
1231 (get_allocation_size): Remove.
1232 (commit_allocations): Add comment.
1233 (record_allocation): Remove size parameter.
1234 (forget_allocation): Remove set of size.
1236 2010-04-19 Aldy Hernandez <aldyh@redhat.com>
1238 * Makefile.am (abi_version): New.
1239 (AM_CXXFLAGS): Pass abi_version.
1240 * Makefile.in: Regenerate.
1241 * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1243 2010-04-06 Aldy Hernandez <aldyh@redhat.com>
1245 * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1246 _ITM_getTMCloneOrIrrevokable.
1247 * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1248 * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1250 2010-03-26 Aldy Hernandez <aldyh@redhat.com>
1252 * configure.ac: Remove Linux futex support.
1253 * configure.tgt (config_path): Same.
1254 * Makefile.am: Same.
1255 * config/linux: Remove entire directory.
1256 * configure: Rebuild.
1257 * Makefile.in: Rebuild.
1258 * testsuite/Makefile.in: Rebuild.
1260 2010-03-09 Aldy Hernandez <aldyh@redhat.com>
1262 * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1263 switching to serial mode.
1264 * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1266 2010-03-03 Aldy Hernandez <aldyh@redhat.com>
1268 * configure.tgt: Add emacs -*- tags.
1269 * barrier.tpl: Same.
1271 2010-02-23 Aldy Hernandez <aldyh@redhat.com>
1273 * Makefile.am: Rename serial.cc to method-serial.cc.
1274 * Makefile.in: Regenerate with automake 1.11.1.
1275 * testsuite/Makefile.in: Same.
1276 * aclocal.m4: Regenerate with aclocal 1.11.1.
1277 * method-serial.cc: Rename from serial.cc.
1278 * libitm_i.h (struct gtm_transaction): Update comment on
1281 2010-02-22 Aldy Hernandez <aldyh@redhat.com>
1283 * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1284 * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1286 2010-02-11 Aldy Hernandez <aldyh@redhat.com>
1288 * configure: Rebuild.
1290 2009-11-12 Richard Henderson <rth@redhat.com>
1292 * Rewrite everything in C++.
1294 2009-11-03 Richard Henderson <rth@redhat.com>
1296 * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1297 * Makefile.am (libitm_la_SOURCES): Add them.
1298 * configure.ac (ARCH_X86): New conditional.
1299 * Makefile.in, configure: Rebuild.
1300 * configure.tgt: Set up ARCH; do cflags setup at the same time.
1301 Move futex setup into "other system configury" case.
1302 * local.c (rollback_local): Merge into ...
1303 (GTM_rollback_local): ... here.
1304 (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1305 (_ITM_LB): Define as an alias to GTM_LB.
1307 2009-11-03 Richard Henderson <rth@redhat.com>
1309 * method-readonly.c: New file.
1310 * Makefile.am (libitm_la_SOURCES): Add it.
1311 * Makefile.in: Rebuild.
1312 * beginend.c (gtm_stmlock_array, gtm_clock): New.
1313 (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1314 * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1315 (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1316 gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1317 gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1318 gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1319 gtm_get_clock, gtm_inc_clock): New.
1320 * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1321 LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1322 LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1323 locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1324 replace uses with new libitm_i.h symbols.
1325 (dispatch_wbetl): Rename from wbetl_dispatch.
1326 * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1327 away from dispatch_readonly; abort if the beginTransaction call
1328 asserted that the transaction was readonly.
1330 2009-11-03 Richard Henderson <rth@redhat.com>
1332 * memset.c: New file.
1333 * Makefile.am (libitm_la_SOURCES): Add it.
1334 * Makefile.in: Rebuild.
1335 * testsuite/libitm.c/memset-1.c: New.
1337 2009-11-03 Richard Henderson <rth@redhat.com>
1339 * dispatch.c: Remove file.
1340 * useraction.c (struct gtm_user_action): Move from libitm.h.
1341 * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1342 (serial_memset, serial_memmove, serial_memcpy): Remove.
1343 (serial_W*, serial_R*): Remove.
1344 (serial_dispatch): Update to match.
1345 * configure.ac: Move Werror down below configure checks. Don't
1346 check for sys/loadavg.h, do check for malloc.h. Don't check for
1347 getloadavg and clock_gettime; do check for memalign, posix_memalign.
1348 Use GCC_AC_FUNC_MMAP_BLACKLIST
1349 * libitm.h: Split out all internal items to...
1350 * libitm_i.h: ... here. New file.
1351 * copymask.c: New file.
1352 * local.c (struct gtm_local_undo): Move from libitm.h.
1353 (GTM_alloc_local): Rename from alloc_local; export.
1354 * memcpy.c: New file.
1355 * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1356 * config/posix/page.c: New file.
1357 * config/posix/target_tls.h: Remove file.
1358 * barrier.c: New file.
1359 * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1361 * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1362 * method-wbetl.c: Rewrite for new cacheline methods.
1363 * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1365 * config/alpha/sjlj.S: Fix typo.
1366 * config/alpha/target_i.h: Copy functions from alpha/target.h.
1367 * config/alpha/copymask.c: New file.
1368 * config/alpha/target.h (CACHELINE_SIZE): New.
1369 (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1371 * config/x86/target_i.h: Copy functions from x86/target.h.
1372 * config/x86/copymask.c: New file.
1373 * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1374 (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1375 (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1376 * config/x86/target_tls.h: Move contents to target_i.h.
1378 * testsuite/libitm.c/clone-1.c: Include libitm.h.
1379 * testsuite/libitm.c/memcpy-1.c: New.
1381 2009-10-22 Richard Henderson <rth@redhat.com>
1383 * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1384 (AM_CCASFLAGS): New.
1385 * configure.ac: Add AM_PROG_AS. Use m4_rename_force for
1386 saving/restoring _AC_ARG_VAR_PRECIOUS.
1387 * Makefile.in, aclocal.m4, config.h.in, configure,
1388 testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1390 2009-10-22 Richard Henderson <rth@redhat.com>
1392 * testsuite/*: Update for new compiler syntax.
1394 2009-10-21 Richard Henderson <rth@redhat.com>
1396 * libitm.h (_ITM_abortReason): Add outerAbort.
1398 2009-08-03 Richard Henderson <rth@redhat.com>
1400 * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1401 _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1402 * method-wbetl.c (struct w_entry): Remove mask.
1403 (wbetl_write, wbetl_load): Return pointer to word containing the data;
1406 2009-07-22 Richard Henderson <rth@redhat.com>
1408 * eh_cpp.c: New file.
1409 * Makefile.am (libitm_la_SOURCES): Add it.
1410 * Makefile.in: Rebuild.
1411 * beginend.c (GTM_rollback_transaction): Undo exception state.
1412 (GTM_trycommit_transaction): Mark inline.
1413 (GTM_trycommit_and_finalize_transaction): Split out from ...
1414 (_ITM_commitTransaction): ... here.
1415 (_ITM_commitTransactionEH): New function.
1416 * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1417 cxa_unthrown, eh_in_flight; reorder.
1419 * testsuite/libitm.c++/c++.exp: New.
1420 * testsuite/libitm.c++/eh-1.C: New.
1422 * aatree.c (aa_free): Remove REGPARM.
1423 * aatree.h: Remove all REGPARM.
1425 2009-07-18 Richard Henderson <rth@redhat.com>
1427 * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1428 * Makefile.am (libitm_la_SOURCES): Add them.
1429 * Makefile.in: Rebuild.
1430 * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1431 (GTM_trycommit_transaction): Likewise.
1432 * libitm.h: Include aatree.h
1433 (struct gtm_alloc_action): New.
1434 (struct gtm_transaction): Add alloc_actions.
1435 (GTM_record_allocation, GTM_forget_allocation): Declare.
1436 (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1437 * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1438 _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1439 _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1440 _ZGTtdaPvRKSt9nothrow_t): Export.
1442 2009-07-18 Richard Henderson <rth@redhat.com>
1444 * target_tls.h: Move ...
1445 * config/posix/target_tls.h: ... here.
1447 2009-07-07 Richard Henderson <rth@redhat.com>
1449 * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1451 2009-07-07 Richard Henderson <rth@redhat.com>
1455 2009-07-07 Richard Henderson <rth@redhat.com>
1457 * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1458 * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1460 * configure.tgt: Don't use -ftls-model for x86 linux.
1461 * libitm.h: Include target.h after standard includes.
1462 (_gtm_thr): Rename from gtm_thr.
1463 (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1464 (gtm_disp, set_gtm_disp): New.
1465 * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1466 retry.c, serial.c, useraction.c: Use accessor functions throughout.
1467 * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1469 2009-07-07 Richard Henderson <rth@redhat.com>
1471 * config/linux/rwlock.c (EZ): New define. Use it throughout.
1473 2009-07-06 Richard Henderson <rth@redhat.com>
1475 * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1476 (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1477 (_ITM_beginTransaction): Take variadic arguments.
1478 (_ITM_registerThrownObject): Declare.
1479 * beginend.c, serial.c: Update.
1480 * libitm.map: Add _ITM_registerThrownObject.
1482 2009-01-28 Richard Henderson <rth@redhat.com>
1484 * Makefile.am (libitm_la_SOURCES): Add clone.c.
1485 * Makefile.in: Rebuild.
1486 * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1487 (GTM_restart_transaction): Fix uninstrumented code check.
1488 * retry.c (GTM_decide_retry_strategy): Add serial check.
1489 * serial.c (GTM_serialmode): Add irrevokable variable. Don't
1490 automatically go irrevokable when in serial mode.
1491 * clone.c: New file.
1492 * libitm.h, libitm.map: Update.
1494 2009-01-27 Richard Henderson <rth@redhat.com>
1496 * Makefile.am (LTCCASCOMPILE): Define.
1497 (libitm_la_SOURCES): Add methid-wbetl.c.
1498 * testsuite/Makefile.am: New
1499 * configure.ac: Add testsuite/Makefile.
1500 * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1501 * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1502 (_ITM_abortTransaction): Finalize implementation method; pass
1503 transaction properties to longjmp.
1504 (GTM_restart_transaction): Split out from ...
1505 (_ITM_commitTransaction): ... here.
1506 * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1507 Move to config/x86/target.h.
1508 * config/linux/alpha/futex_bits.h: New.
1509 * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1510 * config/x86/target.h: Disable target types for 32-bit.
1511 * config/alpha/sjlj.S, config/alpha/target.h: New.
1512 * libitm.h (struct gtm_dispatch): Add init, fini.
1513 (enum restart_reason): New.
1514 (struct gtm_transaction): Add method and restarts.
1515 * retry.c (GTM_decide_retry_strategy): Implement.
1516 * serial.c (serial_init, serial_fini): New.
1517 (GTM_serialmode): Finialize outgoing method.
1518 * method-wbetl.c: New.
1520 2008-12-09 Richard Henderson <rth@redhat.com>
1522 * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1523 * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1524 * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1525 * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1526 (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1527 (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1528 * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1529 * serial.c (serial_R##T, serial_W##T): Likewise.
1531 2008-11-21 Richard Henderson <rth@redhat.com>