Patchwork [21/28] mn10300: Add clzsi2.

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

Comments

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

---
 gcc/config/mn10300/mn10300.md |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
Jeff Law - Jan. 12, 2011, 2:04 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.md |   23 +++++++++++++++++++++++
>  1 files changed, 23 insertions(+), 0 deletions(-)
OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNLbTyAAoJEBRtltQi2kC7O2MH/3TG9kbnngCXWAZjVuL1dWQm
rgp7Snldrk9DQQpNH346tuCfS9h+jH5zk+9gNq2jiGnRFYcMQULJceDMdPh4YeIh
LHq4Uz3MNv7JiJpOidVedsubPAxZuoWkA7A87fijtArMGJ1xy9kzZt0ecqINB4pl
fpQJqbuqXlRJvc9YpN74APVWoSLHb8PaB2U5+GThvNuQt3l6uRBSDrkeI6D8xS2C
P2oBlbDTJMiESE21lQrqqQ1Tv74uIeFwXrJMzTmjoKyhftAQSdzZzXSyDJSVlz8e
yTMEquBQ2OWIztO6cSIg9mweoVffkxhvjWDlSxeMaPw9bC0i2KdolQdSb3fiUP8=
=ZR1P
-----END PGP SIGNATURE-----

Patch

diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index 4f4fdfe..0f04a41 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -38,6 +38,7 @@ 
   (UNSPEC_GOTSYM_OFF	5)
 
   (UNSPEC_EXT		6)
+  (UNSPEC_BSCH		7)
 ])
 
 (include "predicates.md")
@@ -1389,6 +1390,28 @@ 
 )
 
 ;; ----------------------------------------------------------------------
+;; MISCELANEOUS
+;; ----------------------------------------------------------------------
+
+(define_expand "clzsi2"
+  [(parallel [(set (match_operand:SI 0 "register_operand" "")
+		   (unspec:SI [(match_operand:SI 1 "register_operand" "")
+			       (const_int 0)] UNSPEC_BSCH))
+	      (clobber (reg:CC CC_REG))])]
+  "TARGET_AM33"
+)
+
+(define_insn "*bsch"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(unspec:SI [(match_operand:SI 1 "register_operand" "r")
+		    (match_operand:SI 2 "nonmemory_operand" "0")]
+		   UNSPEC_BSCH))
+   (clobber (reg:CC CC_REG))]
+  "TARGET_AM33"
+  "bsch %1,%0"
+)
+
+;; ----------------------------------------------------------------------
 ;; FP INSTRUCTIONS
 ;; ----------------------------------------------------------------------