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
b7c89afe
Commit
b7c89afe
authored
Apr 22, 2002
by
Tom Rix
Committed by
Tom Rix
Apr 22, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate constant for shift once.
From-SVN: r52644
parent
6067f1fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
gcc/ChangeLog
+4
-0
gcc/expmed.c
+3
-4
No files found.
gcc/ChangeLog
View file @
b7c89afe
2002-04-22 Tom Rix <trix@redhat.com>
* expmed.c (init_expmed): Generate shifted constant once.
2002-04-22 Zack Weinberg <zack@codesourcery.com>
* c-lex.c (lex_charconst): Call convert to get constant in
...
...
gcc/expmed.c
View file @
b7c89afe
...
...
@@ -144,19 +144,18 @@ init_expmed ()
for
(
m
=
1
;
m
<
MAX_BITS_PER_WORD
;
m
++
)
{
rtx
c_int
=
GEN_INT
((
HOST_WIDE_INT
)
1
<<
m
);
shift_cost
[
m
]
=
shiftadd_cost
[
m
]
=
shiftsub_cost
[
m
]
=
32000
;
XEXP
(
SET_SRC
(
PATTERN
(
shift_insn
)),
1
)
=
GEN_INT
(
m
);
if
(
recog
(
PATTERN
(
shift_insn
),
shift_insn
,
&
dummy
)
>=
0
)
shift_cost
[
m
]
=
rtx_cost
(
SET_SRC
(
PATTERN
(
shift_insn
)),
SET
);
XEXP
(
XEXP
(
SET_SRC
(
PATTERN
(
shiftadd_insn
)),
0
),
1
)
=
GEN_INT
((
HOST_WIDE_INT
)
1
<<
m
);
XEXP
(
XEXP
(
SET_SRC
(
PATTERN
(
shiftadd_insn
)),
0
),
1
)
=
c_int
;
if
(
recog
(
PATTERN
(
shiftadd_insn
),
shiftadd_insn
,
&
dummy
)
>=
0
)
shiftadd_cost
[
m
]
=
rtx_cost
(
SET_SRC
(
PATTERN
(
shiftadd_insn
)),
SET
);
XEXP
(
XEXP
(
SET_SRC
(
PATTERN
(
shiftsub_insn
)),
0
),
1
)
=
GEN_INT
((
HOST_WIDE_INT
)
1
<<
m
);
XEXP
(
XEXP
(
SET_SRC
(
PATTERN
(
shiftsub_insn
)),
0
),
1
)
=
c_int
;
if
(
recog
(
PATTERN
(
shiftsub_insn
),
shiftsub_insn
,
&
dummy
)
>=
0
)
shiftsub_cost
[
m
]
=
rtx_cost
(
SET_SRC
(
PATTERN
(
shiftsub_insn
)),
SET
);
}
...
...
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