OSDN Git Service

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