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