[Lldb-commits] [lldb] r183716 - <rdar://problem/12783351>
Greg Clayton
gclayton at apple.com
Tue Jun 11 13:11:55 PDT 2013
I have a patch almost ready that adopts llvm::APFloat. There are some troubles currently where clang is asserting that I need to clean up and verify with people in the know, but I will have this is soon.
Greg
On Jun 11, 2013, at 10:46 AM, Enrico Granata <egranata at apple.com> wrote:
> I got the code from Ian Ollman - he sent it as part of the radar :)
> I could well switch over to llvm::APFloat if it does support printing! (as Greg’s followup email seems to imply)
>
> Enrico Granata
> 📩 egranata@.com
> ☎️ 27683
>
> On Jun 10, 2013, at 8:48 PM, Chris Lattner <clattner at apple.com> wrote:
>
>>
>> On Jun 10, 2013, at 5:18 PM, Enrico Granata <egranata at apple.com> wrote:
>>
>>> +++ lldb/trunk/source/Core/DataExtractor.cpp Mon Jun 10 19:18:18 2013
>>> @@ -1302,6 +1302,22 @@ DumpAPInt (Stream *s, const DataExtracto
>>> return offset;
>>> }
>>>
>>> +static float half2float (uint16_t half)
>>> +{
>>> + union{ float f; uint32_t u;}u;
>>> + int32_t v = (int16_t) half;
>>> +
>>> + if( 0 == (v & 0x7c00))
>>> + {
>>> + u.u = v & 0x80007FFFU;
>>> + return u.f * 0x1.0p125f;
>>> + }
>>> +
>>> + v <<= 13;
>>> + u.u = v | 0x70000000U;
>>> + return u.f * 0x1.0p-112f;
>>> +}
>>> +
>>
>> Hi Enrico,
>>
>> Where did you get this algorithm? Did you consider using llvm::APFloat to do this for you?
>>
>> -Chris
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list