OSDN Git Service

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