You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#127001 - beetrees:f16-debuginfo, r=michaelwoerister
Add Natvis visualiser and debuginfo tests for `f16`
To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .
`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
<IntrinsicName="sign_bit"Expression="(unsigned __int16) (bits & sign_mask())" />
41
+
<IntrinsicName="exponent_bits"Expression="(unsigned __int16) (bits & exponent_mask())" />
42
+
<IntrinsicName="significand_bits"Expression="(unsigned __int16) (bits & significand_mask())" />
43
+
44
+
<IntrinsicName="if_set"Expression="(bits & mask) != 0 ? value : 1.0">
45
+
<ParameterName="mask"Type="unsigned __int16" />
46
+
<ParameterName="value"Type="float" />
47
+
</Intrinsic>
48
+
<!-- Calculates 2**exp without needing a pow function. Each float in if_set() is the square of the previous float. 32768 == 2.pow(bias), bias == 15 -->
0 commit comments