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
29226a19
Commit
29226a19
authored
Sep 02, 1994
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(min_precision): Move to c-common.c
From-SVN: r8021
parent
6acfe908
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
gcc/c-decl.c
+0
-31
No files found.
gcc/c-decl.c
View file @
29226a19
...
...
@@ -5647,37 +5647,6 @@ start_enum (name)
return
enumtype
;
}
/* Return the minimum number of bits needed to represent VALUE in a
signed or unsigned type, UNSIGNEDP says which. */
static
int
min_precision
(
value
,
unsignedp
)
tree
value
;
int
unsignedp
;
{
int
log
;
/* If the value is negative, compute its negative minus 1. The latter
adjustment is because the absolute value of the largest negative value
is one larger than the largest positive value. This is equivalent to
a bit-wise negation, so use that operation instead. */
if
(
tree_int_cst_sgn
(
value
)
<
0
)
value
=
fold
(
build1
(
BIT_NOT_EXPR
,
TREE_TYPE
(
value
),
value
));
/* Return the number of bits needed, taking into account the fact
that we need one more bit for a signed than unsigned type. */
if
(
integer_zerop
(
value
))
log
=
0
;
else
if
(
TREE_INT_CST_HIGH
(
value
)
!=
0
)
log
=
HOST_BITS_PER_WIDE_INT
+
floor_log2
(
TREE_INT_CST_HIGH
(
value
));
else
log
=
floor_log2
(
TREE_INT_CST_LOW
(
value
));
return
log
+
1
+
!
unsignedp
;
}
/* After processing and defining all the values of an enumeration type,
install their decls in the enumeration type and finish it off.
ENUMTYPE is the type object and VALUES a list of decl-value pairs.
...
...
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