Hi Michael, I've committed the workaround (avoiding __builtin_expect in AO_stack_pop_explicit_aux_acquire for gcc-4/alpha): https://github.com/ivmai/libatomic_ops/commit/00d7cb807015b109df11b9227fbc7f35babdee16 (But, of course, it would be good if someone report/fix bug in gcc.)
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680100#15 Regards, Ivan Tue, 23 Oct 2012 11:37:33 +1300 Michael Cree <mc...@orcon.net.nz>: > > > > >On 22/10/2012, at 8:08 PM, Ivan Maidanski wrote: > > I guess you haven't got time to inspect assembly of broken code > > (Alpha target). > > I was busy at the time but then I totally forgot about this! > > > I think it would be ok for now, just to find which use of > > AO_EXPECT_FALSE results in broken code and create a workaround > > avoiding AO_EXPECT_FALSE exactly at that place. > > Interestingly doing any one of options 2 or 3 result in the test suite > passing. > > > 2. AO_stack_pop_explicit_aux_acquire: > > if (AO_EXPECT_FALSE(first != AO_load(list))) { > > -> > > if (first != AO_load(list)) { > > > > 3. AO_stack_pop_explicit_aux_acquire: > > if (AO_EXPECT_FALSE(!AO_compare_and_swap_release(list, first, > > next))) { > > -> > > if (!AO_compare_and_swap_release(list, first, next)) { > > They are quite close together in the code. I wonder if there is some > interaction between them. I really must look at the generated > assembly to see if the compiler is at fault but that will probably > have to wait another day or two. > > Cheers > Michael. > > > _______________________________________________ > Gc mailing list >g...@linux.hpl.hp.com >http://www.hpl.hp.com/hosted/linux/mail-archives/gc/ >