OSDN Git Service

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