From ca89e1557ee269f350a8ef413d808119905ada97 Mon Sep 17 00:00:00 2001 From: kazu Date: Wed, 13 Nov 2002 01:11:58 +0000 Subject: [PATCH] * config/h8300/h8300.md (*andorsi3): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59063 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/config/h8300/h8300.md | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1bf25fe..471b4da 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-11-12 Kazu Hirata + + * config/h8300/h8300.md (*andorsi3): New. + 2002-11-12 Franz Sirl * doc/install.texi (powerpc-*-linux-gnu*): Update binutils requirement. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 129ff63..f8a8944 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -1118,6 +1118,25 @@ [(set_attr "length" "4") (set_attr "cc" "clobber")]) +(define_insn "*andorsi3" + [(set (match_operand:SI 0 "register_operand" "=r") + (ior:SI (and:SI (match_operand:SI 2 "register_operand" "r") + (match_operand:SI 3 "single_one_operand" "n")) + (match_operand:SI 1 "register_operand" "0")))] + "(INTVAL (operands[3]) & 0xffff) != 0" + "* +{ + operands[3] = GEN_INT (INTVAL (operands[3]) & 0xffff); + if (INTVAL (operands[3]) > 128) + { + operands[3] = GEN_INT (INTVAL (operands[3]) >> 8); + return \"bld\\t%V3,%x2\;bst\\t%V3,%x0\"; + } + return \"bld\\t%V3,%w2\;bst\\t%V3,%w0\"; +}" + [(set_attr "length" "4") + (set_attr "cc" "clobber")]) + (define_expand "andsi3" [(set (match_operand:SI 0 "register_operand" "") (and:SI (match_operand:SI 1 "register_operand" "") -- 2.7.4