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
08477031
Commit
08477031
authored
Oct 27, 2014
by
Eric Botcazou
Committed by
Eric Botcazou
Oct 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
From-SVN: r216730
parent
5fe48b3d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
gcc/ada/ChangeLog
+4
-0
gcc/ada/gcc-interface/trans.c
+6
-9
No files found.
gcc/ada/ChangeLog
View file @
08477031
2014
-
10
-
27
Eric
Botcazou
<
ebotcazou
@
adacore
.
com
>
*
gcc
-
interface
/
trans
.
c
(
gnat_to_gnu
)
<
N_Real_Literal
>:
Minor
tweaks
.
2014
-
10
-
27
Eric
Botcazou
<
ebotcazou
@
adacore
.
com
>
*
gcc
-
interface
/
utils
.
c
(
create_var_decl_1
):
For
a
variable
declared
in
the
unit
,
set
TREE_PUBLIC
only
if
it
has
static
storage
duration
.
...
...
gcc/ada/gcc-interface/trans.c
View file @
08477031
...
...
@@ -5330,8 +5330,8 @@ gnat_to_gnu (Node_Id gnat_node)
case
N_Real_Literal
:
gnu_result_type
=
get_unpadded_type
(
Etype
(
gnat_node
));
/* If this is of a fixed-point type, the value we want is the
value of
the corresponding integer. */
/* If this is of a fixed-point type, the value we want is the
value of
the corresponding integer. */
if
(
IN
(
Ekind
(
Underlying_Type
(
Etype
(
gnat_node
))),
Fixed_Point_Kind
))
{
gnu_result
=
UI_To_gnu
(
Corresponding_Integer_Value
(
gnat_node
),
...
...
@@ -5343,10 +5343,9 @@ gnat_to_gnu (Node_Id gnat_node)
{
Ureal
ur_realval
=
Realval
(
gnat_node
);
/* First convert the real value to a machine number if it isn't
already. That forces BASE to 2 for non-zero values and simplifies
the rest of our logic. */
/* First convert the value to a machine number if it isn't already.
That will force the base to 2 for non-zero values and simplify
the rest of the logic. */
if
(
!
Is_Machine_Number
(
gnat_node
))
ur_realval
=
Machine
(
Base_Type
(
Underlying_Type
(
Etype
(
gnat_node
))),
...
...
@@ -5358,13 +5357,11 @@ gnat_to_gnu (Node_Id gnat_node)
{
REAL_VALUE_TYPE
tmp
;
gnu_result
=
UI_To_gnu
(
Numerator
(
ur_realval
),
gnu_result_type
);
gnu_result
=
UI_To_gnu
(
Numerator
(
ur_realval
),
gnu_result_type
);
/* The base must be 2 as Machine guarantees this, so we scale
the value, which we know can fit in the mantissa of the type
(hence the use of that type above). */
gcc_assert
(
Rbase
(
ur_realval
)
==
2
);
real_ldexp
(
&
tmp
,
&
TREE_REAL_CST
(
gnu_result
),
-
UI_To_Int
(
Denominator
(
ur_realval
)));
...
...
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