2011-11-12 Richard Henderson <rth@redhat.com>
+ * builtins.c (expand_builtin_compare_and_swap): If target is const0,
+ don't pass the target to expand_atomic_compare_and_swap.
+ (expand_builtin_atomic_compare_exchange): Likewise.
+
+ * config/sh/linux.h (TARGET_INIT_LIBFUNCS): New.
+ * config/sh/sh.c (sh_init_sync_libfuncs): New.
+
* config/pa/pa-linux.h (TARGET_SYNC_LIBCALL): New.
* config/pa/pa.h (TARGET_SYNC_LIBCALL): New default.
* config/pa/pa.c (pa_init_libfuncs): Use init_sync_libfuncs.