1 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
3 * configure.tgt (target_cpu): Handle sparc and sparc64 & sparcv9.
4 * config/sparc/cacheline.h: New file.
5 * config/sparc/target.h: Likewise.
6 * config/sparc/sjlj.S: Likewise.
7 * config/linux/sparc/futex_bits.h: Likewise.
9 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
11 * configure.ac (link_itm): Fix comment.
12 * configure: Regenerate.
13 * testsuite/lib/libitm.exp: Do not pass -litm for the link.
15 2012-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18 * testsuite/libitm.c++/c++.exp (lang_link_flags): Add
20 Correct libgomp references.
22 2012-01-24 Torvald Riegel <triegel@redhat.com>
24 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
27 2012-01-24 Uros Bizjak <ubizjak@gmail.com>
29 * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
31 * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
32 offset values. Do not copy return address. Decrement stack
34 (GTM_longjump) [__x86_64__]: Update offset values.
36 2012-01-23 Uros Bizjak <ubizjak@gmail.com>
39 * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
40 the first function argument to %eax.
42 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
44 * libitm.h (_ITM_getThreadnum): Remove.
45 * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
47 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
49 * clearcap.map: New file.
50 * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
51 * configure.ac: Call it.
52 Clear HWCAP_LDFLAGS if defaulting to -mavx.
53 * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
54 * configure: Regenerate.
55 * Makefile.in: Regenerate.
56 * testsuite/Makefile.in: Regenerate.
58 2012-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
61 * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
62 include, exclude options.
64 2012-01-14 Torvald Riegel <triegel@redhat.com>
66 * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
68 * containers.h (GTM::vector::set_size): New.
70 2012-01-14 Torvald Riegel <triegel@redhat.com>
73 * config/generic/tls.h (GTM::mask_stack_top): New.
74 (GTM::mask_stack_bottom): Declare.
75 * config/generic/tls.c (GTM::mask_stack_bottom): New.
76 * local.cc (gtm_undolog::rollback): Filter out any updates that
77 overlap the libitm stack. Add current transaction as parameter.
78 * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
79 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
80 * testsuite/libitm.c/stackundo.c: New test.
82 2012-01-10 Richard Henderson <rth@redhat.com>
84 * libitm_i.h (_Unwind_DeleteException): Declare weak.
85 * eh_cpp.cc (_Unwind_DeleteException): Define for
86 !HAVE_ELF_STYLE_WEAKREF.
88 2012-01-08 Torvald Riegel <triegel@redhat.com>
90 * local.cc (GTM_LB): Use GTM::gtm_undolog.
91 (GTM::gtm_thread::drop_references_undolog): Remove.
92 (GTM::gtm_thread::commit_undolog,
93 GTM::gtm_thread::rollback_undolog): Move to ...
94 * libitm_i.h (GTM::gtm_undolog): ...here. New.
95 (GTM::gtm_undolog_entry): Remove.
96 (GTM::gtm_thread): Adapt.
97 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
98 (GTM::gtm_thread::trycommit): Adapt.
99 * method-serial.cc (serial_dispatch::log): Adapt.
100 * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
101 (gl_wt_dispatch::store): Fix likely/unlikely.
102 * containers.h (GTM::vector::resize): Add additional_capacity
103 parameter and handle it.
104 (GTM::vector::resize_noinline): New/adapt.
105 (GTM::vector::push): New.
107 2012-01-06 Richard Henderson <rth@redhat.com>
109 * configure.tgt: Support powerpc-linux and powerpc-darwin.
110 * config/linux/powerpc/futex_bits.h: New file.
111 * config/powerpc/cacheline.h: New file.
112 * config/powerpc/sjlj.S: New file.
113 * config/powerpc/target.h: New file.
114 * config/generic/asmcfi.h (cfi_offset): New.
115 (cfi_restore, cfi_undefined): New.
117 2012-01-05 Aldy Hernandez <aldyh@redhat.com>
120 * testsuite/libitm.c/reentrant.c: Remove xfail.
121 (thread): Pass x to pure().
122 From Patrik Marlier <patrick.marlier@gmail.com>.
124 2011-12-24 Torvald Riegel <triegel@redhat.com>
126 * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
127 privatization safety if already in serial mode.
129 2011-12-24 Torvald Riegel <triegel@redhat.com>
131 * beginend.cc (GTM::gtm_thread::restart): Add and handle
132 finish_serial_upgrade parameter.
133 * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
134 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
135 Don't unset reader flag.
136 (GTM::gtm_rwlock::write_upgrade_finish): New.
137 * config/posix/rwlock.cc: Same.
138 * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
140 * config/posix/rwlock.h: Same.
141 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
142 flag after commit or after rollback when restarting.
144 2011-12-24 Torvald Riegel <triegel@redhat.com>
146 * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
147 (GTM::gtm_thread::try_commit): Changed memory order.
148 * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
150 * config/linux/x86/futex_bits.h (sys_futex0): Same.
151 * config/linux/sh/futex_bits.h (sys_futex0): Same.
152 * config/linux/futex_bits.h (sys_futex0): Same.
153 * config/linux/futex.cc (futex_wait, futex_wake): Same.
154 * config/linux/futex.h (futex_wait, futex_wake): Same.
155 * config/linux/rwlock.h (gtm_rwlock::writers,
156 gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
158 * config/linux/rwlock.cc (gtm_rwlock::read_lock,
159 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
160 gtm_rwlock::write_unlock): Fix memory orders and fences.
161 * config/posix/rwlock.cc (gtm_rwlock::read_lock,
162 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
163 gtm_rwlock::write_unlock): Same.
164 * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
165 * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
166 gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
168 (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
169 gl_wt_dispatch::load, gl_wt_dispatch::store,
170 gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
171 orders and fences. Add comments.
173 2011-12-21 Jakub Jelinek <jakub@redhat.com>
175 * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
176 * Makefile.in: Regenerated.
178 2011-12-17 Kaz Kojima <kkojima@gcc.gnu.org>
180 * configure.tgt: Add sh* case.
181 * config/sh/target.h: New file.
182 * config/sh/sjlj.S: New file.
183 * config/linux/sh/futex_bits.h: New file.
185 2011-12-14 Richard Henderson <rth@redhat.com>
187 * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
188 * config/arm/sjlj.S, config/arm/target.h: New files.
189 * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
190 (cfi_rel_offset): New.
191 * config/linux/futex_bits.h: New file.
192 * config/linux/futex.cc: Include futex_bits.h here...
193 * config/linux/futex.h: ... not here.
194 * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
195 * configure.ac (ARCH_AM): New conditional.
196 * Makefile.in, configure: Rebuild.
197 * configure.tgt: Handle ARM.
199 2011-12-13 Richard Henderson <rth@redhat.com>
201 * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
202 signed/unsigned comparison werror.
204 * local_atomic: New file.
205 * libitm_i.h: Include it.
206 (gtm_thread::shared_state): Use atomic template.
207 * beginend.cc (GTM::gtm_clock): Use atomic template.
208 (global_tid): Use atomic template if 64-bit atomics available.
209 (gtm_thread::gtm_thread): Update shared_state access.
210 (gtm_thread::trycommit): Likewise.
211 (choose_code_path): Update global_tid access.
212 * method-gl.cc (gl_mg::orec): Use atomic template. Update all users.
213 * stmlock.h (GTM::gtm_clock): Use atomic template.
214 (gtm_get_clock, gtm_inc_clock): Update accesses.
215 * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
216 redundant __sync_synchronize after atomic shared_state access.
217 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
218 (gtm_rwlock::write_lock_generic): Likewise.
219 (gtm_rwlock::read_unlock): Likewise.
220 * config/alpha/target.h (atomic_read_barrier): Remove.
221 (atomic_write_barrier): Remove.
222 * config/x86/target.h (atomic_read_barrier): Remove.
223 (atomic_write_barrier): Remove.
225 2011-11-30 Richard Henderson <rth@redhat.com>
227 * libitm_i.h (GTM_longjmp): Swap first and second arguments.
228 * beginend.c (_ITM_abortTransaction): Update to match.
229 (GTM::gtm_thread::restart): Likewise.
230 * config/alpha/sjlj.S (GTM_longjmp): Likewise.
231 * config/x86/sjlj.S (GTM_longjmp): Likewise.
233 2011-11-23 Iain Sandoe <iains@gcc.gnu.org>
235 * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
236 * Makefile.in: Regenerate.
238 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
240 * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
241 * alloc_cpp.cc: Generate dummy functions if we don't
242 HAVE_ELF_STYLE_WEAKREF.
243 * eh_cpp.cc: Likewise.
244 * configure: Regenerate.
245 * aclocal.m4: Likewise.
246 * config.h.in: Likewise.
247 * Makefile.in: Likewise.
248 * testsuite/Makefile.in: Likewise.
250 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
252 * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
253 __USER_LABEL_PREFIX__ for targets that use it.
254 (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
255 (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
256 in portability to non-elf targets.
257 (GTM_longjmp): Likewise.
258 * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
261 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
263 * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
264 * testsuite/libitm.c/memset-1.c: Likewise.
266 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
268 * configure: Regenerate.
270 2011-11-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
272 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
273 (LIBITM_ENABLE_SYMVERS): Handle sun style.
274 * Makefile.am: Handle sun style versioning.
275 (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
276 * configure: Regenerate.
277 * Makefile.in: Regenerate.
279 2011-11-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
281 * config/generic/asmcfi.h: Fix comment.
282 * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
283 sequence without .hidden support, error for non-ELF targets.
284 (GTM_longjmp) [__ELF__]: Only use .hidden if
285 HAVE_ATTRIBUTE_VISIBILITY.
287 2011-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
289 * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
290 _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
292 * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
293 __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
295 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
298 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
299 * configure: Regenerate.
301 2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
303 * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
305 2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
307 * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
309 (.note.GNU-stack): Only use if __linux__.
310 * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
311 * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
312 * testsuite/libitm.c/reentrant.c: Likewise.
313 * testsuite/libitm.c/simple-2.c: Likewise.
314 * testsuite/libitm.c/txrelease.c: Likewise.
315 * testsuite/libitm.c++/static_ctor.C: Likewise.
317 2011-11-10 Richard Henderson <rth@redhat.com>
319 * config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
320 * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
321 * configure.ac (ARCH_X86_AVX): New conditional.
322 * Makefile.in, configure: Rebuild.
324 2011-11-09 Richard Henderson <rth@redhat.com>
326 * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
327 * configure.ac: Use it.
328 * config.h.in, configure: Rebuild.
329 * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
331 2011-11-09 Richard Henderson <rth@redhat.com>
333 * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
334 * config/alpha/unaligned.h: Remove file.
335 * config/generic/unaligned.h: Remove file.
336 * config/x86/unaligned.h: Remove file.
337 * config/generic/cachepage.h: Remove file.
338 * config/posix/cachepage.cc: Remove file.
339 * config/generic/cacheline.cc: Remove file.
340 * config/x86/cacheline.cc: Remove file.
341 * config/generic/cacheline.h (gtm_cacheline): Remove the
342 store_mask, copy_mask, copy_mask_wb methods.
343 * config/x86/cacheline.h: Likewise.
344 * config/alpha/cacheline.h: Fall back to generic after setting size.
345 * config/generic/tls.cc (gtm_mask_stack): Remove.
346 * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
347 (GTM_vpalignr_table): Remove.
348 * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
349 (GTM_pshift_table): Remove.
350 * config/libitm_i.h: Don't include cachepage.h.
351 * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
352 * Makefile.in, testsuite/Makefile.in: Rebuild.
354 2011-11-09 Richard Henderson <rth@redhat.com>
356 * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
357 to emit branch prediction hint.
359 * config/x86/sjlj.S: Protect elf directives with __ELF__.
360 Protect .note.GNU-stack with __linux__.
362 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
363 * configure, aclocal.m4, config.h.in: Rebuild.
364 * config/generic/asmcfi.h: New file.
365 * config/x86/sjlj.S: Use it.
367 2011-11-08 Richard Henderson <rth@redhat.com>
369 * local.cc (_ITM_LB): Use a normal call, not a function alias.
371 2011-11-08 Richard Henderson <rth@redhat.com>
373 * configure.tgt: Test correct directory for supported cpus.
375 * configure.ac: Exit if unsupported.
376 * configure: Rebuild.
377 * configure.tgt: Delete boilerplate from libgomp for unsupported
378 targets. Set UNSUPPORTED for unsupported targets.
380 2011-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
382 * configure.tgt: Handle i386 like i[456]86.
383 * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
385 * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
386 !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
388 2011-11-05 Aldy Hernandez <aldyh@redhat.com>
390 * method-wbetl.cc: Update copyright notice.
397 * useraction.cc: Same.
401 * config/generic/tls.cc: Same.
402 * config/generic/cacheline.h: Same.
403 * config/generic/cachepage.h: Same.
404 * config/generic/cacheline.cc: Same.
405 * config/generic/unaligned.h: Same.
406 * config/x86/cacheline.h: Same.
407 * config/x86/cacheline.cc: Same.
408 * config/x86/unaligned.h: Same.
409 * config/alpha/cacheline.h: Same.
410 * config/alpha/unaligned.h: Same.
411 * config/alpha/sjlj.S: Same.
412 * config/posix/cachepage.cc: Same.
413 * config/linux/futex.h: Same.
414 * config/linux/alpha/futex_bits.h: Same.
416 2011-11-04 Torvald Riegel <triegel@redhat.com>
418 * libitm.texi: No cover text and invariant sections.
420 2011-11-03 Richard Henderson <rth@redhat.com>
422 * local_type_traits: New file.
423 * libitm_i.h: Use it. Use C headers, not C++ wrappers.
425 2011-11-03 Richard Henderson <rth@redhat.com>
427 * configure.ac: Don't test for gfortran.
428 * configure: Rebuild.
430 * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
431 * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
433 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
435 * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
436 * testsuite/libitm.c/memset-1.c: Same.
437 * testsuite/libitm.c/c.exp: Same.
438 * testsuite/lib/libitm-dg.exp: Same.
439 * testsuite/lib/libitm.exp: Same.
440 * testsuite/libitm.c++/c++.exp: Same.
442 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
444 * testsuite/config/default.exp: Update copyright date.
445 * configure.ac: Add copyright info.
446 * configure.tgt: Same.
448 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
450 * testsuite/libitm.c/reentrant.c: XFAIL.
451 * testsuite/libitm.c++/static_ctor.C: XFAIL.
453 2011-10-29 Torvald Riegel <triegel@redhat.com>
455 * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
457 (_ITM_abortTransaction): Handle aborts of outer transactions.
459 * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
460 * libitm.texi: Document aborts of outer transactions.
461 * testsuite/libitm.c/cancel.c: New file.
463 2011-10-19 Torvald Riegel <triegel@redhat.com>
465 * testsuite/*: Change __transaction to __transaction_atomic or
466 __transaction_relaxed.
468 2011-10-19 Torvald Riegel <triegel@redhat.com>
470 * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
473 2011-10-19 Torvald Riegel <triegel@redhat.com>
475 * libitm_i.h: Add gl_wt dispatch.
476 * retry.cc (parse_default_method): Same.
477 * method-gl.cc: New file.
478 * Makefile.am: Use method-gl.cc.
479 * Makefile.in: Rebuild.
481 2011-10-19 Torvald Riegel <triegel@redhat.com>
483 * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
484 safety if requested by a TM method.
485 * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
486 privatization safety.
487 * method-serial.cc: Same.
489 2011-10-19 Torvald Riegel <triegel@redhat.com>
491 * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
492 (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
493 undolog-related member functions from *_local to *_undolog.
494 * local.cc (gtm_thread::commit_undolog): Same.
495 * beginend.cc (GTM::gtm_thread::trycommit): Same.
496 (GTM::gtm_thread::rollback): Roll back undolog before
497 dispatch-specific rollback.
499 2011-10-19 Torvald Riegel <triegel@redhat.com>
501 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
502 re-initialization of the current method group.
503 * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
505 2011-10-19 Torvald Riegel <triegel@redhat.com>
507 * alloc.cc (commit_allocations_2): Do not free transaction-local
508 memory when committing a nested transaction.
510 2011-10-19 Torvald Riegel <triegel@redhat.com>
512 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
513 serial-irrevocable dispatch, not serial.
515 2011-10-19 Torvald Riegel <triegel@redhat.com>
517 * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
519 * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
520 * method-serial.cc: Implement begin_or_restart().
521 * beginend.cc (GTM::gtm_thread::begin_transaction): Call
522 dispatch-specific begin_or_restart().
523 (GTM::gtm_thread::restart): Same.
525 2011-08-23 Torvald Riegel <triegel@redhat.com>
527 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
528 restarting without switching to serial mode.
529 (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
530 transaction state. Choose closed-nesting alternative if available.
531 (GTM::gtm_thread::set_default_dispatch): New.
532 (parse_default_method): New.
533 (GTM::gtm_thread::number_of_threads_changed): New.
534 * method-serial.cc (GTM::serial_mg): New method group class.
535 (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
537 (GTM::serial_dispatch): Same.
538 (GTM::serialirr_onwrite_dispatch): Same.
539 (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
540 * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
542 (GTM::gtm_thread::gtm_thread): Same.
543 (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
544 (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
545 (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
546 choose dispatch but set state according to dispatch here.
547 * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
548 (GTM::method_group): New class.
549 (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
550 * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
551 * libitm.texi: Document TM methods, method groups, method life cycle.
552 Rename method sets to method groups.
554 2011-08-23 Torvald Riegel <triegel@redhat.com>
556 * config/x86/tls.h: Moved to ...
557 * config/linux/x86/tls.h: ... here.
559 2011-08-23 Torvald Riegel <triegel@redhat.com>
561 * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
563 * config/x86/sjlj.S: Same.
565 2011-08-19 Torvald Riegel <triegel@redhat.com>
567 * config/linux/rwlock.h: New file.
568 * config/linux/rwlock.c: New file.
569 * configure.ac: Reenable futex support (undo SVN rev 157758).
571 * configure.tgt: Same.
572 * config/linux/alpha/futex_bits.h: Same.
573 * config/linux/futex.h: Same. Return number of woken processes.
574 * config/linux/futex.cc: Same.
575 (futex_wait): Remove spinning.
576 * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
577 Use __x86_64__ instead of __LP64__.
578 * aclocal.m4: Include generic futex checks.
579 * configure: Rebuild.
580 * Makefile.in: Rebuild.
581 * testsuite/Makefile.in: Rebuild.
582 * beginend.cc: Include pthread.h.
583 * config/posix/cachepage.cc: Same.
585 2011-08-12 Torvald Riegel <triegel@redhat.com>
587 * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
588 (abi_disp, set_abi_disp): Move to tx's TLS slot.
590 * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
592 (GTM::gtm_thread::thread_num): Removed.
593 (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
594 * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
595 tx-to-thread renaming.
596 * beginend.cc: Adapted to tx-to-thread renaming.
597 (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
598 (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
599 * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
600 gtm_transaction to gtm_thread.
601 (_ITM_getThreadnum): Removed. Not supported anymore.
602 * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
603 * libitm.texi: Documented that _ITM_getThreadnum is not supported.
604 * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
605 gtm_tx-to-gtm_thr renaming if necessary.
612 * alloc_cpp.cc: Same.
613 * method-serial.cc: Same.
614 * config/generic/tls.cc: Same.
615 * config/posix/rwlock.h (gtm_rwlock): Same.
616 * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
618 2011-08-12 Torvald Riegel <triegel@redhat.com>
620 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
622 (gtm_rwlock::read_unlock): Same.
623 (gtm_rwlock::write_lock_generic): New. Generalized from ...
624 (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
625 * libitm_i.h (GTM::gtm_transaction): Added shared_state.
626 * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
627 w_upgrade. Replaced by per-transaction flags (in shared_state).
628 Added c_confirmed_writers.
629 (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
630 GTM::gtm_rwlock::write_upgrade): Add tx parameter.
631 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
632 * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
633 * beginend.cc (GTM::gtm_transaction::begin_transaction,
634 _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
635 * libitm.texi: Document locking conventions and implementations in
638 2011-08-12 Torvald Riegel <triegel@redhat.com>
640 * libitm_i.h (next_tx): Add list of all threads' transaction.
641 * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
642 transaction with list of transactions and ...
643 (thread_exit_handler): ... deregister here.
644 * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
645 * config/x86/target.h: Same.
647 2011-08-12 Torvald Riegel <triegel@redhat.com>
649 * testsuite/libitm.c++/static_ctor.C: New file.
651 2011-08-12 Torvald Riegel <triegel@redhat.com>
653 * testsuite/libitm.c/reentrant.c: New file.
655 2011-08-12 Torvald Riegel <triegel@redhat.com>
657 * config/generic/tls.h: Remove the free list for transactions and ...
658 * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
659 (GTM::gtm_transaction::operator delete): ... and release here.
660 (thread_exit_handler): New. Delete tx when thread terminates.
661 (thread_exit_init): New.
662 (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
663 * testsuite/libitm.c/txrelease.c: New file.
665 2011-08-12 Torvald Riegel <triegel@redhat.com>
667 * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
668 * testsuite/libitm.c/notx.c: New file.
670 2011-08-12 Torvald Riegel <triegel@redhat.com>
672 * config/generic/tls.h (gtm_thread): Move local_tid from here ...
673 * libitm_i.h (local_tid): ... to here.
674 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
675 (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
677 2011-08-12 Torvald Riegel <triegel@redhat.com>
679 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
680 serialirr_onwrite_dispatch as new default for now.
681 * method-serial.cc (serialirr_onwrite_dispatch): New.
682 (GTM::dispatch_serialirr_onwrite): New.
685 2011-08-12 Torvald Riegel <triegel@redhat.com>
687 * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
688 * query.cc (_ITM_getTransactionId): There is no active transaction if
689 the current nesting level is zero.
691 2011-07-28 Torvald Riegel <triegel@redhat.com>
693 * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
696 2011-07-28 Torvald Riegel <triegel@redhat.com>
698 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
699 transaction properties from the caller instead of from the
702 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
704 2011-07-28 Torvald Riegel <triegel@redhat.com>
706 * local.cc (gtm_transaction::rollback_local): Support closed nesting.
707 * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
709 * method-serial.cc: Same.
710 * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
711 flat nesting as default, and closed nesting on demand.
712 (GTM::gtm_transaction::rollback): Same.
713 (_ITM_abortTransaction): Same.
714 (GTM::gtm_transaction::restart): Same.
715 (GTM::gtm_transaction::trycommit): Same.
716 (GTM::gtm_transaction::trycommit_and_finalize): Removed.
717 (choose_code_path): New.
718 (GTM::gtm_transaction_cp::save): New.
719 (GTM::gtm_transaction_cp::commit): New.
720 * query.cc (_ITM_inTransaction): Support flat nesting.
721 * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
722 (GTM::gtm_transaction): Support flat and closed nesting.
723 * alloc.cc (commit_allocations_2): New.
724 (commit_cb_data): New helper struct.
725 (GTM::gtm_transaction::commit_allocations): Handle nested
727 * libitm.texi: Update user action section, add description of nesting.
729 2011-07-28 Torvald Riegel <triegel@redhat.com>
731 * libitm_i.h: Add closed nesting as restart reason.
732 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
734 2011-07-28 Torvald Riegel <triegel@redhat.com>
736 * useraction.cc: Use vector instead of list to store actions.
737 Also support partial rollbacks for closed nesting.
738 * libitm_i.h (GTM::gtm_transaction::user_action): Same.
741 2011-07-28 Torvald Riegel <triegel@redhat.com>
743 * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
744 closed_nesting flags, as well as a closed nesting alternative.
745 * method-serial.cc: Same.
746 (serial_dispatch): Renamed to serialirr_dispatch.
747 (GTM::dispatch_serialirr): Same.
748 (serial_dispatch_ul): Renamed to serial_dispatch.
749 (GTM::dispatch_serial): Same.
751 2011-07-28 Torvald Riegel <triegel@redhat.com>
753 * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
755 2011-07-28 Torvald Riegel <triegel@redhat.com>
757 * aatree.h (aa_tree::remove): New.
758 (aa_tree::operator new): Add placement new.
760 2011-07-02 Torvald Riegel <triegel@redhat.com>
762 * containers.h: New file.
763 * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
764 * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
765 * common.h: ... to here.
766 (local_undo): Use GTM::vector for gtm_transaction::local_undo.
769 2011-06-30 Torvald Riegel <triegel@redhat.com>
771 * libitm_i.h (STATE_ABORTING): Remove.
772 * beginend.cc (_ITM_abortTransaction): Same.
773 (GTM::gtm_transaction::trycommit_and_finalize): Same.
774 * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
775 (_ITM_rollbackTransaction): Remove.
778 * libitm.texi: Document these ABI changes.
780 2011-06-30 Torvald Riegel <triegel@redhat.com>
782 * libitm.texi: New file.
783 * Makefile.am: Add libitm.texi.
784 * Makefile.in: Rebuild.
786 2011-06-30 Torvald Riegel <triegel@redhat.com>
788 * libitm_i.h: Move parts to common.h and dispatch.h.
789 * common.h: New file.
790 * dispatch.h: New file, new dispatch class.
791 Rename GTM::abi_dispatch::lock_type to ls_modifier.
792 RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
793 * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
794 decision to retry.cc.
795 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
797 (GTM::gtm_transaction::decide_begin_dispatch): Same.
798 * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
800 * barrier.cc: Use new barriers definitions.
801 (abi_dispatch::memmove_overlap_check): New.
802 * config/x86/x86_sse.cc: Same.
803 * config/x86/x86_avx.cc: Same.
804 * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
806 * Makefile.in: Rebuild.
807 * method-readonly.cc: Remove.
808 * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
809 Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
811 2011-06-30 Torvald Riegel <triegel@redhat.com>
813 * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
814 * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
815 * testsuite/libitm.c/dropref-2.c: Same.
816 * testsuite/libitm.c/dropref.c: Same.
818 2011-06-30 Torvald Riegel <triegel@redhat.com>
820 * config/generic/tls.h (gtm_disp): Rename to abi_disp.
821 * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
822 * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
826 * config/generic/tls.h: Same.
827 * config/x86/tls.h: Same.
831 * method-readonly.cc: Same.
832 * method-serial.cc: Same.
833 * method-wbetl.cc: Same.
836 2011-03-03 Richard Henderson <rth@redhat.com>
838 * config/posix/rwlock.cc (write_upgrade): Add missing case.
839 From Patrik Marlier <patrick.marlier@unine.ch>.
841 2011-02-03 Richard Henderson <rth@redhat.com>
843 * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
844 * configure.ac: Use it.
845 * configure, config.h.in: Rebuild.
846 * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
847 (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
848 _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
849 * libitm.map: Use wildcards to match size_t mangling.
851 2010-12-14 Richard Henderson <rth@redhat.com>
853 * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
854 blocks of TIDs per thread.
855 * config/generic/tls.h (struct gtm_thread): Add local_tid member.
856 (setup_gtm_thr): Return the thread structure.
857 * config/x86/tls.h (setup_gtm_thr): Likewise.
859 2010-12-14 Richard Henderson <rth@redhat.com>
861 * clone.cc (table_lock): Remove.
862 (find_clone): Don't take it.
863 (ExcludeTransaction): New helper class.
864 (_ITM_registerTMCloneTable): Use it.
865 (_ITM_deregisterTMCloneTable): Likewise.
867 2010-12-14 Richard Henderson <rth@redhat.com>
869 * config/x86/tls.h: New file.
871 2010-07-15 Richard Henderson <rth@redhat.com>
873 * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
874 * Makefile.in: Rebuild.
876 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
878 * method-wbetl.cc (trydropreference): Fix source line.
880 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
882 * libitm.h: Add comment.
883 * libitm_i.h (begin_transaction): Add ITM_REGPARM.
885 2010-07-07 Aldy Hernandez <aldyh@redhat.com>
887 * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
888 * beginend.cc (begin_transaction): If 64-bit sync builtins are not
889 available, use pthread mutexes.
890 * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
891 * config.h.in: Regenerate.
892 * configure: Regenerate.
894 2010-07-06 Aldy Hernandez <aldyh@redhat.com>
896 * libitm.h (ITM_PURE): Define.
897 Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
899 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
901 * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
902 (validate): Add comment.
903 (trydropreference): New.
904 * method-readonly.cc (class readonly_dispatch): Add
906 * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
907 Call trydropreference().
908 * libitm.h (_ITM_dropReferences): Remove const attribute.
909 * method-serial.cc (class serial_dispatch): Add trydropreference.
910 * libitm_i.h (struct gtm_dispatch): Add trydropreference.
912 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
914 * memcpy.cc (do_memcpy): Comment.
916 2010-06-25 Aldy Hernandez <aldyh@redhat.com>
918 * barrier.tpl: Add comments throughout.
920 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
922 * method-wbetl.cc (struct w_entry): Add comments.
926 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
928 * alloc_c.cc (_ITM_dropReferences): New.
929 * libitm.map (_ITM_dropReferences): Add.
930 * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
931 * libitm_i.h (struct gtm_transaction): Declare
932 drop_references_allocations and drop_references_local.
933 * local.cc (rollback_local): Ignore memory when applicable.
934 (drop_references_local): New.
936 2010-06-23 Richard Henderson <rth@redhat.com>
938 * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
939 memset.cc, method-serial.cc: Revert the 2010-06-16 change.
940 * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
941 * config/alpha/target.h: Likewise.
942 * config/generic/tls.cc (gtm_mask_stack): Use it.
944 2010-06-23 Richard Henderson <rth@redhat.com>
946 * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
947 a mutex instead of trying a lock-free compare-and-swap on the list.
948 (gtm_cacheline_page::operator delete): Likewise.
950 2010-06-16 Richard Henderson <rth@redhat.com>
952 * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
953 that overlap the libitm stack.
954 * barrier.tpl: Mark incoming stack.
955 * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
956 _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
957 * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
958 * memcpy.cc, memset.cc: Likewise.
959 * method-serial.cc (_ITM_changeTransactionMode): Likewise.
960 * config/generic/tls.h (gtm_thread): Add stack_top member.
961 (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
962 * libitm_i.h (gtm_mask_stack): Declare.
963 * config/generic/tls.cc: New file.
964 * Makefile.am (libitm_la_SOURCES): Add it.
965 (AM_CXXFLAGS): Turn off exceptions.
966 * Makefile.in: Rebuild.
968 2010-06-16 Richard Henderson <rth@redhat.com>
970 * alloc.cc (struct gtm_alloc_action): Move definition ...
971 * libitm_i.h: ... here.
972 (class gtm_transaction): Declare new and delete.
973 * beginend.cc (alloc_tx): Reformulate as operator new.
974 (free_tx): Reformulate as operator delete.
975 * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
977 2010-06-11 Richard Henderson <rth@redhat.com>
979 * clone.cc (clone_entry_compare): Fix typo.
980 From Patrik Marlier <patrick.marlier@unine.ch>.
982 2010-05-13 Richard Henderson <rth@redhat.com>
984 * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
987 2010-05-07 Aldy Hernandez <aldyh@redhat.com>
989 * libitm_i.h (struct gtm_transaction): Remove
991 (record_allocation): Remove size parameter.
992 * libitm.map (_ITM_realloc): Remove.
993 * alloc_c.cc (_ITM_realloc): Remove.
994 (_ITM_malloc): Remove size argument to record_allocation.
996 * alloc_cpp.cc (_ZGTtnwm): Same.
997 (_ZGTtnwmRKSt9nothrow_t): Same.
999 (_ZGTtnamRKSt9nothrow_t): Same.
1000 * alloc.cc (struct gtm_alloc_action): Remove size.
1001 (get_allocation_size): Remove.
1002 (commit_allocations): Add comment.
1003 (record_allocation): Remove size parameter.
1004 (forget_allocation): Remove set of size.
1006 2010-04-19 Aldy Hernandez <aldyh@redhat.com>
1008 * Makefile.am (abi_version): New.
1009 (AM_CXXFLAGS): Pass abi_version.
1010 * Makefile.in: Regenerate.
1011 * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1013 2010-04-06 Aldy Hernandez <aldyh@redhat.com>
1015 * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1016 _ITM_getTMCloneOrIrrevokable.
1017 * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1018 * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1020 2010-03-26 Aldy Hernandez <aldyh@redhat.com>
1022 * configure.ac: Remove Linux futex support.
1023 * configure.tgt (config_path): Same.
1024 * Makefile.am: Same.
1025 * config/linux: Remove entire directory.
1026 * configure: Rebuild.
1027 * Makefile.in: Rebuild.
1028 * testsuite/Makefile.in: Rebuild.
1030 2010-03-09 Aldy Hernandez <aldyh@redhat.com>
1032 * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1033 switching to serial mode.
1034 * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1036 2010-03-03 Aldy Hernandez <aldyh@redhat.com>
1038 * configure.tgt: Add emacs -*- tags.
1039 * barrier.tpl: Same.
1041 2010-02-23 Aldy Hernandez <aldyh@redhat.com>
1043 * Makefile.am: Rename serial.cc to method-serial.cc.
1044 * Makefile.in: Regenerate with automake 1.11.1.
1045 * testsuite/Makefile.in: Same.
1046 * aclocal.m4: Regenerate with aclocal 1.11.1.
1047 * method-serial.cc: Rename from serial.cc.
1048 * libitm_i.h (struct gtm_transaction): Update comment on
1051 2010-02-22 Aldy Hernandez <aldyh@redhat.com>
1053 * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1054 * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1056 2010-02-11 Aldy Hernandez <aldyh@redhat.com>
1058 * configure: Rebuild.
1060 2009-11-12 Richard Henderson <rth@redhat.com>
1062 * Rewrite everything in C++.
1064 2009-11-03 Richard Henderson <rth@redhat.com>
1066 * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1067 * Makefile.am (libitm_la_SOURCES): Add them.
1068 * configure.ac (ARCH_X86): New conditional.
1069 * Makefile.in, configure: Rebuild.
1070 * configure.tgt: Set up ARCH; do cflags setup at the same time.
1071 Move futex setup into "other system configury" case.
1072 * local.c (rollback_local): Merge into ...
1073 (GTM_rollback_local): ... here.
1074 (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1075 (_ITM_LB): Define as an alias to GTM_LB.
1077 2009-11-03 Richard Henderson <rth@redhat.com>
1079 * method-readonly.c: New file.
1080 * Makefile.am (libitm_la_SOURCES): Add it.
1081 * Makefile.in: Rebuild.
1082 * beginend.c (gtm_stmlock_array, gtm_clock): New.
1083 (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1084 * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1085 (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1086 gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1087 gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1088 gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1089 gtm_get_clock, gtm_inc_clock): New.
1090 * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1091 LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1092 LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1093 locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1094 replace uses with new libitm_i.h symbols.
1095 (dispatch_wbetl): Rename from wbetl_dispatch.
1096 * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1097 away from dispatch_readonly; abort if the beginTransaction call
1098 asserted that the transaction was readonly.
1100 2009-11-03 Richard Henderson <rth@redhat.com>
1102 * memset.c: New file.
1103 * Makefile.am (libitm_la_SOURCES): Add it.
1104 * Makefile.in: Rebuild.
1105 * testsuite/libitm.c/memset-1.c: New.
1107 2009-11-03 Richard Henderson <rth@redhat.com>
1109 * dispatch.c: Remove file.
1110 * useraction.c (struct gtm_user_action): Move from libitm.h.
1111 * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1112 (serial_memset, serial_memmove, serial_memcpy): Remove.
1113 (serial_W*, serial_R*): Remove.
1114 (serial_dispatch): Update to match.
1115 * configure.ac: Move Werror down below configure checks. Don't
1116 check for sys/loadavg.h, do check for malloc.h. Don't check for
1117 getloadavg and clock_gettime; do check for memalign, posix_memalign.
1118 Use GCC_AC_FUNC_MMAP_BLACKLIST
1119 * libitm.h: Split out all internal items to...
1120 * libitm_i.h: ... here. New file.
1121 * copymask.c: New file.
1122 * local.c (struct gtm_local_undo): Move from libitm.h.
1123 (GTM_alloc_local): Rename from alloc_local; export.
1124 * memcpy.c: New file.
1125 * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1126 * config/posix/page.c: New file.
1127 * config/posix/target_tls.h: Remove file.
1128 * barrier.c: New file.
1129 * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1131 * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1132 * method-wbetl.c: Rewrite for new cacheline methods.
1133 * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1135 * config/alpha/sjlj.S: Fix typo.
1136 * config/alpha/target_i.h: Copy functions from alpha/target.h.
1137 * config/alpha/copymask.c: New file.
1138 * config/alpha/target.h (CACHELINE_SIZE): New.
1139 (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1141 * config/x86/target_i.h: Copy functions from x86/target.h.
1142 * config/x86/copymask.c: New file.
1143 * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1144 (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1145 (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1146 * config/x86/target_tls.h: Move contents to target_i.h.
1148 * testsuite/libitm.c/clone-1.c: Include libitm.h.
1149 * testsuite/libitm.c/memcpy-1.c: New.
1151 2009-10-22 Richard Henderson <rth@redhat.com>
1153 * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1154 (AM_CCASFLAGS): New.
1155 * configure.ac: Add AM_PROG_AS. Use m4_rename_force for
1156 saving/restoring _AC_ARG_VAR_PRECIOUS.
1157 * Makefile.in, aclocal.m4, config.h.in, configure,
1158 testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1160 2009-10-22 Richard Henderson <rth@redhat.com>
1162 * testsuite/*: Update for new compiler syntax.
1164 2009-10-21 Richard Henderson <rth@redhat.com>
1166 * libitm.h (_ITM_abortReason): Add outerAbort.
1168 2009-08-03 Richard Henderson <rth@redhat.com>
1170 * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1171 _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1172 * method-wbetl.c (struct w_entry): Remove mask.
1173 (wbetl_write, wbetl_load): Return pointer to word containing the data;
1176 2009-07-22 Richard Henderson <rth@redhat.com>
1178 * eh_cpp.c: New file.
1179 * Makefile.am (libitm_la_SOURCES): Add it.
1180 * Makefile.in: Rebuild.
1181 * beginend.c (GTM_rollback_transaction): Undo exception state.
1182 (GTM_trycommit_transaction): Mark inline.
1183 (GTM_trycommit_and_finalize_transaction): Split out from ...
1184 (_ITM_commitTransaction): ... here.
1185 (_ITM_commitTransactionEH): New function.
1186 * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1187 cxa_unthrown, eh_in_flight; reorder.
1189 * testsuite/libitm.c++/c++.exp: New.
1190 * testsuite/libitm.c++/eh-1.C: New.
1192 * aatree.c (aa_free): Remove REGPARM.
1193 * aatree.h: Remove all REGPARM.
1195 2009-07-18 Richard Henderson <rth@redhat.com>
1197 * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1198 * Makefile.am (libitm_la_SOURCES): Add them.
1199 * Makefile.in: Rebuild.
1200 * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1201 (GTM_trycommit_transaction): Likewise.
1202 * libitm.h: Include aatree.h
1203 (struct gtm_alloc_action): New.
1204 (struct gtm_transaction): Add alloc_actions.
1205 (GTM_record_allocation, GTM_forget_allocation): Declare.
1206 (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1207 * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1208 _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1209 _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1210 _ZGTtdaPvRKSt9nothrow_t): Export.
1212 2009-07-18 Richard Henderson <rth@redhat.com>
1214 * target_tls.h: Move ...
1215 * config/posix/target_tls.h: ... here.
1217 2009-07-07 Richard Henderson <rth@redhat.com>
1219 * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1221 2009-07-07 Richard Henderson <rth@redhat.com>
1225 2009-07-07 Richard Henderson <rth@redhat.com>
1227 * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1228 * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1230 * configure.tgt: Don't use -ftls-model for x86 linux.
1231 * libitm.h: Include target.h after standard includes.
1232 (_gtm_thr): Rename from gtm_thr.
1233 (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1234 (gtm_disp, set_gtm_disp): New.
1235 * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1236 retry.c, serial.c, useraction.c: Use accessor functions throughout.
1237 * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1239 2009-07-07 Richard Henderson <rth@redhat.com>
1241 * config/linux/rwlock.c (EZ): New define. Use it throughout.
1243 2009-07-06 Richard Henderson <rth@redhat.com>
1245 * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1246 (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1247 (_ITM_beginTransaction): Take variadic arguments.
1248 (_ITM_registerThrownObject): Declare.
1249 * beginend.c, serial.c: Update.
1250 * libitm.map: Add _ITM_registerThrownObject.
1252 2009-01-28 Richard Henderson <rth@redhat.com>
1254 * Makefile.am (libitm_la_SOURCES): Add clone.c.
1255 * Makefile.in: Rebuild.
1256 * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1257 (GTM_restart_transaction): Fix uninstrumented code check.
1258 * retry.c (GTM_decide_retry_strategy): Add serial check.
1259 * serial.c (GTM_serialmode): Add irrevokable variable. Don't
1260 automatically go irrevokable when in serial mode.
1261 * clone.c: New file.
1262 * libitm.h, libitm.map: Update.
1264 2009-01-27 Richard Henderson <rth@redhat.com>
1266 * Makefile.am (LTCCASCOMPILE): Define.
1267 (libitm_la_SOURCES): Add methid-wbetl.c.
1268 * testsuite/Makefile.am: New
1269 * configure.ac: Add testsuite/Makefile.
1270 * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1271 * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1272 (_ITM_abortTransaction): Finalize implementation method; pass
1273 transaction properties to longjmp.
1274 (GTM_restart_transaction): Split out from ...
1275 (_ITM_commitTransaction): ... here.
1276 * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1277 Move to config/x86/target.h.
1278 * config/linux/alpha/futex_bits.h: New.
1279 * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1280 * config/x86/target.h: Disable target types for 32-bit.
1281 * config/alpha/sjlj.S, config/alpha/target.h: New.
1282 * libitm.h (struct gtm_dispatch): Add init, fini.
1283 (enum restart_reason): New.
1284 (struct gtm_transaction): Add method and restarts.
1285 * retry.c (GTM_decide_retry_strategy): Implement.
1286 * serial.c (serial_init, serial_fini): New.
1287 (GTM_serialmode): Finialize outgoing method.
1288 * method-wbetl.c: New.
1290 2008-12-09 Richard Henderson <rth@redhat.com>
1292 * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1293 * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1294 * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1295 * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1296 (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1297 (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1298 * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1299 * serial.c (serial_R##T, serial_W##T): Likewise.
1301 2008-11-21 Richard Henderson <rth@redhat.com>