-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathintrinsic_header.natvis
233 lines (223 loc) · 9.69 KB
/
intrinsic_header.natvis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="ref$<str$>">
<AlternativeType Name="ref_mut$<str$>" />
<AlternativeType Name="ptr_const$<str$>" />
<AlternativeType Name="ptr_mut$<str$>" />
<DisplayString>{(char*)data_ptr,[length]s8}</DisplayString>
<StringView>(char*)data_ptr,[length]s8</StringView>
<Expand>
<Item Name="[len]" ExcludeView="simple">length</Item>
<Synthetic Name="[chars]">
<Expand>
<ArrayItems>
<Size>length</Size>
<ValuePointer>data_ptr</ValuePointer>
</ArrayItems>
</Expand>
</Synthetic>
</Expand>
</Type>
<Type Name="ref$<slice2$<*> >">
<AlternativeType Name="ref_mut$<slice2$<*> >" />
<AlternativeType Name="ptr_const$<slice2$<*> >" />
<AlternativeType Name="ptr_mut$<slice2$<*> >" />
<DisplayString>{{ len={length} }}</DisplayString>
<Expand>
<Item Name="[len]" ExcludeView="simple">length</Item>
<ArrayItems>
<Size>length</Size>
<ValuePointer>data_ptr</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="f16">
<Intrinsic Name="sign_mask" Expression="(unsigned __int16) 0x8000" />
<Intrinsic Name="exponent_mask" Expression="(unsigned __int16) 0x7c00" />
<Intrinsic Name="significand_mask" Expression="(unsigned __int16) 0x03ff" />
<Intrinsic Name="sign_bit" Expression="(unsigned __int16) (bits & sign_mask())" />
<Intrinsic Name="exponent_bits" Expression="(unsigned __int16) (bits & exponent_mask())" />
<Intrinsic Name="significand_bits" Expression="(unsigned __int16) (bits & significand_mask())" />
<Intrinsic Name="if_set" Expression="(bits & mask) != 0 ? value : 1.0">
<Parameter Name="mask" Type="unsigned __int16" />
<Parameter Name="value" Type="float" />
</Intrinsic>
<!-- 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 -->
<Intrinsic Name="two_pow_exponent" Expression="if_set(0x0400, 2.0) * if_set(0x0800, 4.0) * if_set(0x1000, 16.0) * if_set(0x2000, 256.0) * if_set(0x4000, 65536.0) / 32768.0" />
<!-- Calculates 0.significand, without any implicit bit. 1024 == 2.pow(explicit significand width), explicit significand width == 10 -->
<Intrinsic Name="raw_significand" Expression="((float) significand_bits()) / 1024.0" />
<Intrinsic Name="sign" Expression="sign_bit() == 0 ? 1.0 : -1.0" />
<DisplayString Condition="bits == 0x7c00">inf</DisplayString>
<DisplayString Condition="bits == 0xfc00">-inf</DisplayString>
<DisplayString Condition="exponent_bits() == exponent_mask()">NaN</DisplayString>
<!-- Subnormal or zero (16384 == 2.pow(bias - 1), bias - 1 == 14) -->
<DisplayString Condition="exponent_bits() == 0">{(float) (sign() * raw_significand() / 16384.0)}</DisplayString>
<!-- Normal -->
<DisplayString>{(float) (sign() * (raw_significand() + 1.0) * two_pow_exponent())}</DisplayString>
</Type>
<Type Name="tuple$<>">
<DisplayString>()</DisplayString>
</Type>
<Type Name="tuple$<*>">
<DisplayString>({__0})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*>">
<DisplayString>({__0}, {__1})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*>">
<DisplayString>({__0}, {__1}, {__2})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*,*>">
<DisplayString>({__0}, {__1}, {__2}, {__3})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
<Item Name="[3]">__3</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*,*,*>">
<DisplayString>({__0}, {__1}, {__2}, {__3}, {__4})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
<Item Name="[3]">__3</Item>
<Item Name="[4]">__4</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*,*,*,*>">
<DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
<Item Name="[3]">__3</Item>
<Item Name="[4]">__4</Item>
<Item Name="[5]">__5</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*,*,*,*,*>">
<DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
<Item Name="[3]">__3</Item>
<Item Name="[4]">__4</Item>
<Item Name="[5]">__5</Item>
<Item Name="[6]">__6</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*,*,*,*,*,*>">
<DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
<Item Name="[3]">__3</Item>
<Item Name="[4]">__4</Item>
<Item Name="[5]">__5</Item>
<Item Name="[6]">__6</Item>
<Item Name="[7]">__7</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*,*,*,*,*,*,*>">
<DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
<Item Name="[3]">__3</Item>
<Item Name="[4]">__4</Item>
<Item Name="[5]">__5</Item>
<Item Name="[6]">__6</Item>
<Item Name="[7]">__7</Item>
<Item Name="[8]">__8</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*,*,*,*,*,*,*,*>">
<DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8}, {__9})</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
<Item Name="[3]">__3</Item>
<Item Name="[4]">__4</Item>
<Item Name="[5]">__5</Item>
<Item Name="[6]">__6</Item>
<Item Name="[7]">__7</Item>
<Item Name="[8]">__8</Item>
<Item Name="[9]">__9</Item>
</Expand>
</Type>
<Type Name="tuple$<*,*,*,*,*,*,*,*,*,*,*>">
<DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8}, {__9}, ...)</DisplayString>
<Expand>
<Item Name="[0]">__0</Item>
<Item Name="[1]">__1</Item>
<Item Name="[2]">__2</Item>
<Item Name="[3]">__3</Item>
<Item Name="[4]">__4</Item>
<Item Name="[5]">__5</Item>
<Item Name="[6]">__6</Item>
<Item Name="[7]">__7</Item>
<Item Name="[8]">__8</Item>
<Item Name="[9]">__9</Item>
<Synthetic Name="[...]"><DisplayString>...</DisplayString></Synthetic>
</Expand>
</Type>
<!--
This is the visualizer for all enums. It takes care of selecting the active variant.
See `compiler\rustc_codegen_llvm\src\debuginfo\metadata\enums\cpp_like.rs` for more information.
-->
<Type Name="enum2$<*>">
<!-- NOTE: That tag ranges can wrap around, in which case `end` is less than `begin` and we
have to do a different check -->
<Intrinsic Name="in_range" Expression="(begin <= end) ? ((x >= begin) && (x <= end)) : ((x >= begin) || (x <= end))">
<Parameter Name="x" Type="unsigned __int64" />
<Parameter Name="begin" Type="unsigned __int64" />
<Parameter Name="end" Type="unsigned __int64" />
</Intrinsic>
<Intrinsic Name="eq128" Expression="(x_hi == y_hi) && (x_lo == y_lo)">
<Parameter Name="x_hi" Type="unsigned __int64" />
<Parameter Name="x_lo" Type="unsigned __int64" />
<Parameter Name="y_hi" Type="unsigned __int64" />
<Parameter Name="y_lo" Type="unsigned __int64" />
</Intrinsic>
<Intrinsic Name="lt128" Expression="(x_hi < y_hi) || ((x_hi == y_hi) && (x_lo < y_lo))">
<Parameter Name="x_hi" Type="unsigned __int64" />
<Parameter Name="x_lo" Type="unsigned __int64" />
<Parameter Name="y_hi" Type="unsigned __int64" />
<Parameter Name="y_lo" Type="unsigned __int64" />
</Intrinsic>
<Intrinsic Name="lt_or_eq128" Expression="((x_hi == y_hi) && (x_lo == y_lo)) || lt128(x_hi, x_lo, y_hi, y_lo)">
<Parameter Name="x_hi" Type="unsigned __int64" />
<Parameter Name="x_lo" Type="unsigned __int64" />
<Parameter Name="y_hi" Type="unsigned __int64" />
<Parameter Name="y_lo" Type="unsigned __int64" />
</Intrinsic>
<!-- NOTE: That tag ranges can wrap around, in which case `end` is less than `begin` and we
have to do a different check -->
<Intrinsic Name="in_range128" Expression="(lt_or_eq128(begin_hi, begin_lo, end_hi, end_lo)) ?
(lt_or_eq128(begin_hi, begin_lo, x_hi, x_lo) && lt_or_eq128(x_hi, x_lo, end_hi, end_lo)) :
(lt_or_eq128(begin_hi, begin_lo, x_hi, x_lo) || lt_or_eq128(x_hi, x_lo, end_hi, end_lo))">
<Parameter Name="x_hi" Type="unsigned __int64" />
<Parameter Name="x_lo" Type="unsigned __int64" />
<Parameter Name="begin_hi" Type="unsigned __int64" />
<Parameter Name="begin_lo" Type="unsigned __int64" />
<Parameter Name="end_hi" Type="unsigned __int64" />
<Parameter Name="end_lo" Type="unsigned __int64" />
</Intrinsic>