OSDN Git Service

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