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
a6ec530c
Commit
a6ec530c
authored
Sep 12, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(adddi3, subdi3, negdi2): Add constraints so output reg does not
overlap one reg with one of the inputs. From-SVN: r10325
parent
ac1bc2ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
gcc/config/rs6000/rs6000.md
+26
-18
No files found.
gcc/config/rs6000/rs6000.md
View file @
a6ec530c
...
@@ -3510,7 +3510,11 @@
...
@@ -3510,7 +3510,11 @@
[
(set_attr "type" "fp")
]
)
[
(set_attr "type" "fp")
]
)
;; Define the DImode operations that can be done in a small number
;; Define the DImode operations that can be done in a small number
;; of instructions.
;; of instructions. The & constraints are to prevent the register
;; allocator from allocating registers that overlap with the inputs
;; (for example, having an input in 7,8 and an output in 6,7). We
;; also allow for the the output being the same as one of the inputs.
(define_expand "adddi3"
(define_expand "adddi3"
[
(set (match_operand:DI 0 "gpc_reg_operand" "")
[
(set (match_operand:DI 0 "gpc_reg_operand" "")
(plus:DI (match_operand:DI 1 "gpc_reg_operand" "")
(plus:DI (match_operand:DI 1 "gpc_reg_operand" "")
...
@@ -3524,19 +3528,21 @@
...
@@ -3524,19 +3528,21 @@
}")
}")
(define_insn ""
(define_insn ""
[
(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
[
(set (match_operand:DI 0 "gpc_reg_operand" "=
&r,&r,
r,r")
(plus:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r")
(plus:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r
,0,0
")
(match_operand:DI 2 "reg_or_short_operand" "r,I")))]
(match_operand:DI 2 "reg_or_short_operand" "r,I
,r,I
")))]
"TARGET_POWER && ! TARGET_POWERPC64"
"TARGET_POWER && ! TARGET_POWERPC64"
"@
"@
{a|addc} %L0,%L1,%L2
\;
{ae|adde} %0,%1,%2
{a|addc} %L0,%L1,%L2
\;
{ae|adde} %0,%1,%2
{ai|addic} %L0,%L1,%2
\;
{a%G2e|add%G2e} %0,%1
{a|addc} %L0,%L1,%L2
\;
{ae|adde} %0,%1,%2
{ai|addic} %L0,%L1,%2
\;
{a%G2e|add%G2e} %0,%1"
{ai|addic} %L0,%L1,%2
\;
{a%G2e|add%G2e} %0,%1"
[
(set_attr "length" "8")
]
)
[
(set_attr "length" "8")
]
)
(define_insn ""
(define_insn ""
[
(set (match_operand:DI 0 "gpc_reg_operand" "=r")
[
(set (match_operand:DI 0 "gpc_reg_operand" "=
&r,
r")
(plus:DI (match_operand:DI 1 "gpc_reg_operand" "%r")
(plus:DI (match_operand:DI 1 "gpc_reg_operand" "%r
,0
")
(match_operand:DI 2 "gpc_reg_operand" "r")))]
(match_operand:DI 2 "gpc_reg_operand" "r
,r
")))]
"! TARGET_POWER && ! TARGET_POWERPC64"
"! TARGET_POWER && ! TARGET_POWERPC64"
"
*
"
*
{
{
...
@@ -3547,9 +3553,9 @@
...
@@ -3547,9 +3553,9 @@
[
(set_attr "length" "8")
]
)
[
(set_attr "length" "8")
]
)
(define_expand "subdi3"
(define_expand "subdi3"
[
(set (match_operand:DI 0 "gpc_reg_operand" "
=r,r
")
[
(set (match_operand:DI 0 "gpc_reg_operand" "")
(minus:DI (match_operand:DI 1 "reg_or_short_operand" "
r,I
")
(minus:DI (match_operand:DI 1 "reg_or_short_operand" "")
(match_operand:DI 2 "gpc_reg_operand" "
r,r
")))]
(match_operand:DI 2 "gpc_reg_operand" "")))]
""
""
"
"
{
{
...
@@ -3559,19 +3565,21 @@
...
@@ -3559,19 +3565,21 @@
}")
}")
(define_insn ""
(define_insn ""
[
(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
[
(set (match_operand:DI 0 "gpc_reg_operand" "=
&r,&r,
r,r")
(minus:DI (match_operand:DI 1 "reg_or_short_operand" "r,I")
(minus:DI (match_operand:DI 1 "reg_or_short_operand" "r,I
,0,r
")
(match_operand:DI 2 "gpc_reg_operand" "r,r")))]
(match_operand:DI 2 "gpc_reg_operand" "r,r
,r,0
")))]
"TARGET_POWER && ! TARGET_POWERPC64"
"TARGET_POWER && ! TARGET_POWERPC64"
"@
"@
{sf|subfc} %L0,%L2,%L1
\;
{sfe|subfe} %0,%2,%1
{sf|subfc} %L0,%L2,%L1
\;
{sfe|subfe} %0,%2,%1
{sfi|subfic} %L0,%L2,%1
\;
{sf%G1e|subf%G1e} %0,%2
{sf|subfc} %L0,%L2,%L1
\;
{sfe|subfe} %0,%2,%1
{sfi|subfic} %L0,%L2,%1
\;
{sf%G1e|subf%G1e} %0,%2"
{sfi|subfic} %L0,%L2,%1
\;
{sf%G1e|subf%G1e} %0,%2"
[
(set_attr "length" "8")
]
)
[
(set_attr "length" "8")
]
)
(define_insn ""
(define_insn ""
[
(set (match_operand:DI 0 "gpc_reg_operand" "=r")
[
(set (match_operand:DI 0 "gpc_reg_operand" "=
&r,r,
r")
(minus:DI (match_operand:DI 1 "gpc_reg_operand" "r")
(minus:DI (match_operand:DI 1 "gpc_reg_operand" "r
,0,r
")
(match_operand:DI 2 "gpc_reg_operand" "r")))]
(match_operand:DI 2 "gpc_reg_operand" "r
,r,0
")))]
"! TARGET_POWER && ! TARGET_POWERPC64"
"! TARGET_POWER && ! TARGET_POWERPC64"
"
*
"
*
{
{
...
@@ -3588,8 +3596,8 @@
...
@@ -3588,8 +3596,8 @@
"")
"")
(define_insn ""
(define_insn ""
[
(set (match_operand:DI 0 "gpc_reg_operand" "=r")
[
(set (match_operand:DI 0 "gpc_reg_operand" "=
&r,
r")
(neg:DI (match_operand:DI 1 "gpc_reg_operand" "r")))]
(neg:DI (match_operand:DI 1 "gpc_reg_operand" "r
,0
")))]
"! TARGET_POWERPC64"
"! TARGET_POWERPC64"
"
*
"
*
{
{
...
...
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