Lines Matching refs:reg
26 X86ManagedRegister reg = ManagedRegister::NoRegister().AsX86(); in TEST() local
27 EXPECT_TRUE(reg.IsNoRegister()); in TEST()
28 EXPECT_TRUE(!reg.Overlaps(reg)); in TEST()
32 X86ManagedRegister reg = X86ManagedRegister::FromCpuRegister(EAX); in TEST() local
33 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
34 EXPECT_TRUE(reg.IsCpuRegister()); in TEST()
35 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
36 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
37 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
38 EXPECT_EQ(EAX, reg.AsCpuRegister()); in TEST()
40 reg = X86ManagedRegister::FromCpuRegister(EBX); in TEST()
41 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
42 EXPECT_TRUE(reg.IsCpuRegister()); in TEST()
43 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
44 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
45 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
46 EXPECT_EQ(EBX, reg.AsCpuRegister()); in TEST()
48 reg = X86ManagedRegister::FromCpuRegister(ECX); in TEST()
49 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
50 EXPECT_TRUE(reg.IsCpuRegister()); in TEST()
51 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
52 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
53 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
54 EXPECT_EQ(ECX, reg.AsCpuRegister()); in TEST()
56 reg = X86ManagedRegister::FromCpuRegister(EDI); in TEST()
57 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
58 EXPECT_TRUE(reg.IsCpuRegister()); in TEST()
59 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
60 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
61 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
62 EXPECT_EQ(EDI, reg.AsCpuRegister()); in TEST()
66 X86ManagedRegister reg = X86ManagedRegister::FromXmmRegister(XMM0); in TEST() local
67 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
68 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
69 EXPECT_TRUE(reg.IsXmmRegister()); in TEST()
70 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
71 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
72 EXPECT_EQ(XMM0, reg.AsXmmRegister()); in TEST()
74 reg = X86ManagedRegister::FromXmmRegister(XMM1); in TEST()
75 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
76 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
77 EXPECT_TRUE(reg.IsXmmRegister()); in TEST()
78 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
79 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
80 EXPECT_EQ(XMM1, reg.AsXmmRegister()); in TEST()
82 reg = X86ManagedRegister::FromXmmRegister(XMM7); in TEST()
83 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
84 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
85 EXPECT_TRUE(reg.IsXmmRegister()); in TEST()
86 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
87 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
88 EXPECT_EQ(XMM7, reg.AsXmmRegister()); in TEST()
92 X86ManagedRegister reg = X86ManagedRegister::FromX87Register(ST0); in TEST() local
93 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
94 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
95 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
96 EXPECT_TRUE(reg.IsX87Register()); in TEST()
97 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
98 EXPECT_EQ(ST0, reg.AsX87Register()); in TEST()
100 reg = X86ManagedRegister::FromX87Register(ST1); in TEST()
101 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
102 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
103 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
104 EXPECT_TRUE(reg.IsX87Register()); in TEST()
105 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
106 EXPECT_EQ(ST1, reg.AsX87Register()); in TEST()
108 reg = X86ManagedRegister::FromX87Register(ST7); in TEST()
109 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
110 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
111 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
112 EXPECT_TRUE(reg.IsX87Register()); in TEST()
113 EXPECT_TRUE(!reg.IsRegisterPair()); in TEST()
114 EXPECT_EQ(ST7, reg.AsX87Register()); in TEST()
118 X86ManagedRegister reg = X86ManagedRegister::FromRegisterPair(EAX_EDX); in TEST() local
119 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
120 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
121 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
122 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
123 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
124 EXPECT_EQ(EAX, reg.AsRegisterPairLow()); in TEST()
125 EXPECT_EQ(EDX, reg.AsRegisterPairHigh()); in TEST()
127 reg = X86ManagedRegister::FromRegisterPair(EAX_ECX); in TEST()
128 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
129 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
130 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
131 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
132 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
133 EXPECT_EQ(EAX, reg.AsRegisterPairLow()); in TEST()
134 EXPECT_EQ(ECX, reg.AsRegisterPairHigh()); in TEST()
136 reg = X86ManagedRegister::FromRegisterPair(EAX_EBX); in TEST()
137 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
138 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
139 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
140 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
141 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
142 EXPECT_EQ(EAX, reg.AsRegisterPairLow()); in TEST()
143 EXPECT_EQ(EBX, reg.AsRegisterPairHigh()); in TEST()
145 reg = X86ManagedRegister::FromRegisterPair(EAX_EDI); in TEST()
146 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
147 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
148 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
149 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
150 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
151 EXPECT_EQ(EAX, reg.AsRegisterPairLow()); in TEST()
152 EXPECT_EQ(EDI, reg.AsRegisterPairHigh()); in TEST()
154 reg = X86ManagedRegister::FromRegisterPair(EDX_ECX); in TEST()
155 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
156 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
157 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
158 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
159 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
160 EXPECT_EQ(EDX, reg.AsRegisterPairLow()); in TEST()
161 EXPECT_EQ(ECX, reg.AsRegisterPairHigh()); in TEST()
163 reg = X86ManagedRegister::FromRegisterPair(EDX_EBX); in TEST()
164 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
165 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
166 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
167 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
168 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
169 EXPECT_EQ(EDX, reg.AsRegisterPairLow()); in TEST()
170 EXPECT_EQ(EBX, reg.AsRegisterPairHigh()); in TEST()
172 reg = X86ManagedRegister::FromRegisterPair(EDX_EDI); in TEST()
173 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
174 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
175 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
176 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
177 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
178 EXPECT_EQ(EDX, reg.AsRegisterPairLow()); in TEST()
179 EXPECT_EQ(EDI, reg.AsRegisterPairHigh()); in TEST()
181 reg = X86ManagedRegister::FromRegisterPair(ECX_EBX); in TEST()
182 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
183 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
184 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
185 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
186 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
187 EXPECT_EQ(ECX, reg.AsRegisterPairLow()); in TEST()
188 EXPECT_EQ(EBX, reg.AsRegisterPairHigh()); in TEST()
190 reg = X86ManagedRegister::FromRegisterPair(ECX_EDI); in TEST()
191 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
192 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
193 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
194 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
195 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
196 EXPECT_EQ(ECX, reg.AsRegisterPairLow()); in TEST()
197 EXPECT_EQ(EDI, reg.AsRegisterPairHigh()); in TEST()
199 reg = X86ManagedRegister::FromRegisterPair(EBX_EDI); in TEST()
200 EXPECT_TRUE(!reg.IsNoRegister()); in TEST()
201 EXPECT_TRUE(!reg.IsCpuRegister()); in TEST()
202 EXPECT_TRUE(!reg.IsXmmRegister()); in TEST()
203 EXPECT_TRUE(!reg.IsX87Register()); in TEST()
204 EXPECT_TRUE(reg.IsRegisterPair()); in TEST()
205 EXPECT_EQ(EBX, reg.AsRegisterPairLow()); in TEST()
206 EXPECT_EQ(EDI, reg.AsRegisterPairHigh()); in TEST()
256 X86ManagedRegister reg = X86ManagedRegister::FromCpuRegister(EAX); in TEST() local
257 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
258 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
259 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
260 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
261 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
262 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
263 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
264 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
265 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
267 reg = X86ManagedRegister::FromCpuRegister(EDX); in TEST()
268 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
269 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
270 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
271 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
272 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
273 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
274 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
275 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
276 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
278 reg = X86ManagedRegister::FromCpuRegister(EDI); in TEST()
279 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
280 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
281 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
282 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
283 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
284 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
285 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
286 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
287 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
289 reg = X86ManagedRegister::FromCpuRegister(EBX); in TEST()
290 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
291 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
292 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
293 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
294 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
295 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
296 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
297 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
298 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
300 reg = X86ManagedRegister::FromXmmRegister(XMM0); in TEST()
301 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
302 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
303 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
304 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
305 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
306 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
307 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
308 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
309 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
311 reg = X86ManagedRegister::FromX87Register(ST0); in TEST()
312 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
313 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
314 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
315 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
316 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
317 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
318 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
319 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
320 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
322 reg = X86ManagedRegister::FromRegisterPair(EAX_EDX); in TEST()
323 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
324 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
325 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
326 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
327 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
328 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
329 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
330 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
331 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EDX_ECX))); in TEST()
332 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
334 reg = X86ManagedRegister::FromRegisterPair(EBX_EDI); in TEST()
335 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
336 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
337 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
338 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
339 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
340 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
341 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
342 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
343 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
344 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EDX_EBX))); in TEST()
346 reg = X86ManagedRegister::FromRegisterPair(EDX_ECX); in TEST()
347 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EAX))); in TEST()
348 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EBX))); in TEST()
349 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromCpuRegister(EDI))); in TEST()
350 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM0))); in TEST()
351 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromXmmRegister(XMM7))); in TEST()
352 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST0))); in TEST()
353 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromX87Register(ST7))); in TEST()
354 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EAX_EDX))); in TEST()
355 EXPECT_TRUE(!reg.Overlaps(X86ManagedRegister::FromRegisterPair(EBX_EDI))); in TEST()
356 EXPECT_TRUE(reg.Overlaps(X86ManagedRegister::FromRegisterPair(EDX_EBX))); in TEST()