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