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
86b38416
Commit
86b38416
authored
30 years ago
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(print_node{,_brief}): Use REAL_VALUE_TO_DECIMAL to print REAL_CST
ifdef REAL_ARITHMETIC. From-SVN: r7916
parent
066aca28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
12 deletions
+43
-12
gcc/print-tree.c
+43
-12
No files found.
gcc/print-tree.c
View file @
86b38416
...
...
@@ -144,8 +144,22 @@ print_node_brief (file, prefix, node, indent)
}
if
(
TREE_CODE
(
node
)
==
REAL_CST
)
{
#ifndef REAL_IS_NOT_DOUBLE
fprintf
(
file
,
" %e"
,
TREE_REAL_CST
(
node
));
REAL_VALUE_TYPE
d
=
TREE_REAL_CST
(
node
);
if
(
TREE_OVERFLOW
(
node
))
fprintf
(
file
,
" overflow"
);
#if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC)
if
(
REAL_VALUE_ISINF
(
d
))
fprintf
(
file
,
" Inf"
);
else
if
(
REAL_VALUE_ISNAN
(
d
))
fprintf
(
file
,
" Nan"
);
else
{
char
string
[
100
];
REAL_VALUE_TO_DECIMAL
(
d
,
"%e"
,
string
);
fprintf
(
file
,
" %s"
,
string
);
}
#else
{
int
i
;
...
...
@@ -155,7 +169,7 @@ print_node_brief (file, prefix, node, indent)
fprintf
(
file
,
"%02x"
,
*
p
++
);
fprintf
(
file
,
""
);
}
#endif
/* REAL_IS_NOT_DOUBLE */
#endif
}
fprintf
(
file
,
">"
);
...
...
@@ -605,17 +619,34 @@ print_node (file, prefix, node, indent)
break
;
case
REAL_CST
:
#ifndef REAL_IS_NOT_DOUBLE
fprintf
(
file
,
" %e"
,
TREE_REAL_CST
(
node
));
#else
{
char
*
p
=
(
char
*
)
&
TREE_REAL_CST
(
node
);
fprintf
(
file
,
" 0x"
);
for
(
i
=
0
;
i
<
sizeof
TREE_REAL_CST
(
node
);
i
++
)
fprintf
(
file
,
"%02x"
,
*
p
++
);
fprintf
(
file
,
""
);
REAL_VALUE_TYPE
d
=
TREE_REAL_CST
(
node
);
if
(
TREE_OVERFLOW
(
node
))
fprintf
(
file
,
" overflow"
);
#if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC)
if
(
REAL_VALUE_ISINF
(
d
))
fprintf
(
file
,
" Inf"
);
else
if
(
REAL_VALUE_ISNAN
(
d
))
fprintf
(
file
,
" Nan"
);
else
{
char
string
[
100
];
REAL_VALUE_TO_DECIMAL
(
d
,
"%e"
,
string
);
fprintf
(
file
,
" %s"
,
string
);
}
#else
{
int
i
;
unsigned
char
*
p
=
(
unsigned
char
*
)
&
TREE_REAL_CST
(
node
);
fprintf
(
file
,
" 0x"
);
for
(
i
=
0
;
i
<
sizeof
TREE_REAL_CST
(
node
);
i
++
)
fprintf
(
file
,
"%02x"
,
*
p
++
);
fprintf
(
file
,
""
);
}
#endif
}
#endif
/* REAL_IS_NOT_DOUBLE */
break
;
case
COMPLEX_CST
:
...
...
This diff is collapsed.
Click to expand it.
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