[Gc] Re[10]: PATCH: Add x32 support to boehm-gc

Ivan Maidanski ivmai at mail.ru
Mon Oct 8 08:28:52 PDT 2012


Hi H.J.,

Fix AO_compare_double_and_swap_double_full for x32 in this branch: https://github.com/ivmai/libatomic_ops/tree/fix-double-cas-x32 (diff against master: https://github.com/ivmai/libatomic_ops/compare/master...fix-double-cas-x32)
Please test it.

In fact, gcc/x86.h defines only double_compare_and_swap for x32 and compare_double_and_swap_double is defined now in generalize.h.

(Sorry for the delay but I've applied a dozen of patches related to code refactoring, double_cas testing (and improvement of MS VC code) these days - https://github.com/ivmai/libatomic_ops/compare/c6dc43294bda5516dea392cd4d994cbd1a18288e...dcf66b7de2f053d4c27fe96e6c7587f1fb183209)



Regards,
Ivan

Mon, 1 Oct 2012 06:30:57 -0700 "H.J. Lu" <hjl.tools at gmail.com>:
>	
>
>
	
	
>
		
		
			
>On Mon, Oct 1, 2012 at 5:54 AM, Ivan Maidanski <ivmai at mail.ru> wrote:
>
> Hi H.J,
>
>
>
> Done both (in the same branch). Please retry.
>
>
>
> I've implemented double CAS using __sync_bool_compare_and_swap (similar to
>
> normal CAS on x86_64 starting from GCC 4.2). Please inspect the assembly
>
> code for it (as you pointed out it should be cmpxchg but not cmpxchg8b).
>
> Also, I don't add cast of __sync_bool_compare_and_swap result to int (I
>
> assume the problem should be already fixed on GCC with x32 support - please
>
> check that GCC does not report warnings in AO_double_compare_and_swap_full).
>
>
AO_compare_double_and_swap_double_full is wrong for x32. Why do we
>
need it for x32 since x32 has AO_double_compare_and_swap_full?
>
>
-- 
>
H.J.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20121008/be5a1b1c/attachment.htm


More information about the Gc mailing list