Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
5fd7eed0
Commit
5fd7eed0
authored
Jul 28, 1993
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(shift_operand): New function.
From-SVN: r5027
parent
42d93ca6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
gcc/config/sparc/sparc.c
+13
-0
gcc/config/sparc/sparc.md
+3
-3
No files found.
gcc/config/sparc/sparc.c
View file @
5fd7eed0
...
...
@@ -432,6 +432,19 @@ arith_double_operand (op, mode)
&&
(
unsigned
)
(
INTVAL
(
op
)
+
0x1000
)
<
0x2000
));
}
/* Return true if OP is a register, or is a CONST_INT that can fit in a 5
bit unsigned immediate field. This is an acceptable SImode operand for
the count field of shift instructions. */
int
shift_operand
(
op
,
mode
)
rtx
op
;
enum
machine_mode
mode
;
{
return
(
register_operand
(
op
,
mode
)
||
(
GET_CODE
(
op
)
==
CONST_INT
&&
(
unsigned
)
(
INTVAL
(
op
))
<
32
));
}
/* Return truth value of whether OP is a integer which fits the
range constraining immediate operands in most three-address insns,
which have a 13 bit immediate field. */
...
...
gcc/config/sparc/sparc.md
View file @
5fd7eed0
...
...
@@ -2538,21 +2538,21 @@
(define_insn "ashlsi3"
[
(set (match_operand:SI 0 "register_operand" "=r")
(ashift:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "
arith
_operand" "rI")))]
(match_operand:SI 2 "
shift
_operand" "rI")))]
""
"sll %1,%2,%0")
(define_insn "ashrsi3"
[
(set (match_operand:SI 0 "register_operand" "=r")
(ashiftrt:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "
arith
_operand" "rI")))]
(match_operand:SI 2 "
shift
_operand" "rI")))]
""
"sra %1,%2,%0")
(define_insn "lshrsi3"
[
(set (match_operand:SI 0 "register_operand" "=r")
(lshiftrt:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "
arith
_operand" "rI")))]
(match_operand:SI 2 "
shift
_operand" "rI")))]
""
"srl %1,%2,%0")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment