From d2aa833741aade61681b2dfe666fe12c8a8bdbc6 Mon Sep 17 00:00:00 2001
From: kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 22 Dec 2002 14:45:52 +0000
Subject: [PATCH] 	* config/h8300/h8300.md (negsf2): New. 
 (*negsf2_h8300): Likewise. 	(*negsf2_h8300hs): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60405 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog             |  6 ++++++
 gcc/config/h8300/h8300.md | 22 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 807897d060e3..b59abe05f5f2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-12-22  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* config/h8300/h8300.md (negsf2): New.
+	(*negsf2_h8300): Likewise.
+	(*negsf2_h8300hs): Likewise.
+
 2002-12-21  Geoffrey Keating  <geoffk@apple.com>
 
 	* integrate.c (output_inline_function): Don't hold private
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index 7b44c8873b2c..f5254f1fce83 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -1389,6 +1389,28 @@
   [(set_attr "length" "2")
    (set_attr "cc" "set_zn")])
 
+(define_expand "negsf2"
+  [(set (match_operand:SF 0 "register_operand" "")
+	(neg:SF (match_operand:SF 1 "register_operand" "")))]
+  ""
+  "")
+
+(define_insn "*negsf2_h8300"
+  [(set (match_operand:SF 0 "register_operand" "=r")
+	(neg:SF (match_operand:SF 1 "register_operand" "0")))]
+  "TARGET_H8300"
+  "xor.b\t#128,%z0"
+  [(set_attr "cc" "clobber")
+   (set_attr "length" "2")])
+
+(define_insn "*negsf2_h8300hs"
+  [(set (match_operand:SF 0 "register_operand" "=r")
+	(neg:SF (match_operand:SF 1 "register_operand" "0")))]
+  "TARGET_H8300H || TARGET_H8300S"
+  "xor.w\t#32768,%e0"
+  [(set_attr "cc" "clobber")
+   (set_attr "length" "4")])
+
 ;; ----------------------------------------------------------------------
 ;; NOT INSTRUCTIONS
 ;; ----------------------------------------------------------------------
-- 
GitLab