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