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