OSDN Git Service

mn10300: Auto-clobber the flags in asms.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Jan 2011 17:59:31 +0000 (17:59 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Jan 2011 17:59:31 +0000 (17:59 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168725 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mn10300/mn10300.c

index 70c69e3..c6ec1d5 100644 (file)
@@ -1,5 +1,8 @@
 2011-01-12  Richard Henderson  <rth@redhat.com>
 
+       * config/mn10300/mn10300.c (mn10300_md_asm_clobbers): New.
+       (TARGET_MD_ASM_CLOBBERS): New.
+
        * config/mn10300/mn10300.c (mn10300_delegitimize_address): New.
        (TARGET_DELEGITIMIZE_ADDRESS): New.
 
index 1cea6c2..f9be6ea 100644 (file)
@@ -2716,6 +2716,20 @@ mn10300_conditional_register_usage (void)
     fixed_regs[PIC_OFFSET_TABLE_REGNUM] =
     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
 }
+
+/* Worker function for TARGET_MD_ASM_CLOBBERS.
+   We do this in the mn10300 backend to maintain source compatibility
+   with the old cc0-based compiler.  */
+
+static tree
+mn10300_md_asm_clobbers (tree outputs ATTRIBUTE_UNUSED,
+                         tree inputs ATTRIBUTE_UNUSED,
+                         tree clobbers)
+{
+  clobbers = tree_cons (NULL_TREE, build_string (5, "EPSW"),
+                        clobbers);
+  return clobbers;
+}
 \f
 /* Initialize the GCC target structure.  */
 
@@ -2809,4 +2823,7 @@ mn10300_conditional_register_usage (void)
 #undef  TARGET_CONDITIONAL_REGISTER_USAGE
 #define TARGET_CONDITIONAL_REGISTER_USAGE mn10300_conditional_register_usage
 
+#undef TARGET_MD_ASM_CLOBBERS
+#define TARGET_MD_ASM_CLOBBERS  mn10300_md_asm_clobbers
+
 struct gcc_target targetm = TARGET_INITIALIZER;