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
e783e4c2
Commit
e783e4c2
authored
Jan 15, 1994
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(smulsi3_highpart): New pattern.
(umulsi3_highpart): New pattern. From-SVN: r6395
parent
33a3539d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
gcc/config/sparc/sparc.md
+72
-0
No files found.
gcc/config/sparc/sparc.md
View file @
e783e4c2
...
@@ -1837,6 +1837,42 @@
...
@@ -1837,6 +1837,42 @@
"smul %1,%2,%R0
\;
rd %%y,%0"
"smul %1,%2,%R0
\;
rd %%y,%0"
[
(set_attr "length" "2")
]
)
[
(set_attr "length" "2")
]
)
(define_expand "smulsi3_highpart"
[
(set (match_operand:SI 0 "register_operand" "")
(truncate:SI
(lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" ""))
(sign_extend:DI (match_operand:SI 2 "arith_operand" "")))
(const_int 32))))]
"TARGET_V8 || TARGET_SPARCLITE"
"
{
if (CONSTANT_P (operands
[
2
]
))
{
emit_insn (gen_const_smulsi3_highpart (operands
[
0
]
, operands
[
1
]
, operands
[
2
]
));
DONE;
}
}")
(define_insn ""
[
(set (match_operand:SI 0 "register_operand" "=r")
(truncate:SI
(lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r"))
(sign_extend:DI (match_operand:SI 2 "register_operand" "r")))
(const_int 32))))]
"TARGET_V8 || TARGET_SPARCLITE"
"smul %1,%2,%%g0
\;
rd %%y,%0"
[
(set_attr "length" "2")
]
)
(define_insn "const_smulsi3_highpart"
[
(set (match_operand:SI 0 "register_operand" "=r")
(truncate:SI
(lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r"))
(match_operand:SI 2 "register_operand" "r"))
(const_int 32))))]
"TARGET_V8 || TARGET_SPARCLITE"
"smul %1,%2,%%g0
\;
rd %%y,%0"
[
(set_attr "length" "2")
]
)
(define_expand "umulsidi3"
(define_expand "umulsidi3"
[
(set (match_operand:DI 0 "register_operand" "")
[
(set (match_operand:DI 0 "register_operand" "")
(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" ""))
(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" ""))
...
@@ -1869,6 +1905,42 @@
...
@@ -1869,6 +1905,42 @@
"umul %1,%2,%R0
\;
rd %%y,%0"
"umul %1,%2,%R0
\;
rd %%y,%0"
[
(set_attr "length" "2")
]
)
[
(set_attr "length" "2")
]
)
(define_expand "umulsi3_highpart"
[
(set (match_operand:SI 0 "register_operand" "")
(truncate:SI
(lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" ""))
(zero_extend:DI (match_operand:SI 2 "uns_arith_operand" "")))
(const_int 32))))]
"TARGET_V8 || TARGET_SPARCLITE"
"
{
if (CONSTANT_P (operands
[
2
]
))
{
emit_insn (gen_const_umulsi3_highpart (operands
[
0
]
, operands
[
1
]
, operands
[
2
]
));
DONE;
}
}")
(define_insn ""
[
(set (match_operand:SI 0 "register_operand" "=r")
(truncate:SI
(lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r"))
(zero_extend:DI (match_operand:SI 2 "register_operand" "r")))
(const_int 32))))]
"TARGET_V8 || TARGET_SPARCLITE"
"umul %1,%2,%%g0
\;
rd %%y,%0"
[
(set_attr "length" "2")
]
)
(define_insn "const_umulsi3_highpart"
[
(set (match_operand:SI 0 "register_operand" "=r")
(truncate:SI
(lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r"))
(match_operand:SI 2 "uns_small_int" ""))
(const_int 32))))]
"TARGET_V8 || TARGET_SPARCLITE"
"umul %1,%2,%%g0
\;
rd %%y,%0"
[
(set_attr "length" "2")
]
)
;; The architecture specifies that there must be 3 instructions between
;; The architecture specifies that there must be 3 instructions between
;; a y register write and a use of it for correct results.
;; a y register write and a use of it for correct results.
...
...
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