+2014-12-10 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/64180
+ * config/rs6000/rs6000.c (TARGET_MD_ASM_CLOBBERS): Define.
+ (rs6000_md_asm_clobbers): New function.
+
2014-12-10 Felix Yang <felix.yang@huawei.com>
* config/aarch64/aarch64-protos.h (aarch64_function_profiler): Remove
#undef TARGET_ASM_LOOP_ALIGN_MAX_SKIP
#define TARGET_ASM_LOOP_ALIGN_MAX_SKIP rs6000_loop_align_max_skip
+#undef TARGET_MD_ASM_CLOBBERS
+#define TARGET_MD_ASM_CLOBBERS rs6000_md_asm_clobbers
+
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE rs6000_option_override
| ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
}
+/* Implement TARGET_MD_ASM_CLOBBERS. All asm statements are considered
+ to clobber the XER[CA] bit because clobbering that bit without telling
+ the compiler worked just fine with versions of GCC before GCC 5, and
+ breaking a lot of older code in ways that are hard to track down is
+ not such a great idea. */
+
+static tree
+rs6000_md_asm_clobbers (tree, tree, tree clobbers)
+{
+ tree s = build_string (strlen (reg_names[CA_REGNO]), reg_names[CA_REGNO]);
+ return tree_cons (NULL_TREE, s, clobbers);
+}
+
/* Override command line options. Mostly we process the processor type and
sometimes adjust other TARGET_ options. */