1 2012-05-21 Patrick Marlier <patrick.marlier@gmail.com>
3 * eh_cpp.cc: Fix __cxa_end_catch declaration.
5 2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
7 * configure: Regenerated.
9 2012-04-04 H.J. Lu <hongjiu.lu@intel.com>
12 * config/x86/target.h (gtm_jmpbuf): Replace long with long long
15 2012-04-03 Tristan Gingold <gingold@adacore.com>
17 * configure: Regenerate.
19 2012-03-31 H.J. Lu <hongjiu.lu@intel.com>
22 * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
24 2012-03-16 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
26 * testsuite/lib/libitm.exp: load fortran-modules.exp
28 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30 * configure.tgt (*-*-irix6*): Remove.
32 2012-03-13 Torvald Riegel <triegel@redhat.com>
35 * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
38 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
40 * configure.tgt (*-*-osf*): Remove.
41 * configure: Regenerate.
43 2012-03-05 Torvald Riegel <triegel@redhat.com>
45 * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
46 memtransfer/memset if size isn't larger than zero.
48 2012-03-02 Torvald Riegel <triegel@redhat.com>
50 * libitm.texi: Link to specification and add a usage example.
52 2012-02-24 Torvald Riegel <triegel@redhat.com>
54 * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
55 default dispatch for more than 1 thread to ml_wt.
57 2012-02-20 Torvald Riegel <triegel@redhat.com>
59 * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
61 2012-02-20 Torvald Riegel <triegel@redhat.com>
63 * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
65 2012-02-20 Torvald Riegel <triegel@redhat.com>
67 * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
68 serial mode corner cases made obsolete by prior gtm_rwlock changes.
69 (gl_wt_dispatch.rollback): Same.
71 2012-02-20 Torvald Riegel <triegel@redhat.com>
73 * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
75 2012-02-20 Torvald Riegel <triegel@redhat.com>
77 * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
78 for RfW src. Optimize number of calls to gtm_thr.
80 2012-02-20 Torvald Riegel <triegel@redhat.com>
82 * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
84 * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
85 (default_dispatch): Make atomic.
86 (GTM::gtm_thread::set_default_dispatch): Access atomically.
87 (GTM::gtm_thread::decide_retry_strategy): Access atomically and
88 use decide_begin_dispatch() if default_dispatch might have changed.
89 (GTM::gtm_thread::number_of_threads_changed): Initialize
90 default_dispatch here.
92 2012-02-15 Iain Sandoe <iains@gcc.gnu.org>
93 Patrick Marlier <patrick.marlier@gmail.com>
96 * alloc_cpp.cc: No dummy definitions for darwin.
97 * eh_cpp.cc: Likewise.
99 2012-02-14 Richard Henderson <rth@redhat.com>
101 * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
103 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
105 * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
107 2012-02-14 Torvald Riegel <triegel@redhat.com>
109 * libitm_i.h (GTM::gtm_rwlog_entry): New.
110 (GTM::gtm_thread): Add read and write logs.
111 (GTM::dispatch_ml_wt): Declare.
112 * retry.cc (parse_default_method): Support ml_wt.
113 * method-ml.cc: New file.
114 * Makefile.am: Add method-ml.cc.
115 * Makefile.in: Regenerate.
117 2012-02-14 Torvald Riegel <triegel@redhat.com>
119 * dispatch.h (GTM::abi_dispatch::supports): New.
120 (GTM::method_group::reinit): New.
121 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
122 (GTM::gtm_thread::number_of_threads_changed): Check that the method
123 supports the current situation.
125 2012-02-14 Torvald Riegel <triegel@redhat.com>
127 * util.cc (GTM::xcalloc): New.
128 * common.h (GTM::xcalloc): Declare.
130 2012-02-14 Eric Botcazou <ebotcazou@adacore.com>
132 * config/sparc/target.h (cpu_relax): Read from CC register.
133 * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
135 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
137 * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
139 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
141 * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
142 * config/sparc/cacheline.h: New file.
143 * config/sparc/target.h: Likewise.
144 * config/sparc/sjlj.S: Likewise.
145 * config/linux/sparc/futex_bits.h: Likewise.
147 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
149 * configure.ac (link_itm): Fix comment.
150 * configure: Regenerate.
151 * testsuite/lib/libitm.exp: Do not pass -litm for the link.
153 2012-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
156 * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
157 Correct libgomp references.
159 2012-01-24 Torvald Riegel <triegel@redhat.com>
161 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
164 2012-01-24 Uros Bizjak <ubizjak@gmail.com>
166 * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
168 * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
169 offset values. Do not copy return address. Decrement stack
171 (GTM_longjump) [__x86_64__]: Update offset values.
173 2012-01-23 Uros Bizjak <ubizjak@gmail.com>
176 * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
177 the first function argument to %eax.
179 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
181 * libitm.h (_ITM_getThreadnum): Remove.
182 * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
184 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
186 * clearcap.map: New file.
187 * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
188 * configure.ac: Call it.
189 Clear HWCAP_LDFLAGS if defaulting to -mavx.
190 * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
191 * configure: Regenerate.
192 * Makefile.in: Regenerate.
193 * testsuite/Makefile.in: Regenerate.
195 2012-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
198 * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
199 include, exclude options.
201 2012-01-14 Torvald Riegel <triegel@redhat.com>
203 * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
205 * containers.h (GTM::vector::set_size): New.
207 2012-01-14 Torvald Riegel <triegel@redhat.com>
210 * config/generic/tls.h (GTM::mask_stack_top): New.
211 (GTM::mask_stack_bottom): Declare.
212 * config/generic/tls.c (GTM::mask_stack_bottom): New.
213 * local.cc (gtm_undolog::rollback): Filter out any updates that
214 overlap the libitm stack. Add current transaction as parameter.
215 * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
216 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
217 * testsuite/libitm.c/stackundo.c: New test.
219 2012-01-10 Richard Henderson <rth@redhat.com>
221 * libitm_i.h (_Unwind_DeleteException): Declare weak.
222 * eh_cpp.cc (_Unwind_DeleteException): Define for
223 !HAVE_ELF_STYLE_WEAKREF.
225 2012-01-08 Torvald Riegel <triegel@redhat.com>
227 * local.cc (GTM_LB): Use GTM::gtm_undolog.
228 (GTM::gtm_thread::drop_references_undolog): Remove.
229 (GTM::gtm_thread::commit_undolog,
230 GTM::gtm_thread::rollback_undolog): Move to ...
231 * libitm_i.h (GTM::gtm_undolog): ...here. New.
232 (GTM::gtm_undolog_entry): Remove.
233 (GTM::gtm_thread): Adapt.
234 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
235 (GTM::gtm_thread::trycommit): Adapt.
236 * method-serial.cc (serial_dispatch::log): Adapt.
237 * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
238 (gl_wt_dispatch::store): Fix likely/unlikely.
239 * containers.h (GTM::vector::resize): Add additional_capacity
240 parameter and handle it.
241 (GTM::vector::resize_noinline): New/adapt.
242 (GTM::vector::push): New.
244 2012-01-06 Richard Henderson <rth@redhat.com>
246 * configure.tgt: Support powerpc-linux and powerpc-darwin.
247 * config/linux/powerpc/futex_bits.h: New file.
248 * config/powerpc/cacheline.h: New file.
249 * config/powerpc/sjlj.S: New file.
250 * config/powerpc/target.h: New file.
251 * config/generic/asmcfi.h (cfi_offset): New.
252 (cfi_restore, cfi_undefined): New.
254 2012-01-05 Aldy Hernandez <aldyh@redhat.com>
257 * testsuite/libitm.c/reentrant.c: Remove xfail.
258 (thread): Pass x to pure().
259 From Patrik Marlier <patrick.marlier@gmail.com>.
261 2011-12-24 Torvald Riegel <triegel@redhat.com>
263 * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
264 privatization safety if already in serial mode.
266 2011-12-24 Torvald Riegel <triegel@redhat.com>
268 * beginend.cc (GTM::gtm_thread::restart): Add and handle
269 finish_serial_upgrade parameter.
270 * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
271 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
272 Don't unset reader flag.
273 (GTM::gtm_rwlock::write_upgrade_finish): New.
274 * config/posix/rwlock.cc: Same.
275 * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
277 * config/posix/rwlock.h: Same.
278 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
279 flag after commit or after rollback when restarting.
281 2011-12-24 Torvald Riegel <triegel@redhat.com>
283 * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
284 (GTM::gtm_thread::try_commit): Changed memory order.
285 * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
287 * config/linux/x86/futex_bits.h (sys_futex0): Same.
288 * config/linux/sh/futex_bits.h (sys_futex0): Same.
289 * config/linux/futex_bits.h (sys_futex0): Same.
290 * config/linux/futex.cc (futex_wait, futex_wake): Same.
291 * config/linux/futex.h (futex_wait, futex_wake): Same.
292 * config/linux/rwlock.h (gtm_rwlock::writers,
293 gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
295 * config/linux/rwlock.cc (gtm_rwlock::read_lock,
296 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
297 gtm_rwlock::write_unlock): Fix memory orders and fences.
298 * config/posix/rwlock.cc (gtm_rwlock::read_lock,
299 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
300 gtm_rwlock::write_unlock): Same.
301 * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
302 * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
303 gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
305 (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
306 gl_wt_dispatch::load, gl_wt_dispatch::store,
307 gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
308 orders and fences. Add comments.
310 2011-12-21 Jakub Jelinek <jakub@redhat.com>
312 * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
313 * Makefile.in: Regenerated.
315 2011-12-17 Kaz Kojima <kkojima@gcc.gnu.org>
317 * configure.tgt: Add sh* case.
318 * config/sh/target.h: New file.
319 * config/sh/sjlj.S: New file.
320 * config/linux/sh/futex_bits.h: New file.
322 2011-12-14 Richard Henderson <rth@redhat.com>
324 * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
325 * config/arm/sjlj.S, config/arm/target.h: New files.
326 * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
327 (cfi_rel_offset): New.
328 * config/linux/futex_bits.h: New file.
329 * config/linux/futex.cc: Include futex_bits.h here...
330 * config/linux/futex.h: ... not here.
331 * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
332 * configure.ac (ARCH_AM): New conditional.
333 * Makefile.in, configure: Rebuild.
334 * configure.tgt: Handle ARM.
336 2011-12-13 Richard Henderson <rth@redhat.com>
338 * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
339 signed/unsigned comparison werror.
341 * local_atomic: New file.
342 * libitm_i.h: Include it.
343 (gtm_thread::shared_state): Use atomic template.
344 * beginend.cc (GTM::gtm_clock): Use atomic template.
345 (global_tid): Use atomic template if 64-bit atomics available.
346 (gtm_thread::gtm_thread): Update shared_state access.
347 (gtm_thread::trycommit): Likewise.
348 (choose_code_path): Update global_tid access.
349 * method-gl.cc (gl_mg::orec): Use atomic template. Update all users.
350 * stmlock.h (GTM::gtm_clock): Use atomic template.
351 (gtm_get_clock, gtm_inc_clock): Update accesses.
352 * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
353 redundant __sync_synchronize after atomic shared_state access.
354 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
355 (gtm_rwlock::write_lock_generic): Likewise.
356 (gtm_rwlock::read_unlock): Likewise.
357 * config/alpha/target.h (atomic_read_barrier): Remove.
358 (atomic_write_barrier): Remove.
359 * config/x86/target.h (atomic_read_barrier): Remove.
360 (atomic_write_barrier): Remove.
362 2011-11-30 Richard Henderson <rth@redhat.com>
364 * libitm_i.h (GTM_longjmp): Swap first and second arguments.
365 * beginend.c (_ITM_abortTransaction): Update to match.
366 (GTM::gtm_thread::restart): Likewise.
367 * config/alpha/sjlj.S (GTM_longjmp): Likewise.
368 * config/x86/sjlj.S (GTM_longjmp): Likewise.
370 2011-11-23 Iain Sandoe <iains@gcc.gnu.org>
372 * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
373 * Makefile.in: Regenerate.
375 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
377 * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
378 * alloc_cpp.cc: Generate dummy functions if we don't
379 HAVE_ELF_STYLE_WEAKREF.
380 * eh_cpp.cc: Likewise.
381 * configure: Regenerate.
382 * aclocal.m4: Likewise.
383 * config.h.in: Likewise.
384 * Makefile.in: Likewise.
385 * testsuite/Makefile.in: Likewise.
387 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
389 * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
390 __USER_LABEL_PREFIX__ for targets that use it.
391 (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
392 (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
393 in portability to non-elf targets.
394 (GTM_longjmp): Likewise.
395 * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
398 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
400 * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
401 * testsuite/libitm.c/memset-1.c: Likewise.
403 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
405 * configure: Regenerate.
407 2011-11-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
409 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
410 (LIBITM_ENABLE_SYMVERS): Handle sun style.
411 * Makefile.am: Handle sun style versioning.
412 (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
413 * configure: Regenerate.
414 * Makefile.in: Regenerate.
416 2011-11-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
418 * config/generic/asmcfi.h: Fix comment.
419 * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
420 sequence without .hidden support, error for non-ELF targets.
421 (GTM_longjmp) [__ELF__]: Only use .hidden if
422 HAVE_ATTRIBUTE_VISIBILITY.
424 2011-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
426 * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
427 _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
429 * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
430 __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
432 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
435 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
436 * configure: Regenerate.
438 2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
440 * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
442 2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
444 * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
446 (.note.GNU-stack): Only use if __linux__.
447 * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
448 * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
449 * testsuite/libitm.c/reentrant.c: Likewise.
450 * testsuite/libitm.c/simple-2.c: Likewise.
451 * testsuite/libitm.c/txrelease.c: Likewise.
452 * testsuite/libitm.c++/static_ctor.C: Likewise.
454 2011-11-10 Richard Henderson <rth@redhat.com>
456 * config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
457 * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
458 * configure.ac (ARCH_X86_AVX): New conditional.
459 * Makefile.in, configure: Rebuild.
461 2011-11-09 Richard Henderson <rth@redhat.com>
463 * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
464 * configure.ac: Use it.
465 * config.h.in, configure: Rebuild.
466 * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
468 2011-11-09 Richard Henderson <rth@redhat.com>
470 * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
471 * config/alpha/unaligned.h: Remove file.
472 * config/generic/unaligned.h: Remove file.
473 * config/x86/unaligned.h: Remove file.
474 * config/generic/cachepage.h: Remove file.
475 * config/posix/cachepage.cc: Remove file.
476 * config/generic/cacheline.cc: Remove file.
477 * config/x86/cacheline.cc: Remove file.
478 * config/generic/cacheline.h (gtm_cacheline): Remove the
479 store_mask, copy_mask, copy_mask_wb methods.
480 * config/x86/cacheline.h: Likewise.
481 * config/alpha/cacheline.h: Fall back to generic after setting size.
482 * config/generic/tls.cc (gtm_mask_stack): Remove.
483 * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
484 (GTM_vpalignr_table): Remove.
485 * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
486 (GTM_pshift_table): Remove.
487 * config/libitm_i.h: Don't include cachepage.h.
488 * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
489 * Makefile.in, testsuite/Makefile.in: Rebuild.
491 2011-11-09 Richard Henderson <rth@redhat.com>
493 * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
494 to emit branch prediction hint.
496 * config/x86/sjlj.S: Protect elf directives with __ELF__.
497 Protect .note.GNU-stack with __linux__.
499 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
500 * configure, aclocal.m4, config.h.in: Rebuild.
501 * config/generic/asmcfi.h: New file.
502 * config/x86/sjlj.S: Use it.
504 2011-11-08 Richard Henderson <rth@redhat.com>
506 * local.cc (_ITM_LB): Use a normal call, not a function alias.
508 2011-11-08 Richard Henderson <rth@redhat.com>
510 * configure.tgt: Test correct directory for supported cpus.
512 * configure.ac: Exit if unsupported.
513 * configure: Rebuild.
514 * configure.tgt: Delete boilerplate from libgomp for unsupported
515 targets. Set UNSUPPORTED for unsupported targets.
517 2011-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
519 * configure.tgt: Handle i386 like i[456]86.
520 * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
522 * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
523 !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
525 2011-11-05 Aldy Hernandez <aldyh@redhat.com>
527 * method-wbetl.cc: Update copyright notice.
534 * useraction.cc: Same.
538 * config/generic/tls.cc: Same.
539 * config/generic/cacheline.h: Same.
540 * config/generic/cachepage.h: Same.
541 * config/generic/cacheline.cc: Same.
542 * config/generic/unaligned.h: Same.
543 * config/x86/cacheline.h: Same.
544 * config/x86/cacheline.cc: Same.
545 * config/x86/unaligned.h: Same.
546 * config/alpha/cacheline.h: Same.
547 * config/alpha/unaligned.h: Same.
548 * config/alpha/sjlj.S: Same.
549 * config/posix/cachepage.cc: Same.
550 * config/linux/futex.h: Same.
551 * config/linux/alpha/futex_bits.h: Same.
553 2011-11-04 Torvald Riegel <triegel@redhat.com>
555 * libitm.texi: No cover text and invariant sections.
557 2011-11-03 Richard Henderson <rth@redhat.com>
559 * local_type_traits: New file.
560 * libitm_i.h: Use it. Use C headers, not C++ wrappers.
562 2011-11-03 Richard Henderson <rth@redhat.com>
564 * configure.ac: Don't test for gfortran.
565 * configure: Rebuild.
567 * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
568 * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
570 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
572 * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
573 * testsuite/libitm.c/memset-1.c: Same.
574 * testsuite/libitm.c/c.exp: Same.
575 * testsuite/lib/libitm-dg.exp: Same.
576 * testsuite/lib/libitm.exp: Same.
577 * testsuite/libitm.c++/c++.exp: Same.
579 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
581 * testsuite/config/default.exp: Update copyright date.
582 * configure.ac: Add copyright info.
583 * configure.tgt: Same.
585 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
587 * testsuite/libitm.c/reentrant.c: XFAIL.
588 * testsuite/libitm.c++/static_ctor.C: XFAIL.
590 2011-10-29 Torvald Riegel <triegel@redhat.com>
592 * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
594 (_ITM_abortTransaction): Handle aborts of outer transactions.
596 * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
597 * libitm.texi: Document aborts of outer transactions.
598 * testsuite/libitm.c/cancel.c: New file.
600 2011-10-19 Torvald Riegel <triegel@redhat.com>
602 * testsuite/*: Change __transaction to __transaction_atomic or
603 __transaction_relaxed.
605 2011-10-19 Torvald Riegel <triegel@redhat.com>
607 * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
610 2011-10-19 Torvald Riegel <triegel@redhat.com>
612 * libitm_i.h: Add gl_wt dispatch.
613 * retry.cc (parse_default_method): Same.
614 * method-gl.cc: New file.
615 * Makefile.am: Use method-gl.cc.
616 * Makefile.in: Rebuild.
618 2011-10-19 Torvald Riegel <triegel@redhat.com>
620 * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
621 safety if requested by a TM method.
622 * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
623 privatization safety.
624 * method-serial.cc: Same.
626 2011-10-19 Torvald Riegel <triegel@redhat.com>
628 * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
629 (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
630 undolog-related member functions from *_local to *_undolog.
631 * local.cc (gtm_thread::commit_undolog): Same.
632 * beginend.cc (GTM::gtm_thread::trycommit): Same.
633 (GTM::gtm_thread::rollback): Roll back undolog before
634 dispatch-specific rollback.
636 2011-10-19 Torvald Riegel <triegel@redhat.com>
638 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
639 re-initialization of the current method group.
640 * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
642 2011-10-19 Torvald Riegel <triegel@redhat.com>
644 * alloc.cc (commit_allocations_2): Do not free transaction-local
645 memory when committing a nested transaction.
647 2011-10-19 Torvald Riegel <triegel@redhat.com>
649 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
650 serial-irrevocable dispatch, not serial.
652 2011-10-19 Torvald Riegel <triegel@redhat.com>
654 * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
656 * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
657 * method-serial.cc: Implement begin_or_restart().
658 * beginend.cc (GTM::gtm_thread::begin_transaction): Call
659 dispatch-specific begin_or_restart().
660 (GTM::gtm_thread::restart): Same.
662 2011-08-23 Torvald Riegel <triegel@redhat.com>
664 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
665 restarting without switching to serial mode.
666 (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
667 transaction state. Choose closed-nesting alternative if available.
668 (GTM::gtm_thread::set_default_dispatch): New.
669 (parse_default_method): New.
670 (GTM::gtm_thread::number_of_threads_changed): New.
671 * method-serial.cc (GTM::serial_mg): New method group class.
672 (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
674 (GTM::serial_dispatch): Same.
675 (GTM::serialirr_onwrite_dispatch): Same.
676 (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
677 * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
679 (GTM::gtm_thread::gtm_thread): Same.
680 (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
681 (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
682 (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
683 choose dispatch but set state according to dispatch here.
684 * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
685 (GTM::method_group): New class.
686 (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
687 * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
688 * libitm.texi: Document TM methods, method groups, method life cycle.
689 Rename method sets to method groups.
691 2011-08-23 Torvald Riegel <triegel@redhat.com>
693 * config/x86/tls.h: Moved to ...
694 * config/linux/x86/tls.h: ... here.
696 2011-08-23 Torvald Riegel <triegel@redhat.com>
698 * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
700 * config/x86/sjlj.S: Same.
702 2011-08-19 Torvald Riegel <triegel@redhat.com>
704 * config/linux/rwlock.h: New file.
705 * config/linux/rwlock.c: New file.
706 * configure.ac: Reenable futex support (undo SVN rev 157758).
708 * configure.tgt: Same.
709 * config/linux/alpha/futex_bits.h: Same.
710 * config/linux/futex.h: Same. Return number of woken processes.
711 * config/linux/futex.cc: Same.
712 (futex_wait): Remove spinning.
713 * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
714 Use __x86_64__ instead of __LP64__.
715 * aclocal.m4: Include generic futex checks.
716 * configure: Rebuild.
717 * Makefile.in: Rebuild.
718 * testsuite/Makefile.in: Rebuild.
719 * beginend.cc: Include pthread.h.
720 * config/posix/cachepage.cc: Same.
722 2011-08-12 Torvald Riegel <triegel@redhat.com>
724 * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
725 (abi_disp, set_abi_disp): Move to tx's TLS slot.
727 * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
729 (GTM::gtm_thread::thread_num): Removed.
730 (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
731 * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
732 tx-to-thread renaming.
733 * beginend.cc: Adapted to tx-to-thread renaming.
734 (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
735 (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
736 * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
737 gtm_transaction to gtm_thread.
738 (_ITM_getThreadnum): Removed. Not supported anymore.
739 * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
740 * libitm.texi: Documented that _ITM_getThreadnum is not supported.
741 * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
742 gtm_tx-to-gtm_thr renaming if necessary.
749 * alloc_cpp.cc: Same.
750 * method-serial.cc: Same.
751 * config/generic/tls.cc: Same.
752 * config/posix/rwlock.h (gtm_rwlock): Same.
753 * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
755 2011-08-12 Torvald Riegel <triegel@redhat.com>
757 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
759 (gtm_rwlock::read_unlock): Same.
760 (gtm_rwlock::write_lock_generic): New. Generalized from ...
761 (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
762 * libitm_i.h (GTM::gtm_transaction): Added shared_state.
763 * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
764 w_upgrade. Replaced by per-transaction flags (in shared_state).
765 Added c_confirmed_writers.
766 (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
767 GTM::gtm_rwlock::write_upgrade): Add tx parameter.
768 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
769 * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
770 * beginend.cc (GTM::gtm_transaction::begin_transaction,
771 _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
772 * libitm.texi: Document locking conventions and implementations in
775 2011-08-12 Torvald Riegel <triegel@redhat.com>
777 * libitm_i.h (next_tx): Add list of all threads' transaction.
778 * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
779 transaction with list of transactions and ...
780 (thread_exit_handler): ... deregister here.
781 * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
782 * config/x86/target.h: Same.
784 2011-08-12 Torvald Riegel <triegel@redhat.com>
786 * testsuite/libitm.c++/static_ctor.C: New file.
788 2011-08-12 Torvald Riegel <triegel@redhat.com>
790 * testsuite/libitm.c/reentrant.c: New file.
792 2011-08-12 Torvald Riegel <triegel@redhat.com>
794 * config/generic/tls.h: Remove the free list for transactions and ...
795 * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
796 (GTM::gtm_transaction::operator delete): ... and release here.
797 (thread_exit_handler): New. Delete tx when thread terminates.
798 (thread_exit_init): New.
799 (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
800 * testsuite/libitm.c/txrelease.c: New file.
802 2011-08-12 Torvald Riegel <triegel@redhat.com>
804 * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
805 * testsuite/libitm.c/notx.c: New file.
807 2011-08-12 Torvald Riegel <triegel@redhat.com>
809 * config/generic/tls.h (gtm_thread): Move local_tid from here ...
810 * libitm_i.h (local_tid): ... to here.
811 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
812 (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
814 2011-08-12 Torvald Riegel <triegel@redhat.com>
816 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
817 serialirr_onwrite_dispatch as new default for now.
818 * method-serial.cc (serialirr_onwrite_dispatch): New.
819 (GTM::dispatch_serialirr_onwrite): New.
822 2011-08-12 Torvald Riegel <triegel@redhat.com>
824 * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
825 * query.cc (_ITM_getTransactionId): There is no active transaction if
826 the current nesting level is zero.
828 2011-07-28 Torvald Riegel <triegel@redhat.com>
830 * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
833 2011-07-28 Torvald Riegel <triegel@redhat.com>
835 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
836 transaction properties from the caller instead of from the
839 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
841 2011-07-28 Torvald Riegel <triegel@redhat.com>
843 * local.cc (gtm_transaction::rollback_local): Support closed nesting.
844 * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
846 * method-serial.cc: Same.
847 * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
848 flat nesting as default, and closed nesting on demand.
849 (GTM::gtm_transaction::rollback): Same.
850 (_ITM_abortTransaction): Same.
851 (GTM::gtm_transaction::restart): Same.
852 (GTM::gtm_transaction::trycommit): Same.
853 (GTM::gtm_transaction::trycommit_and_finalize): Removed.
854 (choose_code_path): New.
855 (GTM::gtm_transaction_cp::save): New.
856 (GTM::gtm_transaction_cp::commit): New.
857 * query.cc (_ITM_inTransaction): Support flat nesting.
858 * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
859 (GTM::gtm_transaction): Support flat and closed nesting.
860 * alloc.cc (commit_allocations_2): New.
861 (commit_cb_data): New helper struct.
862 (GTM::gtm_transaction::commit_allocations): Handle nested
864 * libitm.texi: Update user action section, add description of nesting.
866 2011-07-28 Torvald Riegel <triegel@redhat.com>
868 * libitm_i.h: Add closed nesting as restart reason.
869 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
871 2011-07-28 Torvald Riegel <triegel@redhat.com>
873 * useraction.cc: Use vector instead of list to store actions.
874 Also support partial rollbacks for closed nesting.
875 * libitm_i.h (GTM::gtm_transaction::user_action): Same.
878 2011-07-28 Torvald Riegel <triegel@redhat.com>
880 * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
881 closed_nesting flags, as well as a closed nesting alternative.
882 * method-serial.cc: Same.
883 (serial_dispatch): Renamed to serialirr_dispatch.
884 (GTM::dispatch_serialirr): Same.
885 (serial_dispatch_ul): Renamed to serial_dispatch.
886 (GTM::dispatch_serial): Same.
888 2011-07-28 Torvald Riegel <triegel@redhat.com>
890 * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
892 2011-07-28 Torvald Riegel <triegel@redhat.com>
894 * aatree.h (aa_tree::remove): New.
895 (aa_tree::operator new): Add placement new.
897 2011-07-02 Torvald Riegel <triegel@redhat.com>
899 * containers.h: New file.
900 * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
901 * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
902 * common.h: ... to here.
903 (local_undo): Use GTM::vector for gtm_transaction::local_undo.
906 2011-06-30 Torvald Riegel <triegel@redhat.com>
908 * libitm_i.h (STATE_ABORTING): Remove.
909 * beginend.cc (_ITM_abortTransaction): Same.
910 (GTM::gtm_transaction::trycommit_and_finalize): Same.
911 * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
912 (_ITM_rollbackTransaction): Remove.
915 * libitm.texi: Document these ABI changes.
917 2011-06-30 Torvald Riegel <triegel@redhat.com>
919 * libitm.texi: New file.
920 * Makefile.am: Add libitm.texi.
921 * Makefile.in: Rebuild.
923 2011-06-30 Torvald Riegel <triegel@redhat.com>
925 * libitm_i.h: Move parts to common.h and dispatch.h.
926 * common.h: New file.
927 * dispatch.h: New file, new dispatch class.
928 Rename GTM::abi_dispatch::lock_type to ls_modifier.
929 RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
930 * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
931 decision to retry.cc.
932 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
934 (GTM::gtm_transaction::decide_begin_dispatch): Same.
935 * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
937 * barrier.cc: Use new barriers definitions.
938 (abi_dispatch::memmove_overlap_check): New.
939 * config/x86/x86_sse.cc: Same.
940 * config/x86/x86_avx.cc: Same.
941 * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
943 * Makefile.in: Rebuild.
944 * method-readonly.cc: Remove.
945 * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
946 Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
948 2011-06-30 Torvald Riegel <triegel@redhat.com>
950 * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
951 * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
952 * testsuite/libitm.c/dropref-2.c: Same.
953 * testsuite/libitm.c/dropref.c: Same.
955 2011-06-30 Torvald Riegel <triegel@redhat.com>
957 * config/generic/tls.h (gtm_disp): Rename to abi_disp.
958 * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
959 * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
963 * config/generic/tls.h: Same.
964 * config/x86/tls.h: Same.
968 * method-readonly.cc: Same.
969 * method-serial.cc: Same.
970 * method-wbetl.cc: Same.
973 2011-03-03 Richard Henderson <rth@redhat.com>
975 * config/posix/rwlock.cc (write_upgrade): Add missing case.
976 From Patrik Marlier <patrick.marlier@unine.ch>.
978 2011-02-03 Richard Henderson <rth@redhat.com>
980 * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
981 * configure.ac: Use it.
982 * configure, config.h.in: Rebuild.
983 * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
984 (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
985 _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
986 * libitm.map: Use wildcards to match size_t mangling.
988 2010-12-14 Richard Henderson <rth@redhat.com>
990 * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
991 blocks of TIDs per thread.
992 * config/generic/tls.h (struct gtm_thread): Add local_tid member.
993 (setup_gtm_thr): Return the thread structure.
994 * config/x86/tls.h (setup_gtm_thr): Likewise.
996 2010-12-14 Richard Henderson <rth@redhat.com>
998 * clone.cc (table_lock): Remove.
999 (find_clone): Don't take it.
1000 (ExcludeTransaction): New helper class.
1001 (_ITM_registerTMCloneTable): Use it.
1002 (_ITM_deregisterTMCloneTable): Likewise.
1004 2010-12-14 Richard Henderson <rth@redhat.com>
1006 * config/x86/tls.h: New file.
1008 2010-07-15 Richard Henderson <rth@redhat.com>
1010 * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1011 * Makefile.in: Rebuild.
1013 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
1015 * method-wbetl.cc (trydropreference): Fix source line.
1017 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
1019 * libitm.h: Add comment.
1020 * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1022 2010-07-07 Aldy Hernandez <aldyh@redhat.com>
1024 * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1025 * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1026 available, use pthread mutexes.
1027 * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1028 * config.h.in: Regenerate.
1029 * configure: Regenerate.
1031 2010-07-06 Aldy Hernandez <aldyh@redhat.com>
1033 * libitm.h (ITM_PURE): Define.
1034 Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1036 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
1038 * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1039 (validate): Add comment.
1040 (trydropreference): New.
1041 * method-readonly.cc (class readonly_dispatch): Add
1043 * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1044 Call trydropreference().
1045 * libitm.h (_ITM_dropReferences): Remove const attribute.
1046 * method-serial.cc (class serial_dispatch): Add trydropreference.
1047 * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1049 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
1051 * memcpy.cc (do_memcpy): Comment.
1053 2010-06-25 Aldy Hernandez <aldyh@redhat.com>
1055 * barrier.tpl: Add comments throughout.
1057 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
1059 * method-wbetl.cc (struct w_entry): Add comments.
1063 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
1065 * alloc_c.cc (_ITM_dropReferences): New.
1066 * libitm.map (_ITM_dropReferences): Add.
1067 * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1068 * libitm_i.h (struct gtm_transaction): Declare
1069 drop_references_allocations and drop_references_local.
1070 * local.cc (rollback_local): Ignore memory when applicable.
1071 (drop_references_local): New.
1073 2010-06-23 Richard Henderson <rth@redhat.com>
1075 * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1076 memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1077 * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1078 * config/alpha/target.h: Likewise.
1079 * config/generic/tls.cc (gtm_mask_stack): Use it.
1081 2010-06-23 Richard Henderson <rth@redhat.com>
1083 * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1084 a mutex instead of trying a lock-free compare-and-swap on the list.
1085 (gtm_cacheline_page::operator delete): Likewise.
1087 2010-06-16 Richard Henderson <rth@redhat.com>
1089 * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1090 that overlap the libitm stack.
1091 * barrier.tpl: Mark incoming stack.
1092 * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1093 _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1094 * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1095 * memcpy.cc, memset.cc: Likewise.
1096 * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1097 * config/generic/tls.h (gtm_thread): Add stack_top member.
1098 (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1099 * libitm_i.h (gtm_mask_stack): Declare.
1100 * config/generic/tls.cc: New file.
1101 * Makefile.am (libitm_la_SOURCES): Add it.
1102 (AM_CXXFLAGS): Turn off exceptions.
1103 * Makefile.in: Rebuild.
1105 2010-06-16 Richard Henderson <rth@redhat.com>
1107 * alloc.cc (struct gtm_alloc_action): Move definition ...
1108 * libitm_i.h: ... here.
1109 (class gtm_transaction): Declare new and delete.
1110 * beginend.cc (alloc_tx): Reformulate as operator new.
1111 (free_tx): Reformulate as operator delete.
1112 * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1114 2010-06-11 Richard Henderson <rth@redhat.com>
1116 * clone.cc (clone_entry_compare): Fix typo.
1117 From Patrik Marlier <patrick.marlier@unine.ch>.
1119 2010-05-13 Richard Henderson <rth@redhat.com>
1121 * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1124 2010-05-07 Aldy Hernandez <aldyh@redhat.com>
1126 * libitm_i.h (struct gtm_transaction): Remove
1127 get_allocation_size.
1128 (record_allocation): Remove size parameter.
1129 * libitm.map (_ITM_realloc): Remove.
1130 * alloc_c.cc (_ITM_realloc): Remove.
1131 (_ITM_malloc): Remove size argument to record_allocation.
1132 (_ITM_calloc): Same.
1133 * alloc_cpp.cc (_ZGTtnwm): Same.
1134 (_ZGTtnwmRKSt9nothrow_t): Same.
1136 (_ZGTtnamRKSt9nothrow_t): Same.
1137 * alloc.cc (struct gtm_alloc_action): Remove size.
1138 (get_allocation_size): Remove.
1139 (commit_allocations): Add comment.
1140 (record_allocation): Remove size parameter.
1141 (forget_allocation): Remove set of size.
1143 2010-04-19 Aldy Hernandez <aldyh@redhat.com>
1145 * Makefile.am (abi_version): New.
1146 (AM_CXXFLAGS): Pass abi_version.
1147 * Makefile.in: Regenerate.
1148 * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1150 2010-04-06 Aldy Hernandez <aldyh@redhat.com>
1152 * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1153 _ITM_getTMCloneOrIrrevokable.
1154 * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1155 * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1157 2010-03-26 Aldy Hernandez <aldyh@redhat.com>
1159 * configure.ac: Remove Linux futex support.
1160 * configure.tgt (config_path): Same.
1161 * Makefile.am: Same.
1162 * config/linux: Remove entire directory.
1163 * configure: Rebuild.
1164 * Makefile.in: Rebuild.
1165 * testsuite/Makefile.in: Rebuild.
1167 2010-03-09 Aldy Hernandez <aldyh@redhat.com>
1169 * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1170 switching to serial mode.
1171 * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1173 2010-03-03 Aldy Hernandez <aldyh@redhat.com>
1175 * configure.tgt: Add emacs -*- tags.
1176 * barrier.tpl: Same.
1178 2010-02-23 Aldy Hernandez <aldyh@redhat.com>
1180 * Makefile.am: Rename serial.cc to method-serial.cc.
1181 * Makefile.in: Regenerate with automake 1.11.1.
1182 * testsuite/Makefile.in: Same.
1183 * aclocal.m4: Regenerate with aclocal 1.11.1.
1184 * method-serial.cc: Rename from serial.cc.
1185 * libitm_i.h (struct gtm_transaction): Update comment on
1188 2010-02-22 Aldy Hernandez <aldyh@redhat.com>
1190 * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1191 * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1193 2010-02-11 Aldy Hernandez <aldyh@redhat.com>
1195 * configure: Rebuild.
1197 2009-11-12 Richard Henderson <rth@redhat.com>
1199 * Rewrite everything in C++.
1201 2009-11-03 Richard Henderson <rth@redhat.com>
1203 * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1204 * Makefile.am (libitm_la_SOURCES): Add them.
1205 * configure.ac (ARCH_X86): New conditional.
1206 * Makefile.in, configure: Rebuild.
1207 * configure.tgt: Set up ARCH; do cflags setup at the same time.
1208 Move futex setup into "other system configury" case.
1209 * local.c (rollback_local): Merge into ...
1210 (GTM_rollback_local): ... here.
1211 (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1212 (_ITM_LB): Define as an alias to GTM_LB.
1214 2009-11-03 Richard Henderson <rth@redhat.com>
1216 * method-readonly.c: New file.
1217 * Makefile.am (libitm_la_SOURCES): Add it.
1218 * Makefile.in: Rebuild.
1219 * beginend.c (gtm_stmlock_array, gtm_clock): New.
1220 (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1221 * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1222 (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1223 gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1224 gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1225 gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1226 gtm_get_clock, gtm_inc_clock): New.
1227 * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1228 LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1229 LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1230 locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1231 replace uses with new libitm_i.h symbols.
1232 (dispatch_wbetl): Rename from wbetl_dispatch.
1233 * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1234 away from dispatch_readonly; abort if the beginTransaction call
1235 asserted that the transaction was readonly.
1237 2009-11-03 Richard Henderson <rth@redhat.com>
1239 * memset.c: New file.
1240 * Makefile.am (libitm_la_SOURCES): Add it.
1241 * Makefile.in: Rebuild.
1242 * testsuite/libitm.c/memset-1.c: New.
1244 2009-11-03 Richard Henderson <rth@redhat.com>
1246 * dispatch.c: Remove file.
1247 * useraction.c (struct gtm_user_action): Move from libitm.h.
1248 * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1249 (serial_memset, serial_memmove, serial_memcpy): Remove.
1250 (serial_W*, serial_R*): Remove.
1251 (serial_dispatch): Update to match.
1252 * configure.ac: Move Werror down below configure checks. Don't
1253 check for sys/loadavg.h, do check for malloc.h. Don't check for
1254 getloadavg and clock_gettime; do check for memalign, posix_memalign.
1255 Use GCC_AC_FUNC_MMAP_BLACKLIST
1256 * libitm.h: Split out all internal items to...
1257 * libitm_i.h: ... here. New file.
1258 * copymask.c: New file.
1259 * local.c (struct gtm_local_undo): Move from libitm.h.
1260 (GTM_alloc_local): Rename from alloc_local; export.
1261 * memcpy.c: New file.
1262 * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1263 * config/posix/page.c: New file.
1264 * config/posix/target_tls.h: Remove file.
1265 * barrier.c: New file.
1266 * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1268 * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1269 * method-wbetl.c: Rewrite for new cacheline methods.
1270 * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1272 * config/alpha/sjlj.S: Fix typo.
1273 * config/alpha/target_i.h: Copy functions from alpha/target.h.
1274 * config/alpha/copymask.c: New file.
1275 * config/alpha/target.h (CACHELINE_SIZE): New.
1276 (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1278 * config/x86/target_i.h: Copy functions from x86/target.h.
1279 * config/x86/copymask.c: New file.
1280 * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1281 (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1282 (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1283 * config/x86/target_tls.h: Move contents to target_i.h.
1285 * testsuite/libitm.c/clone-1.c: Include libitm.h.
1286 * testsuite/libitm.c/memcpy-1.c: New.
1288 2009-10-22 Richard Henderson <rth@redhat.com>
1290 * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1291 (AM_CCASFLAGS): New.
1292 * configure.ac: Add AM_PROG_AS. Use m4_rename_force for
1293 saving/restoring _AC_ARG_VAR_PRECIOUS.
1294 * Makefile.in, aclocal.m4, config.h.in, configure,
1295 testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1297 2009-10-22 Richard Henderson <rth@redhat.com>
1299 * testsuite/*: Update for new compiler syntax.
1301 2009-10-21 Richard Henderson <rth@redhat.com>
1303 * libitm.h (_ITM_abortReason): Add outerAbort.
1305 2009-08-03 Richard Henderson <rth@redhat.com>
1307 * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1308 _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1309 * method-wbetl.c (struct w_entry): Remove mask.
1310 (wbetl_write, wbetl_load): Return pointer to word containing the data;
1313 2009-07-22 Richard Henderson <rth@redhat.com>
1315 * eh_cpp.c: New file.
1316 * Makefile.am (libitm_la_SOURCES): Add it.
1317 * Makefile.in: Rebuild.
1318 * beginend.c (GTM_rollback_transaction): Undo exception state.
1319 (GTM_trycommit_transaction): Mark inline.
1320 (GTM_trycommit_and_finalize_transaction): Split out from ...
1321 (_ITM_commitTransaction): ... here.
1322 (_ITM_commitTransactionEH): New function.
1323 * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1324 cxa_unthrown, eh_in_flight; reorder.
1326 * testsuite/libitm.c++/c++.exp: New.
1327 * testsuite/libitm.c++/eh-1.C: New.
1329 * aatree.c (aa_free): Remove REGPARM.
1330 * aatree.h: Remove all REGPARM.
1332 2009-07-18 Richard Henderson <rth@redhat.com>
1334 * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1335 * Makefile.am (libitm_la_SOURCES): Add them.
1336 * Makefile.in: Rebuild.
1337 * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1338 (GTM_trycommit_transaction): Likewise.
1339 * libitm.h: Include aatree.h
1340 (struct gtm_alloc_action): New.
1341 (struct gtm_transaction): Add alloc_actions.
1342 (GTM_record_allocation, GTM_forget_allocation): Declare.
1343 (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1344 * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1345 _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1346 _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1347 _ZGTtdaPvRKSt9nothrow_t): Export.
1349 2009-07-18 Richard Henderson <rth@redhat.com>
1351 * target_tls.h: Move ...
1352 * config/posix/target_tls.h: ... here.
1354 2009-07-07 Richard Henderson <rth@redhat.com>
1356 * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1358 2009-07-07 Richard Henderson <rth@redhat.com>
1362 2009-07-07 Richard Henderson <rth@redhat.com>
1364 * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1365 * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1367 * configure.tgt: Don't use -ftls-model for x86 linux.
1368 * libitm.h: Include target.h after standard includes.
1369 (_gtm_thr): Rename from gtm_thr.
1370 (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1371 (gtm_disp, set_gtm_disp): New.
1372 * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1373 retry.c, serial.c, useraction.c: Use accessor functions throughout.
1374 * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1376 2009-07-07 Richard Henderson <rth@redhat.com>
1378 * config/linux/rwlock.c (EZ): New define. Use it throughout.
1380 2009-07-06 Richard Henderson <rth@redhat.com>
1382 * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1383 (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1384 (_ITM_beginTransaction): Take variadic arguments.
1385 (_ITM_registerThrownObject): Declare.
1386 * beginend.c, serial.c: Update.
1387 * libitm.map: Add _ITM_registerThrownObject.
1389 2009-01-28 Richard Henderson <rth@redhat.com>
1391 * Makefile.am (libitm_la_SOURCES): Add clone.c.
1392 * Makefile.in: Rebuild.
1393 * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1394 (GTM_restart_transaction): Fix uninstrumented code check.
1395 * retry.c (GTM_decide_retry_strategy): Add serial check.
1396 * serial.c (GTM_serialmode): Add irrevokable variable. Don't
1397 automatically go irrevokable when in serial mode.
1398 * clone.c: New file.
1399 * libitm.h, libitm.map: Update.
1401 2009-01-27 Richard Henderson <rth@redhat.com>
1403 * Makefile.am (LTCCASCOMPILE): Define.
1404 (libitm_la_SOURCES): Add methid-wbetl.c.
1405 * testsuite/Makefile.am: New
1406 * configure.ac: Add testsuite/Makefile.
1407 * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1408 * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1409 (_ITM_abortTransaction): Finalize implementation method; pass
1410 transaction properties to longjmp.
1411 (GTM_restart_transaction): Split out from ...
1412 (_ITM_commitTransaction): ... here.
1413 * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1414 Move to config/x86/target.h.
1415 * config/linux/alpha/futex_bits.h: New.
1416 * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1417 * config/x86/target.h: Disable target types for 32-bit.
1418 * config/alpha/sjlj.S, config/alpha/target.h: New.
1419 * libitm.h (struct gtm_dispatch): Add init, fini.
1420 (enum restart_reason): New.
1421 (struct gtm_transaction): Add method and restarts.
1422 * retry.c (GTM_decide_retry_strategy): Implement.
1423 * serial.c (serial_init, serial_fini): New.
1424 (GTM_serialmode): Finialize outgoing method.
1425 * method-wbetl.c: New.
1427 2008-12-09 Richard Henderson <rth@redhat.com>
1429 * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1430 * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1431 * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1432 * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1433 (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1434 (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1435 * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1436 * serial.c (serial_R##T, serial_W##T): Likewise.
1438 2008-11-21 Richard Henderson <rth@redhat.com>