1 2012-04-04 H.J. Lu <hongjiu.lu@intel.com>
4 * config/x86/target.h (gtm_jmpbuf): Replace long with long long
7 2012-04-03 Tristan Gingold <gingold@adacore.com>
9 * configure: Regenerate.
11 2012-03-31 H.J. Lu <hongjiu.lu@intel.com>
14 * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
16 2012-03-16 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
18 * testsuite/lib/libitm.exp: load fortran-modules.exp
20 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22 * configure.tgt (*-*-irix6*): Remove.
24 2012-03-13 Torvald Riegel <triegel@redhat.com>
27 * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
30 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
32 * configure.tgt (*-*-osf*): Remove.
33 * configure: Regenerate.
35 2012-03-05 Torvald Riegel <triegel@redhat.com>
37 * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
38 memtransfer/memset if size isn't larger than zero.
40 2012-03-02 Torvald Riegel <triegel@redhat.com>
42 * libitm.texi: Link to specification and add a usage example.
44 2012-02-24 Torvald Riegel <triegel@redhat.com>
46 * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
47 default dispatch for more than 1 thread to ml_wt.
49 2012-02-20 Torvald Riegel <triegel@redhat.com>
51 * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
53 2012-02-20 Torvald Riegel <triegel@redhat.com>
55 * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
57 2012-02-20 Torvald Riegel <triegel@redhat.com>
59 * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
60 serial mode corner cases made obsolete by prior gtm_rwlock changes.
61 (gl_wt_dispatch.rollback): Same.
63 2012-02-20 Torvald Riegel <triegel@redhat.com>
65 * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
67 2012-02-20 Torvald Riegel <triegel@redhat.com>
69 * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
70 for RfW src. Optimize number of calls to gtm_thr.
72 2012-02-20 Torvald Riegel <triegel@redhat.com>
74 * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
76 * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
77 (default_dispatch): Make atomic.
78 (GTM::gtm_thread::set_default_dispatch): Access atomically.
79 (GTM::gtm_thread::decide_retry_strategy): Access atomically and
80 use decide_begin_dispatch() if default_dispatch might have changed.
81 (GTM::gtm_thread::number_of_threads_changed): Initialize
82 default_dispatch here.
84 2012-02-15 Iain Sandoe <iains@gcc.gnu.org>
85 Patrick Marlier <patrick.marlier@gmail.com>
88 * alloc_cpp.cc: No dummy definitions for darwin.
89 * eh_cpp.cc: Likewise.
91 2012-02-14 Richard Henderson <rth@redhat.com>
93 * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
95 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
97 * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
99 2012-02-14 Torvald Riegel <triegel@redhat.com>
101 * libitm_i.h (GTM::gtm_rwlog_entry): New.
102 (GTM::gtm_thread): Add read and write logs.
103 (GTM::dispatch_ml_wt): Declare.
104 * retry.cc (parse_default_method): Support ml_wt.
105 * method-ml.cc: New file.
106 * Makefile.am: Add method-ml.cc.
107 * Makefile.in: Regenerate.
109 2012-02-14 Torvald Riegel <triegel@redhat.com>
111 * dispatch.h (GTM::abi_dispatch::supports): New.
112 (GTM::method_group::reinit): New.
113 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
114 (GTM::gtm_thread::number_of_threads_changed): Check that the method
115 supports the current situation.
117 2012-02-14 Torvald Riegel <triegel@redhat.com>
119 * util.cc (GTM::xcalloc): New.
120 * common.h (GTM::xcalloc): Declare.
122 2012-02-14 Eric Botcazou <ebotcazou@adacore.com>
124 * config/sparc/target.h (cpu_relax): Read from CC register.
125 * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
127 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
129 * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
131 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
133 * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
134 * config/sparc/cacheline.h: New file.
135 * config/sparc/target.h: Likewise.
136 * config/sparc/sjlj.S: Likewise.
137 * config/linux/sparc/futex_bits.h: Likewise.
139 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
141 * configure.ac (link_itm): Fix comment.
142 * configure: Regenerate.
143 * testsuite/lib/libitm.exp: Do not pass -litm for the link.
145 2012-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
148 * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
149 Correct libgomp references.
151 2012-01-24 Torvald Riegel <triegel@redhat.com>
153 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
156 2012-01-24 Uros Bizjak <ubizjak@gmail.com>
158 * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
160 * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
161 offset values. Do not copy return address. Decrement stack
163 (GTM_longjump) [__x86_64__]: Update offset values.
165 2012-01-23 Uros Bizjak <ubizjak@gmail.com>
168 * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
169 the first function argument to %eax.
171 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
173 * libitm.h (_ITM_getThreadnum): Remove.
174 * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
176 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
178 * clearcap.map: New file.
179 * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
180 * configure.ac: Call it.
181 Clear HWCAP_LDFLAGS if defaulting to -mavx.
182 * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
183 * configure: Regenerate.
184 * Makefile.in: Regenerate.
185 * testsuite/Makefile.in: Regenerate.
187 2012-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
190 * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
191 include, exclude options.
193 2012-01-14 Torvald Riegel <triegel@redhat.com>
195 * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
197 * containers.h (GTM::vector::set_size): New.
199 2012-01-14 Torvald Riegel <triegel@redhat.com>
202 * config/generic/tls.h (GTM::mask_stack_top): New.
203 (GTM::mask_stack_bottom): Declare.
204 * config/generic/tls.c (GTM::mask_stack_bottom): New.
205 * local.cc (gtm_undolog::rollback): Filter out any updates that
206 overlap the libitm stack. Add current transaction as parameter.
207 * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
208 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
209 * testsuite/libitm.c/stackundo.c: New test.
211 2012-01-10 Richard Henderson <rth@redhat.com>
213 * libitm_i.h (_Unwind_DeleteException): Declare weak.
214 * eh_cpp.cc (_Unwind_DeleteException): Define for
215 !HAVE_ELF_STYLE_WEAKREF.
217 2012-01-08 Torvald Riegel <triegel@redhat.com>
219 * local.cc (GTM_LB): Use GTM::gtm_undolog.
220 (GTM::gtm_thread::drop_references_undolog): Remove.
221 (GTM::gtm_thread::commit_undolog,
222 GTM::gtm_thread::rollback_undolog): Move to ...
223 * libitm_i.h (GTM::gtm_undolog): ...here. New.
224 (GTM::gtm_undolog_entry): Remove.
225 (GTM::gtm_thread): Adapt.
226 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
227 (GTM::gtm_thread::trycommit): Adapt.
228 * method-serial.cc (serial_dispatch::log): Adapt.
229 * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
230 (gl_wt_dispatch::store): Fix likely/unlikely.
231 * containers.h (GTM::vector::resize): Add additional_capacity
232 parameter and handle it.
233 (GTM::vector::resize_noinline): New/adapt.
234 (GTM::vector::push): New.
236 2012-01-06 Richard Henderson <rth@redhat.com>
238 * configure.tgt: Support powerpc-linux and powerpc-darwin.
239 * config/linux/powerpc/futex_bits.h: New file.
240 * config/powerpc/cacheline.h: New file.
241 * config/powerpc/sjlj.S: New file.
242 * config/powerpc/target.h: New file.
243 * config/generic/asmcfi.h (cfi_offset): New.
244 (cfi_restore, cfi_undefined): New.
246 2012-01-05 Aldy Hernandez <aldyh@redhat.com>
249 * testsuite/libitm.c/reentrant.c: Remove xfail.
250 (thread): Pass x to pure().
251 From Patrik Marlier <patrick.marlier@gmail.com>.
253 2011-12-24 Torvald Riegel <triegel@redhat.com>
255 * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
256 privatization safety if already in serial mode.
258 2011-12-24 Torvald Riegel <triegel@redhat.com>
260 * beginend.cc (GTM::gtm_thread::restart): Add and handle
261 finish_serial_upgrade parameter.
262 * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
263 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
264 Don't unset reader flag.
265 (GTM::gtm_rwlock::write_upgrade_finish): New.
266 * config/posix/rwlock.cc: Same.
267 * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
269 * config/posix/rwlock.h: Same.
270 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
271 flag after commit or after rollback when restarting.
273 2011-12-24 Torvald Riegel <triegel@redhat.com>
275 * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
276 (GTM::gtm_thread::try_commit): Changed memory order.
277 * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
279 * config/linux/x86/futex_bits.h (sys_futex0): Same.
280 * config/linux/sh/futex_bits.h (sys_futex0): Same.
281 * config/linux/futex_bits.h (sys_futex0): Same.
282 * config/linux/futex.cc (futex_wait, futex_wake): Same.
283 * config/linux/futex.h (futex_wait, futex_wake): Same.
284 * config/linux/rwlock.h (gtm_rwlock::writers,
285 gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
287 * config/linux/rwlock.cc (gtm_rwlock::read_lock,
288 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
289 gtm_rwlock::write_unlock): Fix memory orders and fences.
290 * config/posix/rwlock.cc (gtm_rwlock::read_lock,
291 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
292 gtm_rwlock::write_unlock): Same.
293 * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
294 * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
295 gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
297 (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
298 gl_wt_dispatch::load, gl_wt_dispatch::store,
299 gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
300 orders and fences. Add comments.
302 2011-12-21 Jakub Jelinek <jakub@redhat.com>
304 * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
305 * Makefile.in: Regenerated.
307 2011-12-17 Kaz Kojima <kkojima@gcc.gnu.org>
309 * configure.tgt: Add sh* case.
310 * config/sh/target.h: New file.
311 * config/sh/sjlj.S: New file.
312 * config/linux/sh/futex_bits.h: New file.
314 2011-12-14 Richard Henderson <rth@redhat.com>
316 * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
317 * config/arm/sjlj.S, config/arm/target.h: New files.
318 * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
319 (cfi_rel_offset): New.
320 * config/linux/futex_bits.h: New file.
321 * config/linux/futex.cc: Include futex_bits.h here...
322 * config/linux/futex.h: ... not here.
323 * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
324 * configure.ac (ARCH_AM): New conditional.
325 * Makefile.in, configure: Rebuild.
326 * configure.tgt: Handle ARM.
328 2011-12-13 Richard Henderson <rth@redhat.com>
330 * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
331 signed/unsigned comparison werror.
333 * local_atomic: New file.
334 * libitm_i.h: Include it.
335 (gtm_thread::shared_state): Use atomic template.
336 * beginend.cc (GTM::gtm_clock): Use atomic template.
337 (global_tid): Use atomic template if 64-bit atomics available.
338 (gtm_thread::gtm_thread): Update shared_state access.
339 (gtm_thread::trycommit): Likewise.
340 (choose_code_path): Update global_tid access.
341 * method-gl.cc (gl_mg::orec): Use atomic template. Update all users.
342 * stmlock.h (GTM::gtm_clock): Use atomic template.
343 (gtm_get_clock, gtm_inc_clock): Update accesses.
344 * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
345 redundant __sync_synchronize after atomic shared_state access.
346 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
347 (gtm_rwlock::write_lock_generic): Likewise.
348 (gtm_rwlock::read_unlock): Likewise.
349 * config/alpha/target.h (atomic_read_barrier): Remove.
350 (atomic_write_barrier): Remove.
351 * config/x86/target.h (atomic_read_barrier): Remove.
352 (atomic_write_barrier): Remove.
354 2011-11-30 Richard Henderson <rth@redhat.com>
356 * libitm_i.h (GTM_longjmp): Swap first and second arguments.
357 * beginend.c (_ITM_abortTransaction): Update to match.
358 (GTM::gtm_thread::restart): Likewise.
359 * config/alpha/sjlj.S (GTM_longjmp): Likewise.
360 * config/x86/sjlj.S (GTM_longjmp): Likewise.
362 2011-11-23 Iain Sandoe <iains@gcc.gnu.org>
364 * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
365 * Makefile.in: Regenerate.
367 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
369 * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
370 * alloc_cpp.cc: Generate dummy functions if we don't
371 HAVE_ELF_STYLE_WEAKREF.
372 * eh_cpp.cc: Likewise.
373 * configure: Regenerate.
374 * aclocal.m4: Likewise.
375 * config.h.in: Likewise.
376 * Makefile.in: Likewise.
377 * testsuite/Makefile.in: Likewise.
379 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
381 * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
382 __USER_LABEL_PREFIX__ for targets that use it.
383 (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
384 (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
385 in portability to non-elf targets.
386 (GTM_longjmp): Likewise.
387 * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
390 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
392 * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
393 * testsuite/libitm.c/memset-1.c: Likewise.
395 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
397 * configure: Regenerate.
399 2011-11-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
401 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
402 (LIBITM_ENABLE_SYMVERS): Handle sun style.
403 * Makefile.am: Handle sun style versioning.
404 (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
405 * configure: Regenerate.
406 * Makefile.in: Regenerate.
408 2011-11-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
410 * config/generic/asmcfi.h: Fix comment.
411 * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
412 sequence without .hidden support, error for non-ELF targets.
413 (GTM_longjmp) [__ELF__]: Only use .hidden if
414 HAVE_ATTRIBUTE_VISIBILITY.
416 2011-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
418 * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
419 _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
421 * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
422 __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
424 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
427 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
428 * configure: Regenerate.
430 2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
432 * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
434 2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
436 * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
438 (.note.GNU-stack): Only use if __linux__.
439 * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
440 * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
441 * testsuite/libitm.c/reentrant.c: Likewise.
442 * testsuite/libitm.c/simple-2.c: Likewise.
443 * testsuite/libitm.c/txrelease.c: Likewise.
444 * testsuite/libitm.c++/static_ctor.C: Likewise.
446 2011-11-10 Richard Henderson <rth@redhat.com>
448 * config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
449 * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
450 * configure.ac (ARCH_X86_AVX): New conditional.
451 * Makefile.in, configure: Rebuild.
453 2011-11-09 Richard Henderson <rth@redhat.com>
455 * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
456 * configure.ac: Use it.
457 * config.h.in, configure: Rebuild.
458 * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
460 2011-11-09 Richard Henderson <rth@redhat.com>
462 * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
463 * config/alpha/unaligned.h: Remove file.
464 * config/generic/unaligned.h: Remove file.
465 * config/x86/unaligned.h: Remove file.
466 * config/generic/cachepage.h: Remove file.
467 * config/posix/cachepage.cc: Remove file.
468 * config/generic/cacheline.cc: Remove file.
469 * config/x86/cacheline.cc: Remove file.
470 * config/generic/cacheline.h (gtm_cacheline): Remove the
471 store_mask, copy_mask, copy_mask_wb methods.
472 * config/x86/cacheline.h: Likewise.
473 * config/alpha/cacheline.h: Fall back to generic after setting size.
474 * config/generic/tls.cc (gtm_mask_stack): Remove.
475 * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
476 (GTM_vpalignr_table): Remove.
477 * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
478 (GTM_pshift_table): Remove.
479 * config/libitm_i.h: Don't include cachepage.h.
480 * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
481 * Makefile.in, testsuite/Makefile.in: Rebuild.
483 2011-11-09 Richard Henderson <rth@redhat.com>
485 * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
486 to emit branch prediction hint.
488 * config/x86/sjlj.S: Protect elf directives with __ELF__.
489 Protect .note.GNU-stack with __linux__.
491 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
492 * configure, aclocal.m4, config.h.in: Rebuild.
493 * config/generic/asmcfi.h: New file.
494 * config/x86/sjlj.S: Use it.
496 2011-11-08 Richard Henderson <rth@redhat.com>
498 * local.cc (_ITM_LB): Use a normal call, not a function alias.
500 2011-11-08 Richard Henderson <rth@redhat.com>
502 * configure.tgt: Test correct directory for supported cpus.
504 * configure.ac: Exit if unsupported.
505 * configure: Rebuild.
506 * configure.tgt: Delete boilerplate from libgomp for unsupported
507 targets. Set UNSUPPORTED for unsupported targets.
509 2011-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
511 * configure.tgt: Handle i386 like i[456]86.
512 * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
514 * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
515 !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
517 2011-11-05 Aldy Hernandez <aldyh@redhat.com>
519 * method-wbetl.cc: Update copyright notice.
526 * useraction.cc: Same.
530 * config/generic/tls.cc: Same.
531 * config/generic/cacheline.h: Same.
532 * config/generic/cachepage.h: Same.
533 * config/generic/cacheline.cc: Same.
534 * config/generic/unaligned.h: Same.
535 * config/x86/cacheline.h: Same.
536 * config/x86/cacheline.cc: Same.
537 * config/x86/unaligned.h: Same.
538 * config/alpha/cacheline.h: Same.
539 * config/alpha/unaligned.h: Same.
540 * config/alpha/sjlj.S: Same.
541 * config/posix/cachepage.cc: Same.
542 * config/linux/futex.h: Same.
543 * config/linux/alpha/futex_bits.h: Same.
545 2011-11-04 Torvald Riegel <triegel@redhat.com>
547 * libitm.texi: No cover text and invariant sections.
549 2011-11-03 Richard Henderson <rth@redhat.com>
551 * local_type_traits: New file.
552 * libitm_i.h: Use it. Use C headers, not C++ wrappers.
554 2011-11-03 Richard Henderson <rth@redhat.com>
556 * configure.ac: Don't test for gfortran.
557 * configure: Rebuild.
559 * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
560 * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
562 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
564 * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
565 * testsuite/libitm.c/memset-1.c: Same.
566 * testsuite/libitm.c/c.exp: Same.
567 * testsuite/lib/libitm-dg.exp: Same.
568 * testsuite/lib/libitm.exp: Same.
569 * testsuite/libitm.c++/c++.exp: Same.
571 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
573 * testsuite/config/default.exp: Update copyright date.
574 * configure.ac: Add copyright info.
575 * configure.tgt: Same.
577 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
579 * testsuite/libitm.c/reentrant.c: XFAIL.
580 * testsuite/libitm.c++/static_ctor.C: XFAIL.
582 2011-10-29 Torvald Riegel <triegel@redhat.com>
584 * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
586 (_ITM_abortTransaction): Handle aborts of outer transactions.
588 * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
589 * libitm.texi: Document aborts of outer transactions.
590 * testsuite/libitm.c/cancel.c: New file.
592 2011-10-19 Torvald Riegel <triegel@redhat.com>
594 * testsuite/*: Change __transaction to __transaction_atomic or
595 __transaction_relaxed.
597 2011-10-19 Torvald Riegel <triegel@redhat.com>
599 * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
602 2011-10-19 Torvald Riegel <triegel@redhat.com>
604 * libitm_i.h: Add gl_wt dispatch.
605 * retry.cc (parse_default_method): Same.
606 * method-gl.cc: New file.
607 * Makefile.am: Use method-gl.cc.
608 * Makefile.in: Rebuild.
610 2011-10-19 Torvald Riegel <triegel@redhat.com>
612 * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
613 safety if requested by a TM method.
614 * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
615 privatization safety.
616 * method-serial.cc: Same.
618 2011-10-19 Torvald Riegel <triegel@redhat.com>
620 * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
621 (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
622 undolog-related member functions from *_local to *_undolog.
623 * local.cc (gtm_thread::commit_undolog): Same.
624 * beginend.cc (GTM::gtm_thread::trycommit): Same.
625 (GTM::gtm_thread::rollback): Roll back undolog before
626 dispatch-specific rollback.
628 2011-10-19 Torvald Riegel <triegel@redhat.com>
630 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
631 re-initialization of the current method group.
632 * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
634 2011-10-19 Torvald Riegel <triegel@redhat.com>
636 * alloc.cc (commit_allocations_2): Do not free transaction-local
637 memory when committing a nested transaction.
639 2011-10-19 Torvald Riegel <triegel@redhat.com>
641 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
642 serial-irrevocable dispatch, not serial.
644 2011-10-19 Torvald Riegel <triegel@redhat.com>
646 * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
648 * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
649 * method-serial.cc: Implement begin_or_restart().
650 * beginend.cc (GTM::gtm_thread::begin_transaction): Call
651 dispatch-specific begin_or_restart().
652 (GTM::gtm_thread::restart): Same.
654 2011-08-23 Torvald Riegel <triegel@redhat.com>
656 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
657 restarting without switching to serial mode.
658 (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
659 transaction state. Choose closed-nesting alternative if available.
660 (GTM::gtm_thread::set_default_dispatch): New.
661 (parse_default_method): New.
662 (GTM::gtm_thread::number_of_threads_changed): New.
663 * method-serial.cc (GTM::serial_mg): New method group class.
664 (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
666 (GTM::serial_dispatch): Same.
667 (GTM::serialirr_onwrite_dispatch): Same.
668 (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
669 * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
671 (GTM::gtm_thread::gtm_thread): Same.
672 (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
673 (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
674 (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
675 choose dispatch but set state according to dispatch here.
676 * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
677 (GTM::method_group): New class.
678 (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
679 * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
680 * libitm.texi: Document TM methods, method groups, method life cycle.
681 Rename method sets to method groups.
683 2011-08-23 Torvald Riegel <triegel@redhat.com>
685 * config/x86/tls.h: Moved to ...
686 * config/linux/x86/tls.h: ... here.
688 2011-08-23 Torvald Riegel <triegel@redhat.com>
690 * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
692 * config/x86/sjlj.S: Same.
694 2011-08-19 Torvald Riegel <triegel@redhat.com>
696 * config/linux/rwlock.h: New file.
697 * config/linux/rwlock.c: New file.
698 * configure.ac: Reenable futex support (undo SVN rev 157758).
700 * configure.tgt: Same.
701 * config/linux/alpha/futex_bits.h: Same.
702 * config/linux/futex.h: Same. Return number of woken processes.
703 * config/linux/futex.cc: Same.
704 (futex_wait): Remove spinning.
705 * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
706 Use __x86_64__ instead of __LP64__.
707 * aclocal.m4: Include generic futex checks.
708 * configure: Rebuild.
709 * Makefile.in: Rebuild.
710 * testsuite/Makefile.in: Rebuild.
711 * beginend.cc: Include pthread.h.
712 * config/posix/cachepage.cc: Same.
714 2011-08-12 Torvald Riegel <triegel@redhat.com>
716 * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
717 (abi_disp, set_abi_disp): Move to tx's TLS slot.
719 * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
721 (GTM::gtm_thread::thread_num): Removed.
722 (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
723 * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
724 tx-to-thread renaming.
725 * beginend.cc: Adapted to tx-to-thread renaming.
726 (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
727 (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
728 * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
729 gtm_transaction to gtm_thread.
730 (_ITM_getThreadnum): Removed. Not supported anymore.
731 * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
732 * libitm.texi: Documented that _ITM_getThreadnum is not supported.
733 * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
734 gtm_tx-to-gtm_thr renaming if necessary.
741 * alloc_cpp.cc: Same.
742 * method-serial.cc: Same.
743 * config/generic/tls.cc: Same.
744 * config/posix/rwlock.h (gtm_rwlock): Same.
745 * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
747 2011-08-12 Torvald Riegel <triegel@redhat.com>
749 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
751 (gtm_rwlock::read_unlock): Same.
752 (gtm_rwlock::write_lock_generic): New. Generalized from ...
753 (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
754 * libitm_i.h (GTM::gtm_transaction): Added shared_state.
755 * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
756 w_upgrade. Replaced by per-transaction flags (in shared_state).
757 Added c_confirmed_writers.
758 (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
759 GTM::gtm_rwlock::write_upgrade): Add tx parameter.
760 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
761 * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
762 * beginend.cc (GTM::gtm_transaction::begin_transaction,
763 _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
764 * libitm.texi: Document locking conventions and implementations in
767 2011-08-12 Torvald Riegel <triegel@redhat.com>
769 * libitm_i.h (next_tx): Add list of all threads' transaction.
770 * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
771 transaction with list of transactions and ...
772 (thread_exit_handler): ... deregister here.
773 * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
774 * config/x86/target.h: Same.
776 2011-08-12 Torvald Riegel <triegel@redhat.com>
778 * testsuite/libitm.c++/static_ctor.C: New file.
780 2011-08-12 Torvald Riegel <triegel@redhat.com>
782 * testsuite/libitm.c/reentrant.c: New file.
784 2011-08-12 Torvald Riegel <triegel@redhat.com>
786 * config/generic/tls.h: Remove the free list for transactions and ...
787 * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
788 (GTM::gtm_transaction::operator delete): ... and release here.
789 (thread_exit_handler): New. Delete tx when thread terminates.
790 (thread_exit_init): New.
791 (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
792 * testsuite/libitm.c/txrelease.c: New file.
794 2011-08-12 Torvald Riegel <triegel@redhat.com>
796 * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
797 * testsuite/libitm.c/notx.c: New file.
799 2011-08-12 Torvald Riegel <triegel@redhat.com>
801 * config/generic/tls.h (gtm_thread): Move local_tid from here ...
802 * libitm_i.h (local_tid): ... to here.
803 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
804 (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
806 2011-08-12 Torvald Riegel <triegel@redhat.com>
808 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
809 serialirr_onwrite_dispatch as new default for now.
810 * method-serial.cc (serialirr_onwrite_dispatch): New.
811 (GTM::dispatch_serialirr_onwrite): New.
814 2011-08-12 Torvald Riegel <triegel@redhat.com>
816 * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
817 * query.cc (_ITM_getTransactionId): There is no active transaction if
818 the current nesting level is zero.
820 2011-07-28 Torvald Riegel <triegel@redhat.com>
822 * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
825 2011-07-28 Torvald Riegel <triegel@redhat.com>
827 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
828 transaction properties from the caller instead of from the
831 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
833 2011-07-28 Torvald Riegel <triegel@redhat.com>
835 * local.cc (gtm_transaction::rollback_local): Support closed nesting.
836 * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
838 * method-serial.cc: Same.
839 * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
840 flat nesting as default, and closed nesting on demand.
841 (GTM::gtm_transaction::rollback): Same.
842 (_ITM_abortTransaction): Same.
843 (GTM::gtm_transaction::restart): Same.
844 (GTM::gtm_transaction::trycommit): Same.
845 (GTM::gtm_transaction::trycommit_and_finalize): Removed.
846 (choose_code_path): New.
847 (GTM::gtm_transaction_cp::save): New.
848 (GTM::gtm_transaction_cp::commit): New.
849 * query.cc (_ITM_inTransaction): Support flat nesting.
850 * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
851 (GTM::gtm_transaction): Support flat and closed nesting.
852 * alloc.cc (commit_allocations_2): New.
853 (commit_cb_data): New helper struct.
854 (GTM::gtm_transaction::commit_allocations): Handle nested
856 * libitm.texi: Update user action section, add description of nesting.
858 2011-07-28 Torvald Riegel <triegel@redhat.com>
860 * libitm_i.h: Add closed nesting as restart reason.
861 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
863 2011-07-28 Torvald Riegel <triegel@redhat.com>
865 * useraction.cc: Use vector instead of list to store actions.
866 Also support partial rollbacks for closed nesting.
867 * libitm_i.h (GTM::gtm_transaction::user_action): Same.
870 2011-07-28 Torvald Riegel <triegel@redhat.com>
872 * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
873 closed_nesting flags, as well as a closed nesting alternative.
874 * method-serial.cc: Same.
875 (serial_dispatch): Renamed to serialirr_dispatch.
876 (GTM::dispatch_serialirr): Same.
877 (serial_dispatch_ul): Renamed to serial_dispatch.
878 (GTM::dispatch_serial): Same.
880 2011-07-28 Torvald Riegel <triegel@redhat.com>
882 * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
884 2011-07-28 Torvald Riegel <triegel@redhat.com>
886 * aatree.h (aa_tree::remove): New.
887 (aa_tree::operator new): Add placement new.
889 2011-07-02 Torvald Riegel <triegel@redhat.com>
891 * containers.h: New file.
892 * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
893 * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
894 * common.h: ... to here.
895 (local_undo): Use GTM::vector for gtm_transaction::local_undo.
898 2011-06-30 Torvald Riegel <triegel@redhat.com>
900 * libitm_i.h (STATE_ABORTING): Remove.
901 * beginend.cc (_ITM_abortTransaction): Same.
902 (GTM::gtm_transaction::trycommit_and_finalize): Same.
903 * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
904 (_ITM_rollbackTransaction): Remove.
907 * libitm.texi: Document these ABI changes.
909 2011-06-30 Torvald Riegel <triegel@redhat.com>
911 * libitm.texi: New file.
912 * Makefile.am: Add libitm.texi.
913 * Makefile.in: Rebuild.
915 2011-06-30 Torvald Riegel <triegel@redhat.com>
917 * libitm_i.h: Move parts to common.h and dispatch.h.
918 * common.h: New file.
919 * dispatch.h: New file, new dispatch class.
920 Rename GTM::abi_dispatch::lock_type to ls_modifier.
921 RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
922 * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
923 decision to retry.cc.
924 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
926 (GTM::gtm_transaction::decide_begin_dispatch): Same.
927 * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
929 * barrier.cc: Use new barriers definitions.
930 (abi_dispatch::memmove_overlap_check): New.
931 * config/x86/x86_sse.cc: Same.
932 * config/x86/x86_avx.cc: Same.
933 * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
935 * Makefile.in: Rebuild.
936 * method-readonly.cc: Remove.
937 * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
938 Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
940 2011-06-30 Torvald Riegel <triegel@redhat.com>
942 * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
943 * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
944 * testsuite/libitm.c/dropref-2.c: Same.
945 * testsuite/libitm.c/dropref.c: Same.
947 2011-06-30 Torvald Riegel <triegel@redhat.com>
949 * config/generic/tls.h (gtm_disp): Rename to abi_disp.
950 * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
951 * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
955 * config/generic/tls.h: Same.
956 * config/x86/tls.h: Same.
960 * method-readonly.cc: Same.
961 * method-serial.cc: Same.
962 * method-wbetl.cc: Same.
965 2011-03-03 Richard Henderson <rth@redhat.com>
967 * config/posix/rwlock.cc (write_upgrade): Add missing case.
968 From Patrik Marlier <patrick.marlier@unine.ch>.
970 2011-02-03 Richard Henderson <rth@redhat.com>
972 * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
973 * configure.ac: Use it.
974 * configure, config.h.in: Rebuild.
975 * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
976 (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
977 _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
978 * libitm.map: Use wildcards to match size_t mangling.
980 2010-12-14 Richard Henderson <rth@redhat.com>
982 * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
983 blocks of TIDs per thread.
984 * config/generic/tls.h (struct gtm_thread): Add local_tid member.
985 (setup_gtm_thr): Return the thread structure.
986 * config/x86/tls.h (setup_gtm_thr): Likewise.
988 2010-12-14 Richard Henderson <rth@redhat.com>
990 * clone.cc (table_lock): Remove.
991 (find_clone): Don't take it.
992 (ExcludeTransaction): New helper class.
993 (_ITM_registerTMCloneTable): Use it.
994 (_ITM_deregisterTMCloneTable): Likewise.
996 2010-12-14 Richard Henderson <rth@redhat.com>
998 * config/x86/tls.h: New file.
1000 2010-07-15 Richard Henderson <rth@redhat.com>
1002 * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1003 * Makefile.in: Rebuild.
1005 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
1007 * method-wbetl.cc (trydropreference): Fix source line.
1009 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
1011 * libitm.h: Add comment.
1012 * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1014 2010-07-07 Aldy Hernandez <aldyh@redhat.com>
1016 * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1017 * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1018 available, use pthread mutexes.
1019 * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1020 * config.h.in: Regenerate.
1021 * configure: Regenerate.
1023 2010-07-06 Aldy Hernandez <aldyh@redhat.com>
1025 * libitm.h (ITM_PURE): Define.
1026 Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1028 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
1030 * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1031 (validate): Add comment.
1032 (trydropreference): New.
1033 * method-readonly.cc (class readonly_dispatch): Add
1035 * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1036 Call trydropreference().
1037 * libitm.h (_ITM_dropReferences): Remove const attribute.
1038 * method-serial.cc (class serial_dispatch): Add trydropreference.
1039 * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1041 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
1043 * memcpy.cc (do_memcpy): Comment.
1045 2010-06-25 Aldy Hernandez <aldyh@redhat.com>
1047 * barrier.tpl: Add comments throughout.
1049 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
1051 * method-wbetl.cc (struct w_entry): Add comments.
1055 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
1057 * alloc_c.cc (_ITM_dropReferences): New.
1058 * libitm.map (_ITM_dropReferences): Add.
1059 * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1060 * libitm_i.h (struct gtm_transaction): Declare
1061 drop_references_allocations and drop_references_local.
1062 * local.cc (rollback_local): Ignore memory when applicable.
1063 (drop_references_local): New.
1065 2010-06-23 Richard Henderson <rth@redhat.com>
1067 * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1068 memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1069 * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1070 * config/alpha/target.h: Likewise.
1071 * config/generic/tls.cc (gtm_mask_stack): Use it.
1073 2010-06-23 Richard Henderson <rth@redhat.com>
1075 * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1076 a mutex instead of trying a lock-free compare-and-swap on the list.
1077 (gtm_cacheline_page::operator delete): Likewise.
1079 2010-06-16 Richard Henderson <rth@redhat.com>
1081 * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1082 that overlap the libitm stack.
1083 * barrier.tpl: Mark incoming stack.
1084 * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1085 _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1086 * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1087 * memcpy.cc, memset.cc: Likewise.
1088 * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1089 * config/generic/tls.h (gtm_thread): Add stack_top member.
1090 (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1091 * libitm_i.h (gtm_mask_stack): Declare.
1092 * config/generic/tls.cc: New file.
1093 * Makefile.am (libitm_la_SOURCES): Add it.
1094 (AM_CXXFLAGS): Turn off exceptions.
1095 * Makefile.in: Rebuild.
1097 2010-06-16 Richard Henderson <rth@redhat.com>
1099 * alloc.cc (struct gtm_alloc_action): Move definition ...
1100 * libitm_i.h: ... here.
1101 (class gtm_transaction): Declare new and delete.
1102 * beginend.cc (alloc_tx): Reformulate as operator new.
1103 (free_tx): Reformulate as operator delete.
1104 * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1106 2010-06-11 Richard Henderson <rth@redhat.com>
1108 * clone.cc (clone_entry_compare): Fix typo.
1109 From Patrik Marlier <patrick.marlier@unine.ch>.
1111 2010-05-13 Richard Henderson <rth@redhat.com>
1113 * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1116 2010-05-07 Aldy Hernandez <aldyh@redhat.com>
1118 * libitm_i.h (struct gtm_transaction): Remove
1119 get_allocation_size.
1120 (record_allocation): Remove size parameter.
1121 * libitm.map (_ITM_realloc): Remove.
1122 * alloc_c.cc (_ITM_realloc): Remove.
1123 (_ITM_malloc): Remove size argument to record_allocation.
1124 (_ITM_calloc): Same.
1125 * alloc_cpp.cc (_ZGTtnwm): Same.
1126 (_ZGTtnwmRKSt9nothrow_t): Same.
1128 (_ZGTtnamRKSt9nothrow_t): Same.
1129 * alloc.cc (struct gtm_alloc_action): Remove size.
1130 (get_allocation_size): Remove.
1131 (commit_allocations): Add comment.
1132 (record_allocation): Remove size parameter.
1133 (forget_allocation): Remove set of size.
1135 2010-04-19 Aldy Hernandez <aldyh@redhat.com>
1137 * Makefile.am (abi_version): New.
1138 (AM_CXXFLAGS): Pass abi_version.
1139 * Makefile.in: Regenerate.
1140 * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1142 2010-04-06 Aldy Hernandez <aldyh@redhat.com>
1144 * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1145 _ITM_getTMCloneOrIrrevokable.
1146 * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1147 * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1149 2010-03-26 Aldy Hernandez <aldyh@redhat.com>
1151 * configure.ac: Remove Linux futex support.
1152 * configure.tgt (config_path): Same.
1153 * Makefile.am: Same.
1154 * config/linux: Remove entire directory.
1155 * configure: Rebuild.
1156 * Makefile.in: Rebuild.
1157 * testsuite/Makefile.in: Rebuild.
1159 2010-03-09 Aldy Hernandez <aldyh@redhat.com>
1161 * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1162 switching to serial mode.
1163 * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1165 2010-03-03 Aldy Hernandez <aldyh@redhat.com>
1167 * configure.tgt: Add emacs -*- tags.
1168 * barrier.tpl: Same.
1170 2010-02-23 Aldy Hernandez <aldyh@redhat.com>
1172 * Makefile.am: Rename serial.cc to method-serial.cc.
1173 * Makefile.in: Regenerate with automake 1.11.1.
1174 * testsuite/Makefile.in: Same.
1175 * aclocal.m4: Regenerate with aclocal 1.11.1.
1176 * method-serial.cc: Rename from serial.cc.
1177 * libitm_i.h (struct gtm_transaction): Update comment on
1180 2010-02-22 Aldy Hernandez <aldyh@redhat.com>
1182 * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1183 * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1185 2010-02-11 Aldy Hernandez <aldyh@redhat.com>
1187 * configure: Rebuild.
1189 2009-11-12 Richard Henderson <rth@redhat.com>
1191 * Rewrite everything in C++.
1193 2009-11-03 Richard Henderson <rth@redhat.com>
1195 * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1196 * Makefile.am (libitm_la_SOURCES): Add them.
1197 * configure.ac (ARCH_X86): New conditional.
1198 * Makefile.in, configure: Rebuild.
1199 * configure.tgt: Set up ARCH; do cflags setup at the same time.
1200 Move futex setup into "other system configury" case.
1201 * local.c (rollback_local): Merge into ...
1202 (GTM_rollback_local): ... here.
1203 (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1204 (_ITM_LB): Define as an alias to GTM_LB.
1206 2009-11-03 Richard Henderson <rth@redhat.com>
1208 * method-readonly.c: New file.
1209 * Makefile.am (libitm_la_SOURCES): Add it.
1210 * Makefile.in: Rebuild.
1211 * beginend.c (gtm_stmlock_array, gtm_clock): New.
1212 (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1213 * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1214 (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1215 gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1216 gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1217 gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1218 gtm_get_clock, gtm_inc_clock): New.
1219 * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1220 LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1221 LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1222 locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1223 replace uses with new libitm_i.h symbols.
1224 (dispatch_wbetl): Rename from wbetl_dispatch.
1225 * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1226 away from dispatch_readonly; abort if the beginTransaction call
1227 asserted that the transaction was readonly.
1229 2009-11-03 Richard Henderson <rth@redhat.com>
1231 * memset.c: New file.
1232 * Makefile.am (libitm_la_SOURCES): Add it.
1233 * Makefile.in: Rebuild.
1234 * testsuite/libitm.c/memset-1.c: New.
1236 2009-11-03 Richard Henderson <rth@redhat.com>
1238 * dispatch.c: Remove file.
1239 * useraction.c (struct gtm_user_action): Move from libitm.h.
1240 * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1241 (serial_memset, serial_memmove, serial_memcpy): Remove.
1242 (serial_W*, serial_R*): Remove.
1243 (serial_dispatch): Update to match.
1244 * configure.ac: Move Werror down below configure checks. Don't
1245 check for sys/loadavg.h, do check for malloc.h. Don't check for
1246 getloadavg and clock_gettime; do check for memalign, posix_memalign.
1247 Use GCC_AC_FUNC_MMAP_BLACKLIST
1248 * libitm.h: Split out all internal items to...
1249 * libitm_i.h: ... here. New file.
1250 * copymask.c: New file.
1251 * local.c (struct gtm_local_undo): Move from libitm.h.
1252 (GTM_alloc_local): Rename from alloc_local; export.
1253 * memcpy.c: New file.
1254 * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1255 * config/posix/page.c: New file.
1256 * config/posix/target_tls.h: Remove file.
1257 * barrier.c: New file.
1258 * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1260 * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1261 * method-wbetl.c: Rewrite for new cacheline methods.
1262 * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1264 * config/alpha/sjlj.S: Fix typo.
1265 * config/alpha/target_i.h: Copy functions from alpha/target.h.
1266 * config/alpha/copymask.c: New file.
1267 * config/alpha/target.h (CACHELINE_SIZE): New.
1268 (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1270 * config/x86/target_i.h: Copy functions from x86/target.h.
1271 * config/x86/copymask.c: New file.
1272 * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1273 (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1274 (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1275 * config/x86/target_tls.h: Move contents to target_i.h.
1277 * testsuite/libitm.c/clone-1.c: Include libitm.h.
1278 * testsuite/libitm.c/memcpy-1.c: New.
1280 2009-10-22 Richard Henderson <rth@redhat.com>
1282 * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1283 (AM_CCASFLAGS): New.
1284 * configure.ac: Add AM_PROG_AS. Use m4_rename_force for
1285 saving/restoring _AC_ARG_VAR_PRECIOUS.
1286 * Makefile.in, aclocal.m4, config.h.in, configure,
1287 testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1289 2009-10-22 Richard Henderson <rth@redhat.com>
1291 * testsuite/*: Update for new compiler syntax.
1293 2009-10-21 Richard Henderson <rth@redhat.com>
1295 * libitm.h (_ITM_abortReason): Add outerAbort.
1297 2009-08-03 Richard Henderson <rth@redhat.com>
1299 * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1300 _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1301 * method-wbetl.c (struct w_entry): Remove mask.
1302 (wbetl_write, wbetl_load): Return pointer to word containing the data;
1305 2009-07-22 Richard Henderson <rth@redhat.com>
1307 * eh_cpp.c: New file.
1308 * Makefile.am (libitm_la_SOURCES): Add it.
1309 * Makefile.in: Rebuild.
1310 * beginend.c (GTM_rollback_transaction): Undo exception state.
1311 (GTM_trycommit_transaction): Mark inline.
1312 (GTM_trycommit_and_finalize_transaction): Split out from ...
1313 (_ITM_commitTransaction): ... here.
1314 (_ITM_commitTransactionEH): New function.
1315 * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1316 cxa_unthrown, eh_in_flight; reorder.
1318 * testsuite/libitm.c++/c++.exp: New.
1319 * testsuite/libitm.c++/eh-1.C: New.
1321 * aatree.c (aa_free): Remove REGPARM.
1322 * aatree.h: Remove all REGPARM.
1324 2009-07-18 Richard Henderson <rth@redhat.com>
1326 * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1327 * Makefile.am (libitm_la_SOURCES): Add them.
1328 * Makefile.in: Rebuild.
1329 * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1330 (GTM_trycommit_transaction): Likewise.
1331 * libitm.h: Include aatree.h
1332 (struct gtm_alloc_action): New.
1333 (struct gtm_transaction): Add alloc_actions.
1334 (GTM_record_allocation, GTM_forget_allocation): Declare.
1335 (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1336 * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1337 _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1338 _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1339 _ZGTtdaPvRKSt9nothrow_t): Export.
1341 2009-07-18 Richard Henderson <rth@redhat.com>
1343 * target_tls.h: Move ...
1344 * config/posix/target_tls.h: ... here.
1346 2009-07-07 Richard Henderson <rth@redhat.com>
1348 * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1350 2009-07-07 Richard Henderson <rth@redhat.com>
1354 2009-07-07 Richard Henderson <rth@redhat.com>
1356 * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1357 * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1359 * configure.tgt: Don't use -ftls-model for x86 linux.
1360 * libitm.h: Include target.h after standard includes.
1361 (_gtm_thr): Rename from gtm_thr.
1362 (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1363 (gtm_disp, set_gtm_disp): New.
1364 * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1365 retry.c, serial.c, useraction.c: Use accessor functions throughout.
1366 * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1368 2009-07-07 Richard Henderson <rth@redhat.com>
1370 * config/linux/rwlock.c (EZ): New define. Use it throughout.
1372 2009-07-06 Richard Henderson <rth@redhat.com>
1374 * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1375 (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1376 (_ITM_beginTransaction): Take variadic arguments.
1377 (_ITM_registerThrownObject): Declare.
1378 * beginend.c, serial.c: Update.
1379 * libitm.map: Add _ITM_registerThrownObject.
1381 2009-01-28 Richard Henderson <rth@redhat.com>
1383 * Makefile.am (libitm_la_SOURCES): Add clone.c.
1384 * Makefile.in: Rebuild.
1385 * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1386 (GTM_restart_transaction): Fix uninstrumented code check.
1387 * retry.c (GTM_decide_retry_strategy): Add serial check.
1388 * serial.c (GTM_serialmode): Add irrevokable variable. Don't
1389 automatically go irrevokable when in serial mode.
1390 * clone.c: New file.
1391 * libitm.h, libitm.map: Update.
1393 2009-01-27 Richard Henderson <rth@redhat.com>
1395 * Makefile.am (LTCCASCOMPILE): Define.
1396 (libitm_la_SOURCES): Add methid-wbetl.c.
1397 * testsuite/Makefile.am: New
1398 * configure.ac: Add testsuite/Makefile.
1399 * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1400 * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1401 (_ITM_abortTransaction): Finalize implementation method; pass
1402 transaction properties to longjmp.
1403 (GTM_restart_transaction): Split out from ...
1404 (_ITM_commitTransaction): ... here.
1405 * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1406 Move to config/x86/target.h.
1407 * config/linux/alpha/futex_bits.h: New.
1408 * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1409 * config/x86/target.h: Disable target types for 32-bit.
1410 * config/alpha/sjlj.S, config/alpha/target.h: New.
1411 * libitm.h (struct gtm_dispatch): Add init, fini.
1412 (enum restart_reason): New.
1413 (struct gtm_transaction): Add method and restarts.
1414 * retry.c (GTM_decide_retry_strategy): Implement.
1415 * serial.c (serial_init, serial_fini): New.
1416 (GTM_serialmode): Finialize outgoing method.
1417 * method-wbetl.c: New.
1419 2008-12-09 Richard Henderson <rth@redhat.com>
1421 * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1422 * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1423 * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1424 * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1425 (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1426 (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1427 * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1428 * serial.c (serial_R##T, serial_W##T): Likewise.
1430 2008-11-21 Richard Henderson <rth@redhat.com>