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