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