This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IA64 bootstrap problem for Ada


On Thu, Oct 30, 2003 at 06:38:23PM -0500, Geert Bosch wrote:
> It seems that the cleanest way to solve the issue is to "register"
> all available modes, and their properties such as int/float,
> complex or not, scalar or vector, precision, size and alignment
> with the front end.

This information is indeed available already.  Though it is 
in a somewhat inconvenient form for vector stuff.

> The one thing that still bothers me though, is that for floating
> point types, we'd really need to know the mantissa width of a
> floating point type.

Available as 

  enum machine_mode mode;
  for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
       mode != VOIDmode;
       mode = GET_MODE_WIDER_MODE (mode))
    {
      const struct real_format *fmt = REAL_MODE_FORMAT (mode);
      significand_width = fmt->p * fmt->log2_b;
    }

Indeed, everything you could possibly want to know about the
fp type is available in that structure.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]