Lines Matching refs:ToAddress
276 static inline i::Address ToAddress(int n) { in ToAddress() function
287 code_map.AddCode(ToAddress(0x1500), &entry1, 0x200); in TEST()
288 code_map.AddCode(ToAddress(0x1700), &entry2, 0x100); in TEST()
289 code_map.AddCode(ToAddress(0x1900), &entry3, 0x50); in TEST()
290 code_map.AddCode(ToAddress(0x1950), &entry4, 0x10); in TEST()
292 CHECK(!code_map.FindEntry(ToAddress(0x1500 - 1))); in TEST()
293 CHECK_EQ(&entry1, code_map.FindEntry(ToAddress(0x1500))); in TEST()
294 CHECK_EQ(&entry1, code_map.FindEntry(ToAddress(0x1500 + 0x100))); in TEST()
295 CHECK_EQ(&entry1, code_map.FindEntry(ToAddress(0x1500 + 0x200 - 1))); in TEST()
296 CHECK_EQ(&entry2, code_map.FindEntry(ToAddress(0x1700))); in TEST()
297 CHECK_EQ(&entry2, code_map.FindEntry(ToAddress(0x1700 + 0x50))); in TEST()
298 CHECK_EQ(&entry2, code_map.FindEntry(ToAddress(0x1700 + 0x100 - 1))); in TEST()
299 CHECK(!code_map.FindEntry(ToAddress(0x1700 + 0x100))); in TEST()
300 CHECK(!code_map.FindEntry(ToAddress(0x1900 - 1))); in TEST()
301 CHECK_EQ(&entry3, code_map.FindEntry(ToAddress(0x1900))); in TEST()
302 CHECK_EQ(&entry3, code_map.FindEntry(ToAddress(0x1900 + 0x28))); in TEST()
303 CHECK_EQ(&entry4, code_map.FindEntry(ToAddress(0x1950))); in TEST()
304 CHECK_EQ(&entry4, code_map.FindEntry(ToAddress(0x1950 + 0x7))); in TEST()
305 CHECK_EQ(&entry4, code_map.FindEntry(ToAddress(0x1950 + 0x10 - 1))); in TEST()
306 CHECK(!code_map.FindEntry(ToAddress(0x1950 + 0x10))); in TEST()
307 CHECK(!code_map.FindEntry(ToAddress(0xFFFFFFFF))); in TEST()
315 code_map.AddCode(ToAddress(0x1500), &entry1, 0x200); in TEST()
316 code_map.AddCode(ToAddress(0x1700), &entry2, 0x100); in TEST()
317 CHECK_EQ(&entry1, code_map.FindEntry(ToAddress(0x1500))); in TEST()
318 CHECK_EQ(&entry2, code_map.FindEntry(ToAddress(0x1700))); in TEST()
319 code_map.MoveCode(ToAddress(0x1500), ToAddress(0x1700)); // Deprecate bbb. in TEST()
320 CHECK(!code_map.FindEntry(ToAddress(0x1500))); in TEST()
321 CHECK_EQ(&entry1, code_map.FindEntry(ToAddress(0x1700))); in TEST()
323 code_map.AddCode(ToAddress(0x1750), &entry3, 0x100); in TEST()
324 CHECK(!code_map.FindEntry(ToAddress(0x1700))); in TEST()
325 CHECK_EQ(&entry3, code_map.FindEntry(ToAddress(0x1750))); in TEST()
356 generator.code_map()->AddCode(ToAddress(0x1500), entry1, 0x200); in TEST()
357 generator.code_map()->AddCode(ToAddress(0x1700), entry2, 0x100); in TEST()
358 generator.code_map()->AddCode(ToAddress(0x1900), entry3, 0x50); in TEST()
365 sample1.pc = ToAddress(0x1600); in TEST()
366 sample1.tos = ToAddress(0x1500); in TEST()
367 sample1.stack[0] = ToAddress(0x1510); in TEST()
371 sample2.pc = ToAddress(0x1925); in TEST()
372 sample2.tos = ToAddress(0x1900); in TEST()
373 sample2.stack[0] = ToAddress(0x1780); in TEST()
374 sample2.stack[1] = ToAddress(0x10000); // non-existent. in TEST()
375 sample2.stack[2] = ToAddress(0x1620); in TEST()
379 sample3.pc = ToAddress(0x1510); in TEST()
380 sample3.tos = ToAddress(0x1500); in TEST()
381 sample3.stack[0] = ToAddress(0x1910); in TEST()
382 sample3.stack[1] = ToAddress(0x1610); in TEST()
422 generator.code_map()->AddCode(ToAddress(0x1500), entry1, 0x200); in TEST()
423 generator.code_map()->AddCode(ToAddress(0x1700), entry2, 0x100); in TEST()
424 generator.code_map()->AddCode(ToAddress(0x1900), entry3, 0x50); in TEST()
431 sample1.pc = ToAddress(0x1600); in TEST()
432 sample1.stack[0] = ToAddress(0x1510); in TEST()
436 sample2.pc = ToAddress(0x1925); in TEST()
437 sample2.stack[0] = ToAddress(0x1780); in TEST()
438 sample2.stack[1] = ToAddress(0x10000); // non-existent. in TEST()
439 sample2.stack[2] = ToAddress(0x1620); in TEST()
443 sample3.pc = ToAddress(0x1510); in TEST()
444 sample3.stack[0] = ToAddress(0x1910); in TEST()
445 sample3.stack[1] = ToAddress(0x1610); in TEST()
468 generator.code_map()->AddCode(ToAddress(0x1500), entry1, 0x200); in TEST()
473 sample1.pc = ToAddress(0x1600); in TEST()
474 sample1.stack[0] = ToAddress(0x1510); in TEST()