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
4a969847
Commit
4a969847
authored
Aug 29, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_{binop,unop}): Don't make invalid paradoxical SUBREGs.
From-SVN: r1995
parent
803090c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
gcc/optabs.c
+12
-4
No files found.
gcc/optabs.c
View file @
4a969847
...
...
@@ -454,14 +454,17 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
/* For certain integer operations, we need not actually extend
the narrow operands, as long as we will truncate
the results to the same narrowness. */
the results to the same narrowness. Don't do this when
WIDER_MODE is wider than a word since a paradoxical SUBREG
isn't valid for such modes. */
if
((
binoptab
==
ior_optab
||
binoptab
==
and_optab
||
binoptab
==
xor_optab
||
binoptab
==
add_optab
||
binoptab
==
sub_optab
||
binoptab
==
smul_optab
||
binoptab
==
ashl_optab
||
binoptab
==
lshl_optab
)
&&
class
==
MODE_INT
)
&&
class
==
MODE_INT
&&
GET_MODE_SIZE
(
wider_mode
)
<=
UNITS_PER_WORD
)
no_extend
=
1
;
/* If an operand is a constant integer, we might as well
...
...
@@ -879,14 +882,17 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
/* For certain integer operations, we need not actually extend
the narrow operands, as long as we will truncate
the results to the same narrowness. */
the results to the same narrowness. Don't do this when
WIDER_MODE is wider than a word since a paradoxical SUBREG
isn't valid for such modes. */
if
((
binoptab
==
ior_optab
||
binoptab
==
and_optab
||
binoptab
==
xor_optab
||
binoptab
==
add_optab
||
binoptab
==
sub_optab
||
binoptab
==
smul_optab
||
binoptab
==
ashl_optab
||
binoptab
==
lshl_optab
)
&&
class
==
MODE_INT
)
&&
class
==
MODE_INT
&&
GET_MODE_SIZE
(
wider_mode
)
<=
UNITS_PER_WORD
)
no_extend
=
1
;
/* If an operand is a constant integer, we might as well
...
...
@@ -1207,6 +1213,7 @@ expand_unop (mode, unoptab, op0, target, unsignedp)
results to the same narrowness. */
if
((
unoptab
==
neg_optab
||
unoptab
==
one_cmpl_optab
)
&&
GET_MODE_SIZE
(
wider_mode
)
<=
UNITS_PER_WORD
&&
class
==
MODE_INT
)
xop0
=
gen_rtx
(
SUBREG
,
wider_mode
,
force_reg
(
mode
,
xop0
),
0
);
else
...
...
@@ -1304,6 +1311,7 @@ expand_unop (mode, unoptab, op0, target, unsignedp)
results to the same narrowness. */
if
((
unoptab
==
neg_optab
||
unoptab
==
one_cmpl_optab
)
&&
GET_MODE_SIZE
(
wider_mode
)
<=
UNITS_PER_WORD
&&
class
==
MODE_INT
)
xop0
=
gen_rtx
(
SUBREG
,
wider_mode
,
force_reg
(
mode
,
xop0
),
0
);
else
...
...
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