* how to get value of real constant in .tu file
@ 2002-10-15 7:32 sushil page
2002-10-19 2:52 ` Jim Wilson
0 siblings, 1 reply; 3+ messages in thread
From: sushil page @ 2002-10-15 7:32 UTC (permalink / raw)
To: gcc
Hello sir,
I have obtained the the dump(.tu file) of
GCC intermediate representation by
-fdump-translation-unit
option.In the ".tu" file ,i am unable to find the
value of real constant.I have referred the GCC
documentation for this.In this documentation this
issue is not fixed.
Excuse me for taking your valuable time.Kindly
waiting for your positive reply.
Thanks.
Sushil
________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
visit http://in.tv.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: how to get value of real constant in .tu file
@ 2002-10-15 10:07 James Michael DuPont
0 siblings, 0 replies; 3+ messages in thread
From: James Michael DuPont @ 2002-10-15 10:07 UTC (permalink / raw)
To: sushilpage; +Cc: gcc
Sushil,
The TU files are the same as used by me in the introspector patch,
Except that I output them into XML.
I will attempt at answering this request.
(Note, I am looking at the ast-optimizer-branch here )
The code in tree-dump.c that produces integers is here :
------------------------------------------------------------
case INTEGER_CST:
if (TREE_INT_CST_HIGH (t))
dump_int (di, "high", TREE_INT_CST_HIGH (t));
dump_int (di, "low", TREE_INT_CST_LOW (t));
break;
------------------------------------------------------------
Now, examining this code shows that there is not any handlers for
real_cst, but in the modules print-tree.c (for debugging output)
------------------------------------------------------------
case REAL_CST:
{
REAL_VALUE_TYPE d;
if (TREE_OVERFLOW (node))
fprintf (file, " overflow");
d = TREE_REAL_CST (node);
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);
}
}
break;
------------------------------------------------------------
I can imagine that it would be pretty simple to include this
code back into the tree dumper.
Hope that helps,
Mike
=====
James Michael DuPont
http://introspector.sourceforge.net/
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-19 2:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-15 7:32 how to get value of real constant in .tu file sushil page
2002-10-19 2:52 ` Jim Wilson
2002-10-15 10:07 James Michael DuPont
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).