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
f6789c77
Commit
f6789c77
authored
May 12, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(simplify_shift_const): Don't change SHIFT_MODE for LSHIFTRT either.
From-SVN: r9650
parent
efc526c1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
gcc/combine.c
+13
-9
No files found.
gcc/combine.c
View file @
f6789c77
...
@@ -7641,10 +7641,12 @@ simplify_shift_const (x, code, result_mode, varop, count)
...
@@ -7641,10 +7641,12 @@ simplify_shift_const (x, code, result_mode, varop, count)
code
=
ROTATE
,
count
=
GET_MODE_BITSIZE
(
result_mode
)
-
count
;
code
=
ROTATE
,
count
=
GET_MODE_BITSIZE
(
result_mode
)
-
count
;
/* We need to determine what mode we will do the shift in. If the
/* We need to determine what mode we will do the shift in. If the
shift is a ASHIFTRT or ROTATE, we must always do it in the mode it
shift is a right shift or a ROTATE, we must always do it in the mode
was originally done in. Otherwise, we can do it in MODE, the widest
it was originally done in. Otherwise, we can do it in MODE, the
mode encountered. */
widest mode encountered. */
shift_mode
=
(
code
==
ASHIFTRT
||
code
==
ROTATE
?
result_mode
:
mode
);
shift_mode
=
(
code
==
ASHIFTRT
||
code
==
LSHIFTRT
||
code
==
ROTATE
?
result_mode
:
mode
);
/* Handle cases where the count is greater than the size of the mode
/* Handle cases where the count is greater than the size of the mode
minus 1. For ASHIFT, use the size minus one as the count (this can
minus 1. For ASHIFT, use the size minus one as the count (this can
...
@@ -8185,11 +8187,13 @@ simplify_shift_const (x, code, result_mode, varop, count)
...
@@ -8185,11 +8187,13 @@ simplify_shift_const (x, code, result_mode, varop, count)
}
}
/* We need to determine what mode to do the shift in. If the shift is
/* We need to determine what mode to do the shift in. If the shift is
a ASHIFTRT or ROTATE, we must always do it in the mode it was originally
a right shift or ROTATE, we must always do it in the mode it was
done in. Otherwise, we can do it in MODE, the widest mode encountered.
originally done in. Otherwise, we can do it in MODE, the widest mode
The code we care about is that of the shift that will actually be done,
encountered. The code we care about is that of the shift that will
not the shift that was originally requested. */
actually be done, not the shift that was originally requested. */
shift_mode
=
(
code
==
ASHIFTRT
||
code
==
ROTATE
?
result_mode
:
mode
);
shift_mode
=
(
code
==
ASHIFTRT
||
code
==
LSHIFTRT
||
code
==
ROTATE
?
result_mode
:
mode
);
/* We have now finished analyzing the shift. The result should be
/* We have now finished analyzing the shift. The result should be
a shift of type CODE with SHIFT_MODE shifting VAROP COUNT places. If
a shift of type CODE with SHIFT_MODE shifting VAROP COUNT places. If
...
...
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