From: Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>
To: <gcc-patches@gcc.gnu.org>
Cc: <Claudiu.Zissulescu@synopsys.com>, <Francois.Bedard@synopsys.com>,
<andrew.burgess@embecosm.com>
Subject: [PATCH 1/5] [ARC] Update sleep builtin.
Date: Fri, 06 Apr 2018 09:00:00 -0000 [thread overview]
Message-ID: <1523005214-1611-2-git-send-email-claziss@synopsys.com> (raw)
In-Reply-To: <1523005214-1611-1-git-send-email-claziss@synopsys.com>
From: claziss <claziss@synopsys.com>
gcc/
2017-05-09 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
* config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
and short u6 immediate.
(check_if_valid_sleep_operand): Remove.
* config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
---
gcc/config/arc/arc-protos.h | 1 -
gcc/config/arc/arc.c | 26 --------------------------
gcc/config/arc/arc.md | 4 ++--
3 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
index 75cfeda..0ba6871 100644
--- a/gcc/config/arc/arc-protos.h
+++ b/gcc/config/arc/arc-protos.h
@@ -59,7 +59,6 @@ void arc_asm_output_aligned_decl_local (FILE *, tree, const char *,
unsigned HOST_WIDE_INT);
extern rtx arc_return_addr_rtx (int , rtx);
extern bool check_if_valid_regno_const (rtx *, int);
-extern bool check_if_valid_sleep_operand (rtx *, int);
extern bool arc_legitimate_constant_p (machine_mode, rtx);
extern bool arc_legitimate_pic_addr_p (rtx);
extern bool arc_raw_symbolic_reference_mentioned_p (rtx, bool);
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 3564696..47d3ba4 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -6573,11 +6573,6 @@ arc_expand_builtin (tree exp,
fold (arg0);
op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL);
- if (!CONST_INT_P (op0) || !satisfies_constraint_L (op0))
- {
- error ("builtin operand should be an unsigned 6-bit value");
- return NULL_RTX;
- }
gcc_assert (icode != 0);
emit_insn (GEN_FCN (icode) (op0));
return NULL_RTX;
@@ -6925,27 +6920,6 @@ check_if_valid_regno_const (rtx *operands, int opno)
return false;
}
-/* Check that after all the constant folding, whether the operand to
- __builtin_arc_sleep is an unsigned int of 6 bits. If not, flag an error. */
-
-bool
-check_if_valid_sleep_operand (rtx *operands, int opno)
-{
- switch (GET_CODE (operands[opno]))
- {
- case CONST :
- case CONST_INT :
- if( UNSIGNED_INT6 (INTVAL (operands[opno])))
- return true;
- /* FALLTHRU */
- default:
- fatal_error (input_location,
- "operand for sleep instruction must be an unsigned 6 bit compile-time constant");
- break;
- }
- return false;
-}
-
/* Return true if it is ok to make a tail-call to DECL. */
static bool
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index fb34329..2ec2b48 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -4794,9 +4794,9 @@ archs4x, archs4xd, archs4xd_slow"
(define_insn "sleep"
- [(unspec_volatile [(match_operand:SI 0 "immediate_operand" "L")]
+ [(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "Lr")]
VUNSPEC_ARC_SLEEP)]
- "check_if_valid_sleep_operand(operands,0)"
+ ""
"sleep %0"
[(set_attr "length" "4")
(set_attr "type" "misc")])
--
1.9.1
next prev parent reply other threads:[~2018-04-06 9:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-06 9:00 [PATCH 0/5] [ARC] General fixes Claudiu Zissulescu
2018-04-06 9:00 ` [PATCH 2/5] [ARC] Fix FLS, SETI patterns Claudiu Zissulescu
2018-04-18 17:57 ` Andrew Burgess
2018-04-23 10:34 ` Claudiu Zissulescu
2018-04-06 9:00 ` [PATCH 4/5] [ARC] Cleanup sdata handling Claudiu Zissulescu
2018-04-27 21:40 ` Andrew Burgess
2018-04-30 13:18 ` Claudiu Zissulescu
2018-04-06 9:00 ` Claudiu Zissulescu [this message]
2018-04-18 17:51 ` [PATCH 1/5] [ARC] Update sleep builtin Andrew Burgess
2018-04-23 9:57 ` Claudiu Zissulescu
2018-04-06 9:00 ` [PATCH 3/5] [ARC] Update movhi and movdi patterns Claudiu Zissulescu
2018-04-27 21:39 ` Andrew Burgess
2018-04-30 13:17 ` Claudiu Zissulescu
2018-04-06 9:00 ` [PATCH 5/5] [ARC] Clear the instruction cache using syscalls Claudiu Zissulescu
2018-04-27 21:44 ` Andrew Burgess
2018-04-30 13:34 ` Claudiu Zissulescu
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=1523005214-1611-2-git-send-email-claziss@synopsys.com \
--to=claudiu.zissulescu@synopsys.com \
--cc=Francois.Bedard@synopsys.com \
--cc=andrew.burgess@embecosm.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).