This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: [patch/rfc] Add host's floatformat


This patch adds the host's floatformat (when known) to floatformat.[hc].


Since we *are* the host, don't we *always* know what the host't float
format is?  I mean, we can just cast to float.  But still, we should
be able to auto-detect which floatformat is used at runtime, rather
than guess in configure (and miss lots of host processors).

We should be able to have a pre-compiled table of float constants and
their hex representations, and just scan the table for bit equality to
see which entries match.

It might be a bit more complex to code the first time around, but it
will be a lot less hackish in the long run (and maintenance-free :)

The patch, which is effectively lifed from GDB's code base has been working well. However, I'll change those variables to functions so that the possability you describe can be easily implemented.


Andrew



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