1 2012-02-15 Uros Bizjak <ubizjak@gmail.com>
3 * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
5 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
7 * configure.tgt (target_cpu): Handle sparc and sparc64 & sparcv9.
8 * config/sparc/cacheline.h: New file.
9 * config/sparc/target.h: Likewise.
10 * config/sparc/sjlj.S: Likewise.
11 * config/linux/sparc/futex_bits.h: Likewise.
13 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
15 * configure.ac (link_itm): Fix comment.
16 * configure: Regenerate.
17 * testsuite/lib/libitm.exp: Do not pass -litm for the link.
19 2012-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22 * testsuite/libitm.c++/c++.exp (lang_link_flags): Add
24 Correct libgomp references.
26 2012-01-24 Torvald Riegel <triegel@redhat.com>
28 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
31 2012-01-24 Uros Bizjak <ubizjak@gmail.com>
33 * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
35 * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
36 offset values. Do not copy return address. Decrement stack
38 (GTM_longjump) [__x86_64__]: Update offset values.
40 2012-01-23 Uros Bizjak <ubizjak@gmail.com>
43 * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
44 the first function argument to %eax.
46 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
48 * libitm.h (_ITM_getThreadnum): Remove.
49 * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
51 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
53 * clearcap.map: New file.
54 * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
55 * configure.ac: Call it.
56 Clear HWCAP_LDFLAGS if defaulting to -mavx.
57 * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
58 * configure: Regenerate.
59 * Makefile.in: Regenerate.
60 * testsuite/Makefile.in: Regenerate.
62 2012-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
65 * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
66 include, exclude options.
68 2012-01-14 Torvald Riegel <triegel@redhat.com>
70 * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
72 * containers.h (GTM::vector::set_size): New.
74 2012-01-14 Torvald Riegel <triegel@redhat.com>
77 * config/generic/tls.h (GTM::mask_stack_top): New.
78 (GTM::mask_stack_bottom): Declare.
79 * config/generic/tls.c (GTM::mask_stack_bottom): New.
80 * local.cc (gtm_undolog::rollback): Filter out any updates that
81 overlap the libitm stack. Add current transaction as parameter.
82 * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
83 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
84 * testsuite/libitm.c/stackundo.c: New test.
86 2012-01-10 Richard Henderson <rth@redhat.com>
88 * libitm_i.h (_Unwind_DeleteException): Declare weak.
89 * eh_cpp.cc (_Unwind_DeleteException): Define for
90 !HAVE_ELF_STYLE_WEAKREF.
92 2012-01-08 Torvald Riegel <triegel@redhat.com>
94 * local.cc (GTM_LB): Use GTM::gtm_undolog.
95 (GTM::gtm_thread::drop_references_undolog): Remove.
96 (GTM::gtm_thread::commit_undolog,
97 GTM::gtm_thread::rollback_undolog): Move to ...
98 * libitm_i.h (GTM::gtm_undolog): ...here. New.
99 (GTM::gtm_undolog_entry): Remove.
100 (GTM::gtm_thread): Adapt.
101 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
102 (GTM::gtm_thread::trycommit): Adapt.
103 * method-serial.cc (serial_dispatch::log): Adapt.
104 * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
105 (gl_wt_dispatch::store): Fix likely/unlikely.
106 * containers.h (GTM::vector::resize): Add additional_capacity
107 parameter and handle it.
108 (GTM::vector::resize_noinline): New/adapt.
109 (GTM::vector::push): New.
111 2012-01-06 Richard Henderson <rth@redhat.com>
113 * configure.tgt: Support powerpc-linux and powerpc-darwin.
114 * config/linux/powerpc/futex_bits.h: New file.
115 * config/powerpc/cacheline.h: New file.
116 * config/powerpc/sjlj.S: New file.
117 * config/powerpc/target.h: New file.
118 * config/generic/asmcfi.h (cfi_offset): New.
119 (cfi_restore, cfi_undefined): New.
121 2012-01-05 Aldy Hernandez <aldyh@redhat.com>
124 * testsuite/libitm.c/reentrant.c: Remove xfail.
125 (thread): Pass x to pure().
126 From Patrik Marlier <patrick.marlier@gmail.com>.
128 2011-12-24 Torvald Riegel <triegel@redhat.com>
130 * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
131 privatization safety if already in serial mode.
133 2011-12-24 Torvald Riegel <triegel@redhat.com>
135 * beginend.cc (GTM::gtm_thread::restart): Add and handle
136 finish_serial_upgrade parameter.
137 * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
138 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
139 Don't unset reader flag.
140 (GTM::gtm_rwlock::write_upgrade_finish): New.
141 * config/posix/rwlock.cc: Same.
142 * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
144 * config/posix/rwlock.h: Same.
145 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
146 flag after commit or after rollback when restarting.
148 2011-12-24 Torvald Riegel <triegel@redhat.com>
150 * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
151 (GTM::gtm_thread::try_commit): Changed memory order.
152 * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
154 * config/linux/x86/futex_bits.h (sys_futex0): Same.
155 * config/linux/sh/futex_bits.h (sys_futex0): Same.
156 * config/linux/futex_bits.h (sys_futex0): Same.
157 * config/linux/futex.cc (futex_wait, futex_wake): Same.
158 * config/linux/futex.h (futex_wait, futex_wake): Same.
159 * config/linux/rwlock.h (gtm_rwlock::writers,
160 gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
162 * config/linux/rwlock.cc (gtm_rwlock::read_lock,
163 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
164 gtm_rwlock::write_unlock): Fix memory orders and fences.
165 * config/posix/rwlock.cc (gtm_rwlock::read_lock,
166 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
167 gtm_rwlock::write_unlock): Same.
168 * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
169 * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
170 gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
172 (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
173 gl_wt_dispatch::load, gl_wt_dispatch::store,
174 gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
175 orders and fences. Add comments.
177 2011-12-21 Jakub Jelinek <jakub@redhat.com>
179 * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
180 * Makefile.in: Regenerated.
182 2011-12-17 Kaz Kojima <kkojima@gcc.gnu.org>
184 * configure.tgt: Add sh* case.
185 * config/sh/target.h: New file.
186 * config/sh/sjlj.S: New file.
187 * config/linux/sh/futex_bits.h: New file.
189 2011-12-14 Richard Henderson <rth@redhat.com>
191 * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
192 * config/arm/sjlj.S, config/arm/target.h: New files.
193 * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
194 (cfi_rel_offset): New.
195 * config/linux/futex_bits.h: New file.
196 * config/linux/futex.cc: Include futex_bits.h here...
197 * config/linux/futex.h: ... not here.
198 * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
199 * configure.ac (ARCH_AM): New conditional.
200 * Makefile.in, configure: Rebuild.
201 * configure.tgt: Handle ARM.
203 2011-12-13 Richard Henderson <rth@redhat.com>
205 * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
206 signed/unsigned comparison werror.
208 * local_atomic: New file.
209 * libitm_i.h: Include it.
210 (gtm_thread::shared_state): Use atomic template.
211 * beginend.cc (GTM::gtm_clock): Use atomic template.
212 (global_tid): Use atomic template if 64-bit atomics available.
213 (gtm_thread::gtm_thread): Update shared_state access.
214 (gtm_thread::trycommit): Likewise.
215 (choose_code_path): Update global_tid access.
216 * method-gl.cc (gl_mg::orec): Use atomic template. Update all users.
217 * stmlock.h (GTM::gtm_clock): Use atomic template.
218 (gtm_get_clock, gtm_inc_clock): Update accesses.
219 * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
220 redundant __sync_synchronize after atomic shared_state access.
221 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
222 (gtm_rwlock::write_lock_generic): Likewise.
223 (gtm_rwlock::read_unlock): Likewise.
224 * config/alpha/target.h (atomic_read_barrier): Remove.
225 (atomic_write_barrier): Remove.
226 * config/x86/target.h (atomic_read_barrier): Remove.
227 (atomic_write_barrier): Remove.
229 2011-11-30 Richard Henderson <rth@redhat.com>
231 * libitm_i.h (GTM_longjmp): Swap first and second arguments.
232 * beginend.c (_ITM_abortTransaction): Update to match.
233 (GTM::gtm_thread::restart): Likewise.
234 * config/alpha/sjlj.S (GTM_longjmp): Likewise.
235 * config/x86/sjlj.S (GTM_longjmp): Likewise.
237 2011-11-23 Iain Sandoe <iains@gcc.gnu.org>
239 * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
240 * Makefile.in: Regenerate.
242 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
244 * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
245 * alloc_cpp.cc: Generate dummy functions if we don't
246 HAVE_ELF_STYLE_WEAKREF.
247 * eh_cpp.cc: Likewise.
248 * configure: Regenerate.
249 * aclocal.m4: Likewise.
250 * config.h.in: Likewise.
251 * Makefile.in: Likewise.
252 * testsuite/Makefile.in: Likewise.
254 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
256 * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
257 __USER_LABEL_PREFIX__ for targets that use it.
258 (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
259 (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
260 in portability to non-elf targets.
261 (GTM_longjmp): Likewise.
262 * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
265 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
267 * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
268 * testsuite/libitm.c/memset-1.c: Likewise.
270 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
272 * configure: Regenerate.
274 2011-11-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
276 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
277 (LIBITM_ENABLE_SYMVERS): Handle sun style.
278 * Makefile.am: Handle sun style versioning.
279 (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
280 * configure: Regenerate.
281 * Makefile.in: Regenerate.
283 2011-11-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
285 * config/generic/asmcfi.h: Fix comment.
286 * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
287 sequence without .hidden support, error for non-ELF targets.
288 (GTM_longjmp) [__ELF__]: Only use .hidden if
289 HAVE_ATTRIBUTE_VISIBILITY.
291 2011-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
293 * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
294 _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
296 * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
297 __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
299 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
302 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
303 * configure: Regenerate.
305 2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
307 * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
309 2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
311 * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
313 (.note.GNU-stack): Only use if __linux__.
314 * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
315 * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
316 * testsuite/libitm.c/reentrant.c: Likewise.
317 * testsuite/libitm.c/simple-2.c: Likewise.
318 * testsuite/libitm.c/txrelease.c: Likewise.
319 * testsuite/libitm.c++/static_ctor.C: Likewise.
321 2011-11-10 Richard Henderson <rth@redhat.com>
323 * config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
324 * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
325 * configure.ac (ARCH_X86_AVX): New conditional.
326 * Makefile.in, configure: Rebuild.
328 2011-11-09 Richard Henderson <rth@redhat.com>
330 * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
331 * configure.ac: Use it.
332 * config.h.in, configure: Rebuild.
333 * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
335 2011-11-09 Richard Henderson <rth@redhat.com>
337 * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
338 * config/alpha/unaligned.h: Remove file.
339 * config/generic/unaligned.h: Remove file.
340 * config/x86/unaligned.h: Remove file.
341 * config/generic/cachepage.h: Remove file.
342 * config/posix/cachepage.cc: Remove file.
343 * config/generic/cacheline.cc: Remove file.
344 * config/x86/cacheline.cc: Remove file.
345 * config/generic/cacheline.h (gtm_cacheline): Remove the
346 store_mask, copy_mask, copy_mask_wb methods.
347 * config/x86/cacheline.h: Likewise.
348 * config/alpha/cacheline.h: Fall back to generic after setting size.
349 * config/generic/tls.cc (gtm_mask_stack): Remove.
350 * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
351 (GTM_vpalignr_table): Remove.
352 * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
353 (GTM_pshift_table): Remove.
354 * config/libitm_i.h: Don't include cachepage.h.
355 * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
356 * Makefile.in, testsuite/Makefile.in: Rebuild.
358 2011-11-09 Richard Henderson <rth@redhat.com>
360 * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
361 to emit branch prediction hint.
363 * config/x86/sjlj.S: Protect elf directives with __ELF__.
364 Protect .note.GNU-stack with __linux__.
366 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
367 * configure, aclocal.m4, config.h.in: Rebuild.
368 * config/generic/asmcfi.h: New file.
369 * config/x86/sjlj.S: Use it.
371 2011-11-08 Richard Henderson <rth@redhat.com>
373 * local.cc (_ITM_LB): Use a normal call, not a function alias.
375 2011-11-08 Richard Henderson <rth@redhat.com>
377 * configure.tgt: Test correct directory for supported cpus.
379 * configure.ac: Exit if unsupported.
380 * configure: Rebuild.
381 * configure.tgt: Delete boilerplate from libgomp for unsupported
382 targets. Set UNSUPPORTED for unsupported targets.
384 2011-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
386 * configure.tgt: Handle i386 like i[456]86.
387 * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
389 * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
390 !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
392 2011-11-05 Aldy Hernandez <aldyh@redhat.com>
394 * method-wbetl.cc: Update copyright notice.
401 * useraction.cc: Same.
405 * config/generic/tls.cc: Same.
406 * config/generic/cacheline.h: Same.
407 * config/generic/cachepage.h: Same.
408 * config/generic/cacheline.cc: Same.
409 * config/generic/unaligned.h: Same.
410 * config/x86/cacheline.h: Same.
411 * config/x86/cacheline.cc: Same.
412 * config/x86/unaligned.h: Same.
413 * config/alpha/cacheline.h: Same.
414 * config/alpha/unaligned.h: Same.
415 * config/alpha/sjlj.S: Same.
416 * config/posix/cachepage.cc: Same.
417 * config/linux/futex.h: Same.
418 * config/linux/alpha/futex_bits.h: Same.
420 2011-11-04 Torvald Riegel <triegel@redhat.com>
422 * libitm.texi: No cover text and invariant sections.
424 2011-11-03 Richard Henderson <rth@redhat.com>
426 * local_type_traits: New file.
427 * libitm_i.h: Use it. Use C headers, not C++ wrappers.
429 2011-11-03 Richard Henderson <rth@redhat.com>
431 * configure.ac: Don't test for gfortran.
432 * configure: Rebuild.
434 * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
435 * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
437 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
439 * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
440 * testsuite/libitm.c/memset-1.c: Same.
441 * testsuite/libitm.c/c.exp: Same.
442 * testsuite/lib/libitm-dg.exp: Same.
443 * testsuite/lib/libitm.exp: Same.
444 * testsuite/libitm.c++/c++.exp: Same.
446 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
448 * testsuite/config/default.exp: Update copyright date.
449 * configure.ac: Add copyright info.
450 * configure.tgt: Same.
452 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
454 * testsuite/libitm.c/reentrant.c: XFAIL.
455 * testsuite/libitm.c++/static_ctor.C: XFAIL.
457 2011-10-29 Torvald Riegel <triegel@redhat.com>
459 * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
461 (_ITM_abortTransaction): Handle aborts of outer transactions.
463 * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
464 * libitm.texi: Document aborts of outer transactions.
465 * testsuite/libitm.c/cancel.c: New file.
467 2011-10-19 Torvald Riegel <triegel@redhat.com>
469 * testsuite/*: Change __transaction to __transaction_atomic or
470 __transaction_relaxed.
472 2011-10-19 Torvald Riegel <triegel@redhat.com>
474 * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
477 2011-10-19 Torvald Riegel <triegel@redhat.com>
479 * libitm_i.h: Add gl_wt dispatch.
480 * retry.cc (parse_default_method): Same.
481 * method-gl.cc: New file.
482 * Makefile.am: Use method-gl.cc.
483 * Makefile.in: Rebuild.
485 2011-10-19 Torvald Riegel <triegel@redhat.com>
487 * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
488 safety if requested by a TM method.
489 * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
490 privatization safety.
491 * method-serial.cc: Same.
493 2011-10-19 Torvald Riegel <triegel@redhat.com>
495 * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
496 (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
497 undolog-related member functions from *_local to *_undolog.
498 * local.cc (gtm_thread::commit_undolog): Same.
499 * beginend.cc (GTM::gtm_thread::trycommit): Same.
500 (GTM::gtm_thread::rollback): Roll back undolog before
501 dispatch-specific rollback.
503 2011-10-19 Torvald Riegel <triegel@redhat.com>
505 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
506 re-initialization of the current method group.
507 * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
509 2011-10-19 Torvald Riegel <triegel@redhat.com>
511 * alloc.cc (commit_allocations_2): Do not free transaction-local
512 memory when committing a nested transaction.
514 2011-10-19 Torvald Riegel <triegel@redhat.com>
516 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
517 serial-irrevocable dispatch, not serial.
519 2011-10-19 Torvald Riegel <triegel@redhat.com>
521 * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
523 * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
524 * method-serial.cc: Implement begin_or_restart().
525 * beginend.cc (GTM::gtm_thread::begin_transaction): Call
526 dispatch-specific begin_or_restart().
527 (GTM::gtm_thread::restart): Same.
529 2011-08-23 Torvald Riegel <triegel@redhat.com>
531 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
532 restarting without switching to serial mode.
533 (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
534 transaction state. Choose closed-nesting alternative if available.
535 (GTM::gtm_thread::set_default_dispatch): New.
536 (parse_default_method): New.
537 (GTM::gtm_thread::number_of_threads_changed): New.
538 * method-serial.cc (GTM::serial_mg): New method group class.
539 (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
541 (GTM::serial_dispatch): Same.
542 (GTM::serialirr_onwrite_dispatch): Same.
543 (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
544 * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
546 (GTM::gtm_thread::gtm_thread): Same.
547 (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
548 (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
549 (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
550 choose dispatch but set state according to dispatch here.
551 * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
552 (GTM::method_group): New class.
553 (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
554 * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
555 * libitm.texi: Document TM methods, method groups, method life cycle.
556 Rename method sets to method groups.
558 2011-08-23 Torvald Riegel <triegel@redhat.com>
560 * config/x86/tls.h: Moved to ...
561 * config/linux/x86/tls.h: ... here.
563 2011-08-23 Torvald Riegel <triegel@redhat.com>
565 * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
567 * config/x86/sjlj.S: Same.
569 2011-08-19 Torvald Riegel <triegel@redhat.com>
571 * config/linux/rwlock.h: New file.
572 * config/linux/rwlock.c: New file.
573 * configure.ac: Reenable futex support (undo SVN rev 157758).
575 * configure.tgt: Same.
576 * config/linux/alpha/futex_bits.h: Same.
577 * config/linux/futex.h: Same. Return number of woken processes.
578 * config/linux/futex.cc: Same.
579 (futex_wait): Remove spinning.
580 * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
581 Use __x86_64__ instead of __LP64__.
582 * aclocal.m4: Include generic futex checks.
583 * configure: Rebuild.
584 * Makefile.in: Rebuild.
585 * testsuite/Makefile.in: Rebuild.
586 * beginend.cc: Include pthread.h.
587 * config/posix/cachepage.cc: Same.
589 2011-08-12 Torvald Riegel <triegel@redhat.com>
591 * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
592 (abi_disp, set_abi_disp): Move to tx's TLS slot.
594 * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
596 (GTM::gtm_thread::thread_num): Removed.
597 (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
598 * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
599 tx-to-thread renaming.
600 * beginend.cc: Adapted to tx-to-thread renaming.
601 (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
602 (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
603 * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
604 gtm_transaction to gtm_thread.
605 (_ITM_getThreadnum): Removed. Not supported anymore.
606 * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
607 * libitm.texi: Documented that _ITM_getThreadnum is not supported.
608 * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
609 gtm_tx-to-gtm_thr renaming if necessary.
616 * alloc_cpp.cc: Same.
617 * method-serial.cc: Same.
618 * config/generic/tls.cc: Same.
619 * config/posix/rwlock.h (gtm_rwlock): Same.
620 * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
622 2011-08-12 Torvald Riegel <triegel@redhat.com>
624 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
626 (gtm_rwlock::read_unlock): Same.
627 (gtm_rwlock::write_lock_generic): New. Generalized from ...
628 (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
629 * libitm_i.h (GTM::gtm_transaction): Added shared_state.
630 * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
631 w_upgrade. Replaced by per-transaction flags (in shared_state).
632 Added c_confirmed_writers.
633 (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
634 GTM::gtm_rwlock::write_upgrade): Add tx parameter.
635 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
636 * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
637 * beginend.cc (GTM::gtm_transaction::begin_transaction,
638 _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
639 * libitm.texi: Document locking conventions and implementations in
642 2011-08-12 Torvald Riegel <triegel@redhat.com>
644 * libitm_i.h (next_tx): Add list of all threads' transaction.
645 * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
646 transaction with list of transactions and ...
647 (thread_exit_handler): ... deregister here.
648 * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
649 * config/x86/target.h: Same.
651 2011-08-12 Torvald Riegel <triegel@redhat.com>
653 * testsuite/libitm.c++/static_ctor.C: New file.
655 2011-08-12 Torvald Riegel <triegel@redhat.com>
657 * testsuite/libitm.c/reentrant.c: New file.
659 2011-08-12 Torvald Riegel <triegel@redhat.com>
661 * config/generic/tls.h: Remove the free list for transactions and ...
662 * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
663 (GTM::gtm_transaction::operator delete): ... and release here.
664 (thread_exit_handler): New. Delete tx when thread terminates.
665 (thread_exit_init): New.
666 (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
667 * testsuite/libitm.c/txrelease.c: New file.
669 2011-08-12 Torvald Riegel <triegel@redhat.com>
671 * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
672 * testsuite/libitm.c/notx.c: New file.
674 2011-08-12 Torvald Riegel <triegel@redhat.com>
676 * config/generic/tls.h (gtm_thread): Move local_tid from here ...
677 * libitm_i.h (local_tid): ... to here.
678 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
679 (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
681 2011-08-12 Torvald Riegel <triegel@redhat.com>
683 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
684 serialirr_onwrite_dispatch as new default for now.
685 * method-serial.cc (serialirr_onwrite_dispatch): New.
686 (GTM::dispatch_serialirr_onwrite): New.
689 2011-08-12 Torvald Riegel <triegel@redhat.com>
691 * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
692 * query.cc (_ITM_getTransactionId): There is no active transaction if
693 the current nesting level is zero.
695 2011-07-28 Torvald Riegel <triegel@redhat.com>
697 * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
700 2011-07-28 Torvald Riegel <triegel@redhat.com>
702 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
703 transaction properties from the caller instead of from the
706 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
708 2011-07-28 Torvald Riegel <triegel@redhat.com>
710 * local.cc (gtm_transaction::rollback_local): Support closed nesting.
711 * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
713 * method-serial.cc: Same.
714 * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
715 flat nesting as default, and closed nesting on demand.
716 (GTM::gtm_transaction::rollback): Same.
717 (_ITM_abortTransaction): Same.
718 (GTM::gtm_transaction::restart): Same.
719 (GTM::gtm_transaction::trycommit): Same.
720 (GTM::gtm_transaction::trycommit_and_finalize): Removed.
721 (choose_code_path): New.
722 (GTM::gtm_transaction_cp::save): New.
723 (GTM::gtm_transaction_cp::commit): New.
724 * query.cc (_ITM_inTransaction): Support flat nesting.
725 * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
726 (GTM::gtm_transaction): Support flat and closed nesting.
727 * alloc.cc (commit_allocations_2): New.
728 (commit_cb_data): New helper struct.
729 (GTM::gtm_transaction::commit_allocations): Handle nested
731 * libitm.texi: Update user action section, add description of nesting.
733 2011-07-28 Torvald Riegel <triegel@redhat.com>
735 * libitm_i.h: Add closed nesting as restart reason.
736 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
738 2011-07-28 Torvald Riegel <triegel@redhat.com>
740 * useraction.cc: Use vector instead of list to store actions.
741 Also support partial rollbacks for closed nesting.
742 * libitm_i.h (GTM::gtm_transaction::user_action): Same.
745 2011-07-28 Torvald Riegel <triegel@redhat.com>
747 * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
748 closed_nesting flags, as well as a closed nesting alternative.
749 * method-serial.cc: Same.
750 (serial_dispatch): Renamed to serialirr_dispatch.
751 (GTM::dispatch_serialirr): Same.
752 (serial_dispatch_ul): Renamed to serial_dispatch.
753 (GTM::dispatch_serial): Same.
755 2011-07-28 Torvald Riegel <triegel@redhat.com>
757 * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
759 2011-07-28 Torvald Riegel <triegel@redhat.com>
761 * aatree.h (aa_tree::remove): New.
762 (aa_tree::operator new): Add placement new.
764 2011-07-02 Torvald Riegel <triegel@redhat.com>
766 * containers.h: New file.
767 * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
768 * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
769 * common.h: ... to here.
770 (local_undo): Use GTM::vector for gtm_transaction::local_undo.
773 2011-06-30 Torvald Riegel <triegel@redhat.com>
775 * libitm_i.h (STATE_ABORTING): Remove.
776 * beginend.cc (_ITM_abortTransaction): Same.
777 (GTM::gtm_transaction::trycommit_and_finalize): Same.
778 * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
779 (_ITM_rollbackTransaction): Remove.
782 * libitm.texi: Document these ABI changes.
784 2011-06-30 Torvald Riegel <triegel@redhat.com>
786 * libitm.texi: New file.
787 * Makefile.am: Add libitm.texi.
788 * Makefile.in: Rebuild.
790 2011-06-30 Torvald Riegel <triegel@redhat.com>
792 * libitm_i.h: Move parts to common.h and dispatch.h.
793 * common.h: New file.
794 * dispatch.h: New file, new dispatch class.
795 Rename GTM::abi_dispatch::lock_type to ls_modifier.
796 RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
797 * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
798 decision to retry.cc.
799 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
801 (GTM::gtm_transaction::decide_begin_dispatch): Same.
802 * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
804 * barrier.cc: Use new barriers definitions.
805 (abi_dispatch::memmove_overlap_check): New.
806 * config/x86/x86_sse.cc: Same.
807 * config/x86/x86_avx.cc: Same.
808 * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
810 * Makefile.in: Rebuild.
811 * method-readonly.cc: Remove.
812 * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
813 Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
815 2011-06-30 Torvald Riegel <triegel@redhat.com>
817 * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
818 * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
819 * testsuite/libitm.c/dropref-2.c: Same.
820 * testsuite/libitm.c/dropref.c: Same.
822 2011-06-30 Torvald Riegel <triegel@redhat.com>
824 * config/generic/tls.h (gtm_disp): Rename to abi_disp.
825 * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
826 * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
830 * config/generic/tls.h: Same.
831 * config/x86/tls.h: Same.
835 * method-readonly.cc: Same.
836 * method-serial.cc: Same.
837 * method-wbetl.cc: Same.
840 2011-03-03 Richard Henderson <rth@redhat.com>
842 * config/posix/rwlock.cc (write_upgrade): Add missing case.
843 From Patrik Marlier <patrick.marlier@unine.ch>.
845 2011-02-03 Richard Henderson <rth@redhat.com>
847 * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
848 * configure.ac: Use it.
849 * configure, config.h.in: Rebuild.
850 * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
851 (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
852 _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
853 * libitm.map: Use wildcards to match size_t mangling.
855 2010-12-14 Richard Henderson <rth@redhat.com>
857 * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
858 blocks of TIDs per thread.
859 * config/generic/tls.h (struct gtm_thread): Add local_tid member.
860 (setup_gtm_thr): Return the thread structure.
861 * config/x86/tls.h (setup_gtm_thr): Likewise.
863 2010-12-14 Richard Henderson <rth@redhat.com>
865 * clone.cc (table_lock): Remove.
866 (find_clone): Don't take it.
867 (ExcludeTransaction): New helper class.
868 (_ITM_registerTMCloneTable): Use it.
869 (_ITM_deregisterTMCloneTable): Likewise.
871 2010-12-14 Richard Henderson <rth@redhat.com>
873 * config/x86/tls.h: New file.
875 2010-07-15 Richard Henderson <rth@redhat.com>
877 * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
878 * Makefile.in: Rebuild.
880 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
882 * method-wbetl.cc (trydropreference): Fix source line.
884 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
886 * libitm.h: Add comment.
887 * libitm_i.h (begin_transaction): Add ITM_REGPARM.
889 2010-07-07 Aldy Hernandez <aldyh@redhat.com>
891 * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
892 * beginend.cc (begin_transaction): If 64-bit sync builtins are not
893 available, use pthread mutexes.
894 * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
895 * config.h.in: Regenerate.
896 * configure: Regenerate.
898 2010-07-06 Aldy Hernandez <aldyh@redhat.com>
900 * libitm.h (ITM_PURE): Define.
901 Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
903 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
905 * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
906 (validate): Add comment.
907 (trydropreference): New.
908 * method-readonly.cc (class readonly_dispatch): Add
910 * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
911 Call trydropreference().
912 * libitm.h (_ITM_dropReferences): Remove const attribute.
913 * method-serial.cc (class serial_dispatch): Add trydropreference.
914 * libitm_i.h (struct gtm_dispatch): Add trydropreference.
916 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
918 * memcpy.cc (do_memcpy): Comment.
920 2010-06-25 Aldy Hernandez <aldyh@redhat.com>
922 * barrier.tpl: Add comments throughout.
924 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
926 * method-wbetl.cc (struct w_entry): Add comments.
930 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
932 * alloc_c.cc (_ITM_dropReferences): New.
933 * libitm.map (_ITM_dropReferences): Add.
934 * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
935 * libitm_i.h (struct gtm_transaction): Declare
936 drop_references_allocations and drop_references_local.
937 * local.cc (rollback_local): Ignore memory when applicable.
938 (drop_references_local): New.
940 2010-06-23 Richard Henderson <rth@redhat.com>
942 * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
943 memset.cc, method-serial.cc: Revert the 2010-06-16 change.
944 * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
945 * config/alpha/target.h: Likewise.
946 * config/generic/tls.cc (gtm_mask_stack): Use it.
948 2010-06-23 Richard Henderson <rth@redhat.com>
950 * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
951 a mutex instead of trying a lock-free compare-and-swap on the list.
952 (gtm_cacheline_page::operator delete): Likewise.
954 2010-06-16 Richard Henderson <rth@redhat.com>
956 * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
957 that overlap the libitm stack.
958 * barrier.tpl: Mark incoming stack.
959 * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
960 _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
961 * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
962 * memcpy.cc, memset.cc: Likewise.
963 * method-serial.cc (_ITM_changeTransactionMode): Likewise.
964 * config/generic/tls.h (gtm_thread): Add stack_top member.
965 (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
966 * libitm_i.h (gtm_mask_stack): Declare.
967 * config/generic/tls.cc: New file.
968 * Makefile.am (libitm_la_SOURCES): Add it.
969 (AM_CXXFLAGS): Turn off exceptions.
970 * Makefile.in: Rebuild.
972 2010-06-16 Richard Henderson <rth@redhat.com>
974 * alloc.cc (struct gtm_alloc_action): Move definition ...
975 * libitm_i.h: ... here.
976 (class gtm_transaction): Declare new and delete.
977 * beginend.cc (alloc_tx): Reformulate as operator new.
978 (free_tx): Reformulate as operator delete.
979 * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
981 2010-06-11 Richard Henderson <rth@redhat.com>
983 * clone.cc (clone_entry_compare): Fix typo.
984 From Patrik Marlier <patrick.marlier@unine.ch>.
986 2010-05-13 Richard Henderson <rth@redhat.com>
988 * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
991 2010-05-07 Aldy Hernandez <aldyh@redhat.com>
993 * libitm_i.h (struct gtm_transaction): Remove
995 (record_allocation): Remove size parameter.
996 * libitm.map (_ITM_realloc): Remove.
997 * alloc_c.cc (_ITM_realloc): Remove.
998 (_ITM_malloc): Remove size argument to record_allocation.
1000 * alloc_cpp.cc (_ZGTtnwm): Same.
1001 (_ZGTtnwmRKSt9nothrow_t): Same.
1003 (_ZGTtnamRKSt9nothrow_t): Same.
1004 * alloc.cc (struct gtm_alloc_action): Remove size.
1005 (get_allocation_size): Remove.
1006 (commit_allocations): Add comment.
1007 (record_allocation): Remove size parameter.
1008 (forget_allocation): Remove set of size.
1010 2010-04-19 Aldy Hernandez <aldyh@redhat.com>
1012 * Makefile.am (abi_version): New.
1013 (AM_CXXFLAGS): Pass abi_version.
1014 * Makefile.in: Regenerate.
1015 * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1017 2010-04-06 Aldy Hernandez <aldyh@redhat.com>
1019 * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1020 _ITM_getTMCloneOrIrrevokable.
1021 * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1022 * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1024 2010-03-26 Aldy Hernandez <aldyh@redhat.com>
1026 * configure.ac: Remove Linux futex support.
1027 * configure.tgt (config_path): Same.
1028 * Makefile.am: Same.
1029 * config/linux: Remove entire directory.
1030 * configure: Rebuild.
1031 * Makefile.in: Rebuild.
1032 * testsuite/Makefile.in: Rebuild.
1034 2010-03-09 Aldy Hernandez <aldyh@redhat.com>
1036 * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1037 switching to serial mode.
1038 * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1040 2010-03-03 Aldy Hernandez <aldyh@redhat.com>
1042 * configure.tgt: Add emacs -*- tags.
1043 * barrier.tpl: Same.
1045 2010-02-23 Aldy Hernandez <aldyh@redhat.com>
1047 * Makefile.am: Rename serial.cc to method-serial.cc.
1048 * Makefile.in: Regenerate with automake 1.11.1.
1049 * testsuite/Makefile.in: Same.
1050 * aclocal.m4: Regenerate with aclocal 1.11.1.
1051 * method-serial.cc: Rename from serial.cc.
1052 * libitm_i.h (struct gtm_transaction): Update comment on
1055 2010-02-22 Aldy Hernandez <aldyh@redhat.com>
1057 * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1058 * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1060 2010-02-11 Aldy Hernandez <aldyh@redhat.com>
1062 * configure: Rebuild.
1064 2009-11-12 Richard Henderson <rth@redhat.com>
1066 * Rewrite everything in C++.
1068 2009-11-03 Richard Henderson <rth@redhat.com>
1070 * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1071 * Makefile.am (libitm_la_SOURCES): Add them.
1072 * configure.ac (ARCH_X86): New conditional.
1073 * Makefile.in, configure: Rebuild.
1074 * configure.tgt: Set up ARCH; do cflags setup at the same time.
1075 Move futex setup into "other system configury" case.
1076 * local.c (rollback_local): Merge into ...
1077 (GTM_rollback_local): ... here.
1078 (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1079 (_ITM_LB): Define as an alias to GTM_LB.
1081 2009-11-03 Richard Henderson <rth@redhat.com>
1083 * method-readonly.c: New file.
1084 * Makefile.am (libitm_la_SOURCES): Add it.
1085 * Makefile.in: Rebuild.
1086 * beginend.c (gtm_stmlock_array, gtm_clock): New.
1087 (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1088 * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1089 (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1090 gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1091 gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1092 gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1093 gtm_get_clock, gtm_inc_clock): New.
1094 * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1095 LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1096 LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1097 locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1098 replace uses with new libitm_i.h symbols.
1099 (dispatch_wbetl): Rename from wbetl_dispatch.
1100 * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1101 away from dispatch_readonly; abort if the beginTransaction call
1102 asserted that the transaction was readonly.
1104 2009-11-03 Richard Henderson <rth@redhat.com>
1106 * memset.c: New file.
1107 * Makefile.am (libitm_la_SOURCES): Add it.
1108 * Makefile.in: Rebuild.
1109 * testsuite/libitm.c/memset-1.c: New.
1111 2009-11-03 Richard Henderson <rth@redhat.com>
1113 * dispatch.c: Remove file.
1114 * useraction.c (struct gtm_user_action): Move from libitm.h.
1115 * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1116 (serial_memset, serial_memmove, serial_memcpy): Remove.
1117 (serial_W*, serial_R*): Remove.
1118 (serial_dispatch): Update to match.
1119 * configure.ac: Move Werror down below configure checks. Don't
1120 check for sys/loadavg.h, do check for malloc.h. Don't check for
1121 getloadavg and clock_gettime; do check for memalign, posix_memalign.
1122 Use GCC_AC_FUNC_MMAP_BLACKLIST
1123 * libitm.h: Split out all internal items to...
1124 * libitm_i.h: ... here. New file.
1125 * copymask.c: New file.
1126 * local.c (struct gtm_local_undo): Move from libitm.h.
1127 (GTM_alloc_local): Rename from alloc_local; export.
1128 * memcpy.c: New file.
1129 * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1130 * config/posix/page.c: New file.
1131 * config/posix/target_tls.h: Remove file.
1132 * barrier.c: New file.
1133 * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1135 * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1136 * method-wbetl.c: Rewrite for new cacheline methods.
1137 * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1139 * config/alpha/sjlj.S: Fix typo.
1140 * config/alpha/target_i.h: Copy functions from alpha/target.h.
1141 * config/alpha/copymask.c: New file.
1142 * config/alpha/target.h (CACHELINE_SIZE): New.
1143 (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1145 * config/x86/target_i.h: Copy functions from x86/target.h.
1146 * config/x86/copymask.c: New file.
1147 * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1148 (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1149 (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1150 * config/x86/target_tls.h: Move contents to target_i.h.
1152 * testsuite/libitm.c/clone-1.c: Include libitm.h.
1153 * testsuite/libitm.c/memcpy-1.c: New.
1155 2009-10-22 Richard Henderson <rth@redhat.com>
1157 * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1158 (AM_CCASFLAGS): New.
1159 * configure.ac: Add AM_PROG_AS. Use m4_rename_force for
1160 saving/restoring _AC_ARG_VAR_PRECIOUS.
1161 * Makefile.in, aclocal.m4, config.h.in, configure,
1162 testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1164 2009-10-22 Richard Henderson <rth@redhat.com>
1166 * testsuite/*: Update for new compiler syntax.
1168 2009-10-21 Richard Henderson <rth@redhat.com>
1170 * libitm.h (_ITM_abortReason): Add outerAbort.
1172 2009-08-03 Richard Henderson <rth@redhat.com>
1174 * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1175 _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1176 * method-wbetl.c (struct w_entry): Remove mask.
1177 (wbetl_write, wbetl_load): Return pointer to word containing the data;
1180 2009-07-22 Richard Henderson <rth@redhat.com>
1182 * eh_cpp.c: New file.
1183 * Makefile.am (libitm_la_SOURCES): Add it.
1184 * Makefile.in: Rebuild.
1185 * beginend.c (GTM_rollback_transaction): Undo exception state.
1186 (GTM_trycommit_transaction): Mark inline.
1187 (GTM_trycommit_and_finalize_transaction): Split out from ...
1188 (_ITM_commitTransaction): ... here.
1189 (_ITM_commitTransactionEH): New function.
1190 * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1191 cxa_unthrown, eh_in_flight; reorder.
1193 * testsuite/libitm.c++/c++.exp: New.
1194 * testsuite/libitm.c++/eh-1.C: New.
1196 * aatree.c (aa_free): Remove REGPARM.
1197 * aatree.h: Remove all REGPARM.
1199 2009-07-18 Richard Henderson <rth@redhat.com>
1201 * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1202 * Makefile.am (libitm_la_SOURCES): Add them.
1203 * Makefile.in: Rebuild.
1204 * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1205 (GTM_trycommit_transaction): Likewise.
1206 * libitm.h: Include aatree.h
1207 (struct gtm_alloc_action): New.
1208 (struct gtm_transaction): Add alloc_actions.
1209 (GTM_record_allocation, GTM_forget_allocation): Declare.
1210 (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1211 * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1212 _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1213 _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1214 _ZGTtdaPvRKSt9nothrow_t): Export.
1216 2009-07-18 Richard Henderson <rth@redhat.com>
1218 * target_tls.h: Move ...
1219 * config/posix/target_tls.h: ... here.
1221 2009-07-07 Richard Henderson <rth@redhat.com>
1223 * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1225 2009-07-07 Richard Henderson <rth@redhat.com>
1229 2009-07-07 Richard Henderson <rth@redhat.com>
1231 * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1232 * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1234 * configure.tgt: Don't use -ftls-model for x86 linux.
1235 * libitm.h: Include target.h after standard includes.
1236 (_gtm_thr): Rename from gtm_thr.
1237 (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1238 (gtm_disp, set_gtm_disp): New.
1239 * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1240 retry.c, serial.c, useraction.c: Use accessor functions throughout.
1241 * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1243 2009-07-07 Richard Henderson <rth@redhat.com>
1245 * config/linux/rwlock.c (EZ): New define. Use it throughout.
1247 2009-07-06 Richard Henderson <rth@redhat.com>
1249 * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1250 (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1251 (_ITM_beginTransaction): Take variadic arguments.
1252 (_ITM_registerThrownObject): Declare.
1253 * beginend.c, serial.c: Update.
1254 * libitm.map: Add _ITM_registerThrownObject.
1256 2009-01-28 Richard Henderson <rth@redhat.com>
1258 * Makefile.am (libitm_la_SOURCES): Add clone.c.
1259 * Makefile.in: Rebuild.
1260 * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1261 (GTM_restart_transaction): Fix uninstrumented code check.
1262 * retry.c (GTM_decide_retry_strategy): Add serial check.
1263 * serial.c (GTM_serialmode): Add irrevokable variable. Don't
1264 automatically go irrevokable when in serial mode.
1265 * clone.c: New file.
1266 * libitm.h, libitm.map: Update.
1268 2009-01-27 Richard Henderson <rth@redhat.com>
1270 * Makefile.am (LTCCASCOMPILE): Define.
1271 (libitm_la_SOURCES): Add methid-wbetl.c.
1272 * testsuite/Makefile.am: New
1273 * configure.ac: Add testsuite/Makefile.
1274 * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1275 * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1276 (_ITM_abortTransaction): Finalize implementation method; pass
1277 transaction properties to longjmp.
1278 (GTM_restart_transaction): Split out from ...
1279 (_ITM_commitTransaction): ... here.
1280 * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1281 Move to config/x86/target.h.
1282 * config/linux/alpha/futex_bits.h: New.
1283 * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1284 * config/x86/target.h: Disable target types for 32-bit.
1285 * config/alpha/sjlj.S, config/alpha/target.h: New.
1286 * libitm.h (struct gtm_dispatch): Add init, fini.
1287 (enum restart_reason): New.
1288 (struct gtm_transaction): Add method and restarts.
1289 * retry.c (GTM_decide_retry_strategy): Implement.
1290 * serial.c (serial_init, serial_fini): New.
1291 (GTM_serialmode): Finialize outgoing method.
1292 * method-wbetl.c: New.
1294 2008-12-09 Richard Henderson <rth@redhat.com>
1296 * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1297 * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1298 * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1299 * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1300 (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1301 (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1302 * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1303 * serial.c (serial_R##T, serial_W##T): Likewise.
1305 2008-11-21 Richard Henderson <rth@redhat.com>