public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: gengqi <gengqi@linux.alibaba.com>
To: gcc-patches@gcc.gnu.org, gengqi@linux.alibaba.com
Subject: [PATCH 5/7] C-SKY: Add insn "ldbs".
Date: Thu, 29 Oct 2020 21:23:01 +0800	[thread overview]
Message-ID: <20201029132302.1616-5-gengqi@linux.alibaba.com> (raw)
In-Reply-To: <20201029132302.1616-1-gengqi@linux.alibaba.com>

gcc/ChangeLog:

	config/csky/csky.md (cskyv2_sextend_ldbs): New insn.
---
 gcc/config/csky/csky.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gcc/config/csky/csky.md b/gcc/config/csky/csky.md
index 62875bf..ce9c252 100644
--- a/gcc/config/csky/csky.md
+++ b/gcc/config/csky/csky.md
@@ -1533,6 +1533,7 @@
   }"
 )
 
+;; hi -> si
 (define_insn "extendhisi2"
   [(set (match_operand:SI		  0 "register_operand" "=r")
 	(sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
@@ -1557,6 +1558,15 @@
   "sextb  %0, %1"
 )
 
+(define_insn "*cskyv2_sextend_ldbs"
+  [(set (match_operand:SI		  0 "register_operand" "=r")
+        (sign_extend:SI (match_operand:QI 1 "csky_simple_mem_operand" "m")))]
+  "CSKY_ISA_FEATURE (E2)"
+  "ld.bs\t%0, %1"
+  [(set_attr "length" "4")
+   (set_attr "type" "load")]
+)
+
 ;; qi -> hi
 (define_insn "extendqihi2"
   [(set (match_operand:HI		  0 "register_operand" "=r")
-- 
2.7.4


  parent reply	other threads:[~2020-10-29 13:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 13:22 [PATCH 1/7] C-SKY: Add fpuv3 instructions and CK860 arch gengqi
2020-10-29 13:22 ` [PATCH 2/7] C-SKY: Delete LO_REGS and HI_REGS, use HILO_REGS instead gengqi
2020-10-29 13:22 ` [PATCH 3/7] C-SKY: Bug fix for bad setting of TARGET_DSP and TARGET_DIV gengqi
2020-10-29 13:23 ` [PATCH 4/7] C-SKY: Separate FRAME_POINTER_REGNUM into FRAME_POINTER_REGNUM and HARD_FRAME_POINTER_REGNUM gengqi
2020-10-29 13:23 ` gengqi [this message]
2020-10-29 13:23 ` [PATCH 6/7] C-SKY: Cases for csky fpuv3 instructions gengqi
2020-10-30  3:28 ` [PATCH 1/7] C-SKY: Add fpuv3 instructions and CK860 arch Cooper Qu
2020-11-13 19:14   ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201029132302.1616-5-gengqi@linux.alibaba.com \
    --to=gengqi@linux.alibaba.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).