OSDN Git Service

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