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
2ba3a0ec
Commit
2ba3a0ec
authored
Apr 11, 1994
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(immed_double_const): Sign-extend constants when they
have the most significant bit set for the target. From-SVN: r7027
parent
7373d92d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
gcc/varasm.c
+13
-0
No files found.
gcc/varasm.c
View file @
2ba3a0ec
...
...
@@ -1785,6 +1785,19 @@ immed_double_const (i0, i1, mode)
/* We cannot represent this value as a constant. */
abort
();
/* If this would be an entire word for the target, but is not for
the host, then sign-extend on the host so that the number will look
the same way on the host that it would on the target.
For example, when building a 64 bit alpha hosted 32 bit sparc
targeted compiler, then we want the 32 bit unsigned value -1 to be
represented as a 64 bit value -1, and not as 0x00000000ffffffff.
The later confuses the sparc backend. */
if
(
BITS_PER_WORD
<
HOST_BITS_PER_WIDE_INT
&&
BITS_PER_WORD
==
width
&&
(
i0
&
((
HOST_WIDE_INT
)
1
<<
(
width
-
1
))))
i0
|=
((
HOST_WIDE_INT
)
(
-
1
)
<<
width
);
/* If MODE fits within HOST_BITS_PER_WIDE_INT, always use a CONST_INT.
??? Strictly speaking, this is wrong if we create a CONST_INT
...
...
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