This is the mail archive of the
mailing list for the GCC project.
Re: const_double - RTL
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Iman Narasamdya <in at cs dot man dot ac dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 07 May 2004 16:06:37 -0700
- Subject: Re: const_double - RTL
- References: <409A63F2.email@example.com>
Iman Narasamdya wrote:
I would like to construct the double value from the operands of
const_double. How to do so? Particularly, I don't understand how the
operands are created from a double / float value.
We don't really provide a way to convert a const_double into a double
value. Since the host and target may have different floating point
representations, in general, we can not use FP values inside the
compiler. Instead, we have REAL_VALUE_TYPE which is an abstracted
representation of an FP value. We have routines to convert between
REAL_VALUE_TYPE and const_double, we have routines to perform operations
on REAL_VALUE_TYPE, and we have routines to output REAL_VALUE_TYPE to
assembly language. But if you actually want a double value, you may be
out of luck.
Most of this stuff is in real.h and real.c. See for instance
REAL_VALUE_FROM_CONST_DOUBLE, and CONST_DOUBLE_FROM_REAL_VALUE.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com