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
5a5064dc
Commit
5a5064dc
authored
Aug 21, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_binop): If, e.g., mulqi3 doesn't exist, try mulqihi3.
From-SVN: r1932
parent
2f9ba5a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
gcc/optabs.c
+26
-2
No files found.
gcc/optabs.c
View file @
5a5064dc
...
@@ -413,15 +413,39 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
...
@@ -413,15 +413,39 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
delete_insns_since
(
last
);
delete_insns_since
(
last
);
}
}
/* If this is a multiply, see if we can do a widening operation that
takes operands of this mode and makes a wider mode. */
if
(
binoptab
==
smul_optab
&&
GET_MODE_WIDER_MODE
(
mode
)
!=
VOIDmode
&&
(((
unsignedp
?
umul_widen_optab
:
smul_widen_optab
)
->
handlers
[(
int
)
GET_MODE_WIDER_MODE
(
mode
)].
insn_code
)
!=
CODE_FOR_nothing
))
{
temp
=
expand_binop
(
GET_MODE_WIDER_MODE
(
mode
),
unsignedp
?
umul_widen_optab
:
smul_widen_optab
,
op0
,
op1
,
0
,
unsignedp
,
OPTAB_DIRECT
);
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_INT
)
return
gen_lowpart
(
mode
,
temp
);
else
return
convert_to_mode
(
mode
,
temp
,
unsignedp
);
}
/* Look for a wider mode of the same class for which we think we
/* Look for a wider mode of the same class for which we think we
can open-code the operation. */
can open-code the operation. Check for a widening multiply at the
wider mode as well. */
if
((
class
==
MODE_INT
||
class
==
MODE_FLOAT
||
class
==
MODE_COMPLEX_FLOAT
)
if
((
class
==
MODE_INT
||
class
==
MODE_FLOAT
||
class
==
MODE_COMPLEX_FLOAT
)
&&
mode
!=
OPTAB_DIRECT
&&
mode
!=
OPTAB_LIB
)
&&
mode
!=
OPTAB_DIRECT
&&
mode
!=
OPTAB_LIB
)
for
(
wider_mode
=
GET_MODE_WIDER_MODE
(
mode
);
wider_mode
!=
VOIDmode
;
for
(
wider_mode
=
GET_MODE_WIDER_MODE
(
mode
);
wider_mode
!=
VOIDmode
;
wider_mode
=
GET_MODE_WIDER_MODE
(
wider_mode
))
wider_mode
=
GET_MODE_WIDER_MODE
(
wider_mode
))
{
{
if
(
binoptab
->
handlers
[(
int
)
wider_mode
].
insn_code
!=
CODE_FOR_nothing
)
if
(
binoptab
->
handlers
[(
int
)
wider_mode
].
insn_code
!=
CODE_FOR_nothing
||
(
binoptab
==
smul_optab
&&
GET_MODE_WIDER_MODE
(
wider_mode
)
!=
VOIDmode
&&
(((
unsignedp
?
umul_widen_optab
:
smul_widen_optab
)
->
handlers
[(
int
)
GET_MODE_WIDER_MODE
(
wider_mode
)].
insn_code
)
!=
CODE_FOR_nothing
)))
{
{
rtx
xop0
=
op0
,
xop1
=
op1
;
rtx
xop0
=
op0
,
xop1
=
op1
;
int
no_extend
=
0
;
int
no_extend
=
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