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
9bb77117
Commit
9bb77117
authored
Dec 08, 1992
by
Jeff Law
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* pa.c (shadd_operand): Newfunction.
From-SVN: r2850
parent
a603c4aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
gcc/config/pa/pa.c
+15
-0
gcc/config/pa/pa.md
+4
-4
No files found.
gcc/config/pa/pa.c
View file @
9bb77117
...
...
@@ -2520,3 +2520,18 @@ function_label_operand (op, mode)
{
return
GET_CODE
(
op
)
==
SYMBOL_REF
&&
FUNCTION_NAME_P
(
XSTR
(
op
,
0
));
}
/* Return 1 if OP is suitable for the second add operand (the unshifed
operand) in an shadd instruction. Allow CONST_INT to work around
a reload bug. */
int
shadd_operand
(
op
,
mode
)
rtx
op
;
enum
machine_mode
mode
;
{
if
(
GET_CODE
(
op
)
==
REG
)
return
1
;
if
(
GET_CODE
(
op
)
==
CONST_INT
)
return
1
;
return
0
;
}
gcc/config/pa/pa.md
View file @
9bb77117
...
...
@@ -2039,13 +2039,13 @@
[
(set_attr "type" "load")
(set_attr "length" "1")])
;; Using
nonmemory
_operand works around a bug in reload. For 2.4 fix
;; Using
shadd
_operand works around a bug in reload. For 2.4 fix
;; reload and use register_operand instead.
(define_insn ""
[
(set (match_operand:SI 0 "register_operand" "=r")
(plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
(const_int 2))
(match_operand:SI 1 "
nonmemory
_operand" "r")))]
(match_operand:SI 1 "
shadd
_operand" "r")))]
""
"sh1add %2,%1,%0")
...
...
@@ -2053,7 +2053,7 @@
[
(set (match_operand:SI 0 "register_operand" "=r")
(plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
(const_int 4))
(match_operand:SI 1 "
nonmemory
_operand" "r")))]
(match_operand:SI 1 "
shadd
_operand" "r")))]
""
"sh2add %2,%1,%0")
...
...
@@ -2061,7 +2061,7 @@
[
(set (match_operand:SI 0 "register_operand" "=r")
(plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
(const_int 8))
(match_operand:SI 1 "
nonmemory
_operand" "r")))]
(match_operand:SI 1 "
shadd
_operand" "r")))]
""
"sh3add %2,%1,%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