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
5b0d91c3
Commit
5b0d91c3
authored
Feb 13, 2001
by
Alexandre Oliva
Committed by
Alexandre Oliva
Feb 13, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* explow.c (trunc_int_for_mode): Sign-extend value to mode.
From-SVN: r39615
parent
4b01cd8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
22 deletions
+14
-22
gcc/ChangeLog
+4
-0
gcc/explow.c
+10
-22
No files found.
gcc/ChangeLog
View file @
5b0d91c3
2001-02-13 Alexandre Oliva <aoliva@redhat.com>
* explow.c (trunc_int_for_mode): Sign-extend value to mode.
2001-02-12 Geoffrey Keating <geoffk@redhat.com>
2001-02-12 Geoffrey Keating <geoffk@redhat.com>
* config/rs6000/sysv4.h (MASK_NO_BITFIELD_WORD): New macro.
* config/rs6000/sysv4.h (MASK_NO_BITFIELD_WORD): New macro.
...
...
gcc/explow.c
View file @
5b0d91c3
...
@@ -56,28 +56,16 @@ trunc_int_for_mode (c, mode)
...
@@ -56,28 +56,16 @@ trunc_int_for_mode (c, mode)
if
(
mode
==
BImode
)
if
(
mode
==
BImode
)
return
c
&
1
?
STORE_FLAG_VALUE
:
0
;
return
c
&
1
?
STORE_FLAG_VALUE
:
0
;
/* We clear out all bits that don't belong in MODE, unless they and our
/* Sign-extend for the requested mode. */
sign bit are all one. So we get either a reasonable negative
value or a reasonable unsigned value. */
if
(
width
<
HOST_BITS_PER_WIDE_INT
)
{
if
(
width
<
HOST_BITS_PER_WIDE_INT
HOST_WIDE_INT
sign
=
1
;
&&
((
c
&
((
HOST_WIDE_INT
)
(
-
1
)
<<
(
width
-
1
)))
sign
<<=
width
-
1
;
!=
((
HOST_WIDE_INT
)
(
-
1
)
<<
(
width
-
1
))))
c
&=
(
sign
<<
1
)
-
1
;
c
&=
((
HOST_WIDE_INT
)
1
<<
width
)
-
1
;
c
^=
sign
;
c
-=
sign
;
/* 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
&&
(
c
&
((
HOST_WIDE_INT
)
1
<<
(
width
-
1
))))
c
|=
((
HOST_WIDE_INT
)
(
-
1
)
<<
width
);
return
c
;
return
c
;
}
}
...
...
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