Patchwork [26/28] mn10300: Auto-clobber the flags in asms.

login
register
mail settings
Submitter Richard Henderson
Date Jan. 10, 2011, 8:31 p.m.
Message ID <1294691517-19580-27-git-send-email-rth@redhat.com>
Download mbox | patch
Permalink /patch/78220/
State New
Headers show

Comments

Richard Henderson - Jan. 10, 2011, 8:31 p.m.
From: Richard Henderson <rth@twiddle.net>

---
 gcc/config/mn10300/mn10300.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
Jeff Law - Jan. 12, 2011, 2:05 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/10/11 13:31, Richard Henderson wrote:
> From: Richard Henderson <rth@twiddle.net>
> 
> ---
>  gcc/config/mn10300/mn10300.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)
OK.
Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNLbVGAAoJEBRtltQi2kC7OyEIAKE/EDyz/lZwHuZcR0m0ShNE
MZuqeRZUByZB2MMocemReGye7kh+4306TAUBRl9dAm6fV84CydDTiJBc2SnfMOGK
BX1N8AZbyhpLHFcSJ43Q3URGI/oWPB5hGQP0AOQGpoIQy/42W12Yz3aUDHqUGaKU
YqyDF4iNIEiLfBXHHFs1NnHSMFGnwjLMjJ3+BVKOBfXlpPENMg+wQvOLe/65AFVL
s6rUZbEPVGIHspF/0vg4T0ZzySER9cbFDMqXW+bgdcgMh4ahMkO4OoMJ416CB4pR
Z3xiXmahnhRbWqoI+b4YGz0FmA/Xq/GpZhP+EXUfd5HmgEo3zk0X2kSqMfiQh5c=
=dboo
-----END PGP SIGNATURE-----

Patch

diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 17e58fe..25bfa0d 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -2909,6 +2909,21 @@  mn10300_split_and_operand_count (rtx op)
       return -count;
     }
 }
+
+
+/* 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;
+}
 
 /* Initialize the GCC target structure.  */
 
@@ -3005,4 +3020,7 @@  mn10300_split_and_operand_count (rtx op)
 #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;