[PATCH] Implement ARM EHABI exception handling.

Logan Chien tzuhsiang.chien at gmail.com
Wed May 7 08:52:57 PDT 2014


Hi Joerg,

The long double to be parsed are the bit pattern of long double in
hexadecimal.
For example, 4001a000000000000000 in the mangled name stands for 0xap-1L
(i.e. 5.0)

To properly guard this test case, I have to know the number of bits of long
double,
and it seems that __LDBL_MANT_DIG__ is not for this purpose.

Although using __SIZEOF_LONG_DOUBLE__ is not a perfect solution, since the
additional padding might result in the overestimation of the number of
bits.  But it
is sufficient to distinguish the targets as far as I know.  Both 12 and 16
are fine for
the test case.

If you wish to have more information, you can check the
parse_floating_number()
function in src/cxa_demangle.cpp.

Sincerely,
Logan

On Wed, May 7, 2014 at 3:33 AM, Joerg Sonnenberger
<joerg at britannica.bec.de>wrote:

> On Wed, May 07, 2014 at 12:14:32AM +0800, Logan Chien wrote:
> > > Can you use __LDBL_MANT_DIG__ == 64 instead?
> > >
> >
> > It seems that __LDBL_MANT_DIG__ stands for the number of bits of
> > significand (or mantissa.)  However, I wish to know the size of long
> > double.  AFAIK, there is no macro for this.  Any good suggestion?
>  Thanks.
>
> Problem is that the size of long double may include additional padding,
> so it gets rounded up to 12 or 16 bytes. On AMD64, you will get a size
> of 16 bytes for SPARC64 as well, but it has a different encoding.
>
> Joerg
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140507/70858aa4/attachment.html>


More information about the cfe-commits mailing list