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
5a1a6efd
Commit
5a1a6efd
authored
Feb 22, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(split_double): Handle CONST_INT that holds both words.
From-SVN: r9028
parent
8c35bbc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
9 deletions
+36
-9
gcc/final.c
+36
-9
No files found.
gcc/final.c
View file @
5a1a6efd
...
@@ -2846,19 +2846,46 @@ split_double (value, first, second)
...
@@ -2846,19 +2846,46 @@ split_double (value, first, second)
{
{
if
(
GET_CODE
(
value
)
==
CONST_INT
)
if
(
GET_CODE
(
value
)
==
CONST_INT
)
{
{
/* The rule for using CONST_INT for a wider mode
if
(
HOST_BITS_PER_WIDE_INT
>=
(
2
*
BITS_PER_WORD
))
is that we regard the value as signed.
So sign-extend it. */
rtx
high
=
(
INTVAL
(
value
)
<
0
?
constm1_rtx
:
const0_rtx
);
if
(
WORDS_BIG_ENDIAN
)
{
{
*
first
=
high
;
/* In this case the CONST_INT holds both target words.
*
second
=
value
;
Extract the bits from it into two word-sized pieces. */
rtx
low
,
high
;
HOST_WIDE_INT
word_mask
;
/* Avoid warnings for shift count >= BITS_PER_WORD. */
int
shift_count
=
BITS_PER_WORD
-
1
;
word_mask
=
(
HOST_WIDE_INT
)
1
<<
shift_count
;
word_mask
|=
word_mask
-
1
;
low
=
GEN_INT
(
INTVAL
(
value
)
&
word_mask
);
high
=
GEN_INT
((
INTVAL
(
value
)
>>
(
shift_count
+
1
))
&
word_mask
);
if
(
WORDS_BIG_ENDIAN
)
{
*
first
=
high
;
*
second
=
low
;
}
else
{
*
first
=
low
;
*
second
=
high
;
}
}
}
else
else
{
{
*
first
=
value
;
/* The rule for using CONST_INT for a wider mode
*
second
=
high
;
is that we regard the value as signed.
So sign-extend it. */
rtx
high
=
(
INTVAL
(
value
)
<
0
?
constm1_rtx
:
const0_rtx
);
if
(
WORDS_BIG_ENDIAN
)
{
*
first
=
high
;
*
second
=
value
;
}
else
{
*
first
=
value
;
*
second
=
high
;
}
}
}
}
}
else
if
(
GET_CODE
(
value
)
!=
CONST_DOUBLE
)
else
if
(
GET_CODE
(
value
)
!=
CONST_DOUBLE
)
...
...
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