OSDN Git Service

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