Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: test/cctest/test-assembler-mips.cc

Issue 146213004: A64: Synchronize with r16849. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4); 42 typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
43 typedef Object* (*F2)(int x, int y, int p2, int p3, int p4); 43 typedef Object* (*F2)(int x, int y, int p2, int p3, int p4);
44 typedef Object* (*F3)(void* p, int p1, int p2, int p3, int p4); 44 typedef Object* (*F3)(void* p, int p1, int p2, int p3, int p4);
45 45
46 46
47 #define __ assm. 47 #define __ assm.
48 48
49 49
50 TEST(MIPS0) { 50 TEST(MIPS0) {
51 CcTest::InitializeVM(); 51 CcTest::InitializeVM();
52 Isolate* isolate = Isolate::Current(); 52 Isolate* isolate = CcTest::i_isolate();
53 HandleScope scope(isolate); 53 HandleScope scope(isolate);
54 54
55 MacroAssembler assm(isolate, NULL, 0); 55 MacroAssembler assm(isolate, NULL, 0);
56 56
57 // Addition. 57 // Addition.
58 __ addu(v0, a0, a1); 58 __ addu(v0, a0, a1);
59 __ jr(ra); 59 __ jr(ra);
60 __ nop(); 60 __ nop();
61 61
62 CodeDesc desc; 62 CodeDesc desc;
63 assm.GetCode(&desc); 63 assm.GetCode(&desc);
64 Object* code = HEAP->CreateCode( 64 Object* code = CcTest::heap()->CreateCode(
65 desc, 65 desc,
66 Code::ComputeFlags(Code::STUB), 66 Code::ComputeFlags(Code::STUB),
67 Handle<Code>())->ToObjectChecked(); 67 Handle<Code>())->ToObjectChecked();
68 CHECK(code->IsCode()); 68 CHECK(code->IsCode());
69 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry()); 69 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry());
70 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); 70 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
71 ::printf("f() = %d\n", res); 71 ::printf("f() = %d\n", res);
72 CHECK_EQ(0xabc, res); 72 CHECK_EQ(0xabc, res);
73 } 73 }
74 74
75 75
76 TEST(MIPS1) { 76 TEST(MIPS1) {
77 CcTest::InitializeVM(); 77 CcTest::InitializeVM();
78 Isolate* isolate = Isolate::Current(); 78 Isolate* isolate = CcTest::i_isolate();
79 HandleScope scope(isolate); 79 HandleScope scope(isolate);
80 80
81 MacroAssembler assm(isolate, NULL, 0); 81 MacroAssembler assm(isolate, NULL, 0);
82 Label L, C; 82 Label L, C;
83 83
84 __ mov(a1, a0); 84 __ mov(a1, a0);
85 __ li(v0, 0); 85 __ li(v0, 0);
86 __ b(&C); 86 __ b(&C);
87 __ nop(); 87 __ nop();
88 88
89 __ bind(&L); 89 __ bind(&L);
90 __ addu(v0, v0, a1); 90 __ addu(v0, v0, a1);
91 __ addiu(a1, a1, -1); 91 __ addiu(a1, a1, -1);
92 92
93 __ bind(&C); 93 __ bind(&C);
94 __ xori(v1, a1, 0); 94 __ xori(v1, a1, 0);
95 __ Branch(&L, ne, v1, Operand(0)); 95 __ Branch(&L, ne, v1, Operand(0));
96 __ nop(); 96 __ nop();
97 97
98 __ jr(ra); 98 __ jr(ra);
99 __ nop(); 99 __ nop();
100 100
101 CodeDesc desc; 101 CodeDesc desc;
102 assm.GetCode(&desc); 102 assm.GetCode(&desc);
103 Object* code = HEAP->CreateCode( 103 Object* code = CcTest::heap()->CreateCode(
104 desc, 104 desc,
105 Code::ComputeFlags(Code::STUB), 105 Code::ComputeFlags(Code::STUB),
106 Handle<Code>())->ToObjectChecked(); 106 Handle<Code>())->ToObjectChecked();
107 CHECK(code->IsCode()); 107 CHECK(code->IsCode());
108 F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry()); 108 F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry());
109 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0)); 109 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0));
110 ::printf("f() = %d\n", res); 110 ::printf("f() = %d\n", res);
111 CHECK_EQ(1275, res); 111 CHECK_EQ(1275, res);
112 } 112 }
113 113
114 114
115 TEST(MIPS2) { 115 TEST(MIPS2) {
116 CcTest::InitializeVM(); 116 CcTest::InitializeVM();
117 Isolate* isolate = Isolate::Current(); 117 Isolate* isolate = CcTest::i_isolate();
118 HandleScope scope(isolate); 118 HandleScope scope(isolate);
119 119
120 MacroAssembler assm(isolate, NULL, 0); 120 MacroAssembler assm(isolate, NULL, 0);
121 121
122 Label exit, error; 122 Label exit, error;
123 123
124 // ----- Test all instructions. 124 // ----- Test all instructions.
125 125
126 // Test lui, ori, and addiu, used in the li pseudo-instruction. 126 // Test lui, ori, and addiu, used in the li pseudo-instruction.
127 // This way we can then safely load registers with chosen values. 127 // This way we can then safely load registers with chosen values.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 __ bind(&error); 234 __ bind(&error);
235 // Got an error. Return a wrong result. 235 // Got an error. Return a wrong result.
236 __ li(v0, 666); 236 __ li(v0, 666);
237 237
238 __ bind(&exit); 238 __ bind(&exit);
239 __ jr(ra); 239 __ jr(ra);
240 __ nop(); 240 __ nop();
241 241
242 CodeDesc desc; 242 CodeDesc desc;
243 assm.GetCode(&desc); 243 assm.GetCode(&desc);
244 Object* code = HEAP->CreateCode( 244 Object* code = CcTest::heap()->CreateCode(
245 desc, 245 desc,
246 Code::ComputeFlags(Code::STUB), 246 Code::ComputeFlags(Code::STUB),
247 Handle<Code>())->ToObjectChecked(); 247 Handle<Code>())->ToObjectChecked();
248 CHECK(code->IsCode()); 248 CHECK(code->IsCode());
249 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry()); 249 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry());
250 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); 250 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
251 ::printf("f() = %d\n", res); 251 ::printf("f() = %d\n", res);
252 CHECK_EQ(0x31415926, res); 252 CHECK_EQ(0x31415926, res);
253 } 253 }
254 254
255 255
256 TEST(MIPS3) { 256 TEST(MIPS3) {
257 // Test floating point instructions. 257 // Test floating point instructions.
258 CcTest::InitializeVM(); 258 CcTest::InitializeVM();
259 Isolate* isolate = Isolate::Current(); 259 Isolate* isolate = CcTest::i_isolate();
260 HandleScope scope(isolate); 260 HandleScope scope(isolate);
261 261
262 typedef struct { 262 typedef struct {
263 double a; 263 double a;
264 double b; 264 double b;
265 double c; 265 double c;
266 double d; 266 double d;
267 double e; 267 double e;
268 double f; 268 double f;
269 double g; 269 double g;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, i)) ); 307 __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, i)) );
308 __ madd_d(f14, f6, f4, f6); 308 __ madd_d(f14, f6, f4, f6);
309 __ sdc1(f14, MemOperand(a0, OFFSET_OF(T, h)) ); 309 __ sdc1(f14, MemOperand(a0, OFFSET_OF(T, h)) );
310 } 310 }
311 311
312 __ jr(ra); 312 __ jr(ra);
313 __ nop(); 313 __ nop();
314 314
315 CodeDesc desc; 315 CodeDesc desc;
316 assm.GetCode(&desc); 316 assm.GetCode(&desc);
317 Object* code = HEAP->CreateCode( 317 Object* code = CcTest::heap()->CreateCode(
318 desc, 318 desc,
319 Code::ComputeFlags(Code::STUB), 319 Code::ComputeFlags(Code::STUB),
320 Handle<Code>())->ToObjectChecked(); 320 Handle<Code>())->ToObjectChecked();
321 CHECK(code->IsCode()); 321 CHECK(code->IsCode());
322 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 322 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
323 t.a = 1.5e14; 323 t.a = 1.5e14;
324 t.b = 2.75e11; 324 t.b = 2.75e11;
325 t.c = 0.0; 325 t.c = 0.0;
326 t.d = 0.0; 326 t.d = 0.0;
327 t.e = 0.0; 327 t.e = 0.0;
(...skipping 11 matching lines...) Expand all
339 CHECK_EQ(10.97451593465515908537, t.g); 339 CHECK_EQ(10.97451593465515908537, t.g);
340 if (kArchVariant == kMips32r2) { 340 if (kArchVariant == kMips32r2) {
341 CHECK_EQ(6.875, t.h); 341 CHECK_EQ(6.875, t.h);
342 } 342 }
343 } 343 }
344 344
345 345
346 TEST(MIPS4) { 346 TEST(MIPS4) {
347 // Test moves between floating point and integer registers. 347 // Test moves between floating point and integer registers.
348 CcTest::InitializeVM(); 348 CcTest::InitializeVM();
349 Isolate* isolate = Isolate::Current(); 349 Isolate* isolate = CcTest::i_isolate();
350 HandleScope scope(isolate); 350 HandleScope scope(isolate);
351 351
352 typedef struct { 352 typedef struct {
353 double a; 353 double a;
354 double b; 354 double b;
355 double c; 355 double c;
356 } T; 356 } T;
357 T t; 357 T t;
358 358
359 Assembler assm(isolate, NULL, 0); 359 Assembler assm(isolate, NULL, 0);
(...skipping 15 matching lines...) Expand all
375 375
376 // Store the swapped f4 and f5 back to memory. 376 // Store the swapped f4 and f5 back to memory.
377 __ sdc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); 377 __ sdc1(f4, MemOperand(a0, OFFSET_OF(T, a)) );
378 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, c)) ); 378 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, c)) );
379 379
380 __ jr(ra); 380 __ jr(ra);
381 __ nop(); 381 __ nop();
382 382
383 CodeDesc desc; 383 CodeDesc desc;
384 assm.GetCode(&desc); 384 assm.GetCode(&desc);
385 Object* code = HEAP->CreateCode( 385 Object* code = CcTest::heap()->CreateCode(
386 desc, 386 desc,
387 Code::ComputeFlags(Code::STUB), 387 Code::ComputeFlags(Code::STUB),
388 Handle<Code>())->ToObjectChecked(); 388 Handle<Code>())->ToObjectChecked();
389 CHECK(code->IsCode()); 389 CHECK(code->IsCode());
390 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 390 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
391 t.a = 1.5e22; 391 t.a = 1.5e22;
392 t.b = 2.75e11; 392 t.b = 2.75e11;
393 t.c = 17.17; 393 t.c = 17.17;
394 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 394 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
395 USE(dummy); 395 USE(dummy);
396 396
397 CHECK_EQ(2.75e11, t.a); 397 CHECK_EQ(2.75e11, t.a);
398 CHECK_EQ(2.75e11, t.b); 398 CHECK_EQ(2.75e11, t.b);
399 CHECK_EQ(1.5e22, t.c); 399 CHECK_EQ(1.5e22, t.c);
400 } 400 }
401 401
402 402
403 TEST(MIPS5) { 403 TEST(MIPS5) {
404 // Test conversions between doubles and integers. 404 // Test conversions between doubles and integers.
405 CcTest::InitializeVM(); 405 CcTest::InitializeVM();
406 Isolate* isolate = Isolate::Current(); 406 Isolate* isolate = CcTest::i_isolate();
407 HandleScope scope(isolate); 407 HandleScope scope(isolate);
408 408
409 typedef struct { 409 typedef struct {
410 double a; 410 double a;
411 double b; 411 double b;
412 int i; 412 int i;
413 int j; 413 int j;
414 } T; 414 } T;
415 T t; 415 T t;
416 416
(...skipping 24 matching lines...) Expand all
441 // Convert int in original j (t1) to double in b. 441 // Convert int in original j (t1) to double in b.
442 __ mtc1(t1, f14); 442 __ mtc1(t1, f14);
443 __ cvt_d_w(f2, f14); 443 __ cvt_d_w(f2, f14);
444 __ sdc1(f2, MemOperand(a0, OFFSET_OF(T, b)) ); 444 __ sdc1(f2, MemOperand(a0, OFFSET_OF(T, b)) );
445 445
446 __ jr(ra); 446 __ jr(ra);
447 __ nop(); 447 __ nop();
448 448
449 CodeDesc desc; 449 CodeDesc desc;
450 assm.GetCode(&desc); 450 assm.GetCode(&desc);
451 Object* code = HEAP->CreateCode( 451 Object* code = CcTest::heap()->CreateCode(
452 desc, 452 desc,
453 Code::ComputeFlags(Code::STUB), 453 Code::ComputeFlags(Code::STUB),
454 Handle<Code>())->ToObjectChecked(); 454 Handle<Code>())->ToObjectChecked();
455 CHECK(code->IsCode()); 455 CHECK(code->IsCode());
456 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 456 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
457 t.a = 1.5e4; 457 t.a = 1.5e4;
458 t.b = 2.75e8; 458 t.b = 2.75e8;
459 t.i = 12345678; 459 t.i = 12345678;
460 t.j = -100000; 460 t.j = -100000;
461 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 461 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
462 USE(dummy); 462 USE(dummy);
463 463
464 CHECK_EQ(12345678.0, t.a); 464 CHECK_EQ(12345678.0, t.a);
465 CHECK_EQ(-100000.0, t.b); 465 CHECK_EQ(-100000.0, t.b);
466 CHECK_EQ(15000, t.i); 466 CHECK_EQ(15000, t.i);
467 CHECK_EQ(275000000, t.j); 467 CHECK_EQ(275000000, t.j);
468 } 468 }
469 469
470 470
471 TEST(MIPS6) { 471 TEST(MIPS6) {
472 // Test simple memory loads and stores. 472 // Test simple memory loads and stores.
473 CcTest::InitializeVM(); 473 CcTest::InitializeVM();
474 Isolate* isolate = Isolate::Current(); 474 Isolate* isolate = CcTest::i_isolate();
475 HandleScope scope(isolate); 475 HandleScope scope(isolate);
476 476
477 typedef struct { 477 typedef struct {
478 uint32_t ui; 478 uint32_t ui;
479 int32_t si; 479 int32_t si;
480 int32_t r1; 480 int32_t r1;
481 int32_t r2; 481 int32_t r2;
482 int32_t r3; 482 int32_t r3;
483 int32_t r4; 483 int32_t r4;
484 int32_t r5; 484 int32_t r5;
(...skipping 29 matching lines...) Expand all
514 __ ori(t5, t5, 0x3333); 514 __ ori(t5, t5, 0x3333);
515 __ sw(t5, MemOperand(a0, OFFSET_OF(T, r6)) ); 515 __ sw(t5, MemOperand(a0, OFFSET_OF(T, r6)) );
516 __ lhu(t5, MemOperand(a0, OFFSET_OF(T, si)) ); 516 __ lhu(t5, MemOperand(a0, OFFSET_OF(T, si)) );
517 __ sh(t5, MemOperand(a0, OFFSET_OF(T, r6)) ); 517 __ sh(t5, MemOperand(a0, OFFSET_OF(T, r6)) );
518 518
519 __ jr(ra); 519 __ jr(ra);
520 __ nop(); 520 __ nop();
521 521
522 CodeDesc desc; 522 CodeDesc desc;
523 assm.GetCode(&desc); 523 assm.GetCode(&desc);
524 Object* code = HEAP->CreateCode( 524 Object* code = CcTest::heap()->CreateCode(
525 desc, 525 desc,
526 Code::ComputeFlags(Code::STUB), 526 Code::ComputeFlags(Code::STUB),
527 Handle<Code>())->ToObjectChecked(); 527 Handle<Code>())->ToObjectChecked();
528 CHECK(code->IsCode()); 528 CHECK(code->IsCode());
529 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 529 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
530 t.ui = 0x11223344; 530 t.ui = 0x11223344;
531 t.si = 0x99aabbcc; 531 t.si = 0x99aabbcc;
532 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 532 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
533 USE(dummy); 533 USE(dummy);
534 534
535 CHECK_EQ(0x11223344, t.r1); 535 CHECK_EQ(0x11223344, t.r1);
536 CHECK_EQ(0x3344, t.r2); 536 CHECK_EQ(0x3344, t.r2);
537 CHECK_EQ(0xffffbbcc, t.r3); 537 CHECK_EQ(0xffffbbcc, t.r3);
538 CHECK_EQ(0x0000bbcc, t.r4); 538 CHECK_EQ(0x0000bbcc, t.r4);
539 CHECK_EQ(0xffffffcc, t.r5); 539 CHECK_EQ(0xffffffcc, t.r5);
540 CHECK_EQ(0x3333bbcc, t.r6); 540 CHECK_EQ(0x3333bbcc, t.r6);
541 } 541 }
542 542
543 543
544 TEST(MIPS7) { 544 TEST(MIPS7) {
545 // Test floating point compare and branch instructions. 545 // Test floating point compare and branch instructions.
546 CcTest::InitializeVM(); 546 CcTest::InitializeVM();
547 Isolate* isolate = Isolate::Current(); 547 Isolate* isolate = CcTest::i_isolate();
548 HandleScope scope(isolate); 548 HandleScope scope(isolate);
549 549
550 typedef struct { 550 typedef struct {
551 double a; 551 double a;
552 double b; 552 double b;
553 double c; 553 double c;
554 double d; 554 double d;
555 double e; 555 double e;
556 double f; 556 double f;
557 int32_t result; 557 int32_t result;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 591
592 // This test-case should have additional tests. 592 // This test-case should have additional tests.
593 593
594 __ bind(&outa_here); 594 __ bind(&outa_here);
595 595
596 __ jr(ra); 596 __ jr(ra);
597 __ nop(); 597 __ nop();
598 598
599 CodeDesc desc; 599 CodeDesc desc;
600 assm.GetCode(&desc); 600 assm.GetCode(&desc);
601 Object* code = HEAP->CreateCode( 601 Object* code = CcTest::heap()->CreateCode(
602 desc, 602 desc,
603 Code::ComputeFlags(Code::STUB), 603 Code::ComputeFlags(Code::STUB),
604 Handle<Code>())->ToObjectChecked(); 604 Handle<Code>())->ToObjectChecked();
605 CHECK(code->IsCode()); 605 CHECK(code->IsCode());
606 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 606 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
607 t.a = 1.5e14; 607 t.a = 1.5e14;
608 t.b = 2.75e11; 608 t.b = 2.75e11;
609 t.c = 2.0; 609 t.c = 2.0;
610 t.d = -4.0; 610 t.d = -4.0;
611 t.e = 0.0; 611 t.e = 0.0;
612 t.f = 0.0; 612 t.f = 0.0;
613 t.result = 0; 613 t.result = 0;
614 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 614 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
615 USE(dummy); 615 USE(dummy);
616 CHECK_EQ(1.5e14, t.a); 616 CHECK_EQ(1.5e14, t.a);
617 CHECK_EQ(2.75e11, t.b); 617 CHECK_EQ(2.75e11, t.b);
618 CHECK_EQ(1, t.result); 618 CHECK_EQ(1, t.result);
619 } 619 }
620 620
621 621
622 TEST(MIPS8) { 622 TEST(MIPS8) {
623 // Test ROTR and ROTRV instructions. 623 // Test ROTR and ROTRV instructions.
624 CcTest::InitializeVM(); 624 CcTest::InitializeVM();
625 Isolate* isolate = Isolate::Current(); 625 Isolate* isolate = CcTest::i_isolate();
626 HandleScope scope(isolate); 626 HandleScope scope(isolate);
627 627
628 typedef struct { 628 typedef struct {
629 int32_t input; 629 int32_t input;
630 int32_t result_rotr_4; 630 int32_t result_rotr_4;
631 int32_t result_rotr_8; 631 int32_t result_rotr_8;
632 int32_t result_rotr_12; 632 int32_t result_rotr_12;
633 int32_t result_rotr_16; 633 int32_t result_rotr_16;
634 int32_t result_rotr_20; 634 int32_t result_rotr_20;
635 int32_t result_rotr_24; 635 int32_t result_rotr_24;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 __ sw(t4, MemOperand(a0, OFFSET_OF(T, result_rotrv_16)) ); 690 __ sw(t4, MemOperand(a0, OFFSET_OF(T, result_rotrv_16)) );
691 __ sw(t5, MemOperand(a0, OFFSET_OF(T, result_rotrv_20)) ); 691 __ sw(t5, MemOperand(a0, OFFSET_OF(T, result_rotrv_20)) );
692 __ sw(t6, MemOperand(a0, OFFSET_OF(T, result_rotrv_24)) ); 692 __ sw(t6, MemOperand(a0, OFFSET_OF(T, result_rotrv_24)) );
693 __ sw(t7, MemOperand(a0, OFFSET_OF(T, result_rotrv_28)) ); 693 __ sw(t7, MemOperand(a0, OFFSET_OF(T, result_rotrv_28)) );
694 694
695 __ jr(ra); 695 __ jr(ra);
696 __ nop(); 696 __ nop();
697 697
698 CodeDesc desc; 698 CodeDesc desc;
699 assm.GetCode(&desc); 699 assm.GetCode(&desc);
700 Object* code = HEAP->CreateCode( 700 Object* code = CcTest::heap()->CreateCode(
701 desc, 701 desc,
702 Code::ComputeFlags(Code::STUB), 702 Code::ComputeFlags(Code::STUB),
703 Handle<Code>())->ToObjectChecked(); 703 Handle<Code>())->ToObjectChecked();
704 CHECK(code->IsCode()); 704 CHECK(code->IsCode());
705 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 705 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
706 t.input = 0x12345678; 706 t.input = 0x12345678;
707 Object* dummy = CALL_GENERATED_CODE(f, &t, 0x0, 0, 0, 0); 707 Object* dummy = CALL_GENERATED_CODE(f, &t, 0x0, 0, 0, 0);
708 USE(dummy); 708 USE(dummy);
709 CHECK_EQ(0x81234567, t.result_rotr_4); 709 CHECK_EQ(0x81234567, t.result_rotr_4);
710 CHECK_EQ(0x78123456, t.result_rotr_8); 710 CHECK_EQ(0x78123456, t.result_rotr_8);
711 CHECK_EQ(0x67812345, t.result_rotr_12); 711 CHECK_EQ(0x67812345, t.result_rotr_12);
712 CHECK_EQ(0x56781234, t.result_rotr_16); 712 CHECK_EQ(0x56781234, t.result_rotr_16);
713 CHECK_EQ(0x45678123, t.result_rotr_20); 713 CHECK_EQ(0x45678123, t.result_rotr_20);
714 CHECK_EQ(0x34567812, t.result_rotr_24); 714 CHECK_EQ(0x34567812, t.result_rotr_24);
715 CHECK_EQ(0x23456781, t.result_rotr_28); 715 CHECK_EQ(0x23456781, t.result_rotr_28);
716 716
717 CHECK_EQ(0x81234567, t.result_rotrv_4); 717 CHECK_EQ(0x81234567, t.result_rotrv_4);
718 CHECK_EQ(0x78123456, t.result_rotrv_8); 718 CHECK_EQ(0x78123456, t.result_rotrv_8);
719 CHECK_EQ(0x67812345, t.result_rotrv_12); 719 CHECK_EQ(0x67812345, t.result_rotrv_12);
720 CHECK_EQ(0x56781234, t.result_rotrv_16); 720 CHECK_EQ(0x56781234, t.result_rotrv_16);
721 CHECK_EQ(0x45678123, t.result_rotrv_20); 721 CHECK_EQ(0x45678123, t.result_rotrv_20);
722 CHECK_EQ(0x34567812, t.result_rotrv_24); 722 CHECK_EQ(0x34567812, t.result_rotrv_24);
723 CHECK_EQ(0x23456781, t.result_rotrv_28); 723 CHECK_EQ(0x23456781, t.result_rotrv_28);
724 } 724 }
725 725
726 726
727 TEST(MIPS9) { 727 TEST(MIPS9) {
728 // Test BRANCH improvements. 728 // Test BRANCH improvements.
729 CcTest::InitializeVM(); 729 CcTest::InitializeVM();
730 Isolate* isolate = Isolate::Current(); 730 Isolate* isolate = CcTest::i_isolate();
731 HandleScope scope(isolate); 731 HandleScope scope(isolate);
732 732
733 MacroAssembler assm(isolate, NULL, 0); 733 MacroAssembler assm(isolate, NULL, 0);
734 Label exit, exit2, exit3; 734 Label exit, exit2, exit3;
735 735
736 __ Branch(&exit, ge, a0, Operand(0x00000000)); 736 __ Branch(&exit, ge, a0, Operand(0x00000000));
737 __ Branch(&exit2, ge, a0, Operand(0x00001FFF)); 737 __ Branch(&exit2, ge, a0, Operand(0x00001FFF));
738 __ Branch(&exit3, ge, a0, Operand(0x0001FFFF)); 738 __ Branch(&exit3, ge, a0, Operand(0x0001FFFF));
739 739
740 __ bind(&exit); 740 __ bind(&exit);
741 __ bind(&exit2); 741 __ bind(&exit2);
742 __ bind(&exit3); 742 __ bind(&exit3);
743 __ jr(ra); 743 __ jr(ra);
744 __ nop(); 744 __ nop();
745 745
746 CodeDesc desc; 746 CodeDesc desc;
747 assm.GetCode(&desc); 747 assm.GetCode(&desc);
748 Object* code = HEAP->CreateCode( 748 Object* code = CcTest::heap()->CreateCode(
749 desc, 749 desc,
750 Code::ComputeFlags(Code::STUB), 750 Code::ComputeFlags(Code::STUB),
751 Handle<Code>())->ToObjectChecked(); 751 Handle<Code>())->ToObjectChecked();
752 CHECK(code->IsCode()); 752 CHECK(code->IsCode());
753 } 753 }
754 754
755 755
756 TEST(MIPS10) { 756 TEST(MIPS10) {
757 // Test conversions between doubles and long integers. 757 // Test conversions between doubles and long integers.
758 // Test hos the long ints map to FP regs pairs. 758 // Test hos the long ints map to FP regs pairs.
759 CcTest::InitializeVM(); 759 CcTest::InitializeVM();
760 Isolate* isolate = Isolate::Current(); 760 Isolate* isolate = CcTest::i_isolate();
761 HandleScope scope(isolate); 761 HandleScope scope(isolate);
762 762
763 typedef struct { 763 typedef struct {
764 double a; 764 double a;
765 double b; 765 double b;
766 int32_t dbl_mant; 766 int32_t dbl_mant;
767 int32_t dbl_exp; 767 int32_t dbl_exp;
768 int32_t long_hi; 768 int32_t long_hi;
769 int32_t long_lo; 769 int32_t long_lo;
770 int32_t b_long_hi; 770 int32_t b_long_hi;
(...skipping 27 matching lines...) Expand all
798 __ mtc1(t0, f8); // f8 has LS 32-bits. 798 __ mtc1(t0, f8); // f8 has LS 32-bits.
799 __ mtc1(t1, f9); // f9 has MS 32-bits. 799 __ mtc1(t1, f9); // f9 has MS 32-bits.
800 __ cvt_d_l(f10, f8); 800 __ cvt_d_l(f10, f8);
801 __ sdc1(f10, MemOperand(a0, OFFSET_OF(T, b))); 801 __ sdc1(f10, MemOperand(a0, OFFSET_OF(T, b)));
802 802
803 __ jr(ra); 803 __ jr(ra);
804 __ nop(); 804 __ nop();
805 805
806 CodeDesc desc; 806 CodeDesc desc;
807 assm.GetCode(&desc); 807 assm.GetCode(&desc);
808 Object* code = HEAP->CreateCode( 808 Object* code = CcTest::heap()->CreateCode(
809 desc, 809 desc,
810 Code::ComputeFlags(Code::STUB), 810 Code::ComputeFlags(Code::STUB),
811 Handle<Code>())->ToObjectChecked(); 811 Handle<Code>())->ToObjectChecked();
812 CHECK(code->IsCode()); 812 CHECK(code->IsCode());
813 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 813 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
814 t.a = 2.147483647e9; // 0x7fffffff -> 0x41DFFFFFFFC00000 as double. 814 t.a = 2.147483647e9; // 0x7fffffff -> 0x41DFFFFFFFC00000 as double.
815 t.b_long_hi = 0x000000ff; // 0xFF00FF00FF -> 0x426FE01FE01FE000 as double. 815 t.b_long_hi = 0x000000ff; // 0xFF00FF00FF -> 0x426FE01FE01FE000 as double.
816 t.b_long_lo = 0x00ff00ff; 816 t.b_long_lo = 0x00ff00ff;
817 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 817 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
818 USE(dummy); 818 USE(dummy);
819 819
820 CHECK_EQ(0x41DFFFFF, t.dbl_exp); 820 CHECK_EQ(0x41DFFFFF, t.dbl_exp);
821 CHECK_EQ(0xFFC00000, t.dbl_mant); 821 CHECK_EQ(0xFFC00000, t.dbl_mant);
822 CHECK_EQ(0, t.long_hi); 822 CHECK_EQ(0, t.long_hi);
823 CHECK_EQ(0x7fffffff, t.long_lo); 823 CHECK_EQ(0x7fffffff, t.long_lo);
824 // 0xFF00FF00FF -> 1.095233372415e12. 824 // 0xFF00FF00FF -> 1.095233372415e12.
825 CHECK_EQ(1.095233372415e12, t.b); 825 CHECK_EQ(1.095233372415e12, t.b);
826 } 826 }
827 } 827 }
828 828
829 829
830 TEST(MIPS11) { 830 TEST(MIPS11) {
831 // Test LWL, LWR, SWL and SWR instructions. 831 // Test LWL, LWR, SWL and SWR instructions.
832 CcTest::InitializeVM(); 832 CcTest::InitializeVM();
833 Isolate* isolate = Isolate::Current(); 833 Isolate* isolate = CcTest::i_isolate();
834 HandleScope scope(isolate); 834 HandleScope scope(isolate);
835 835
836 typedef struct { 836 typedef struct {
837 int32_t reg_init; 837 int32_t reg_init;
838 int32_t mem_init; 838 int32_t mem_init;
839 int32_t lwl_0; 839 int32_t lwl_0;
840 int32_t lwl_1; 840 int32_t lwl_1;
841 int32_t lwl_2; 841 int32_t lwl_2;
842 int32_t lwl_3; 842 int32_t lwl_3;
843 int32_t lwr_0; 843 int32_t lwr_0;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 __ lw(t3, MemOperand(a0, OFFSET_OF(T, mem_init)) ); 931 __ lw(t3, MemOperand(a0, OFFSET_OF(T, mem_init)) );
932 __ sw(t3, MemOperand(a0, OFFSET_OF(T, swr_3)) ); 932 __ sw(t3, MemOperand(a0, OFFSET_OF(T, swr_3)) );
933 __ lw(t3, MemOperand(a0, OFFSET_OF(T, reg_init)) ); 933 __ lw(t3, MemOperand(a0, OFFSET_OF(T, reg_init)) );
934 __ swr(t3, MemOperand(a0, OFFSET_OF(T, swr_3) + 3) ); 934 __ swr(t3, MemOperand(a0, OFFSET_OF(T, swr_3) + 3) );
935 935
936 __ jr(ra); 936 __ jr(ra);
937 __ nop(); 937 __ nop();
938 938
939 CodeDesc desc; 939 CodeDesc desc;
940 assm.GetCode(&desc); 940 assm.GetCode(&desc);
941 Object* code = HEAP->CreateCode( 941 Object* code = CcTest::heap()->CreateCode(
942 desc, 942 desc,
943 Code::ComputeFlags(Code::STUB), 943 Code::ComputeFlags(Code::STUB),
944 Handle<Code>())->ToObjectChecked(); 944 Handle<Code>())->ToObjectChecked();
945 CHECK(code->IsCode()); 945 CHECK(code->IsCode());
946 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 946 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
947 t.reg_init = 0xaabbccdd; 947 t.reg_init = 0xaabbccdd;
948 t.mem_init = 0x11223344; 948 t.mem_init = 0x11223344;
949 949
950 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 950 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
951 USE(dummy); 951 USE(dummy);
(...skipping 15 matching lines...) Expand all
967 967
968 CHECK_EQ(0xaabbccdd, t.swr_0); 968 CHECK_EQ(0xaabbccdd, t.swr_0);
969 CHECK_EQ(0xbbccdd44, t.swr_1); 969 CHECK_EQ(0xbbccdd44, t.swr_1);
970 CHECK_EQ(0xccdd3344, t.swr_2); 970 CHECK_EQ(0xccdd3344, t.swr_2);
971 CHECK_EQ(0xdd223344, t.swr_3); 971 CHECK_EQ(0xdd223344, t.swr_3);
972 } 972 }
973 973
974 974
975 TEST(MIPS12) { 975 TEST(MIPS12) {
976 CcTest::InitializeVM(); 976 CcTest::InitializeVM();
977 Isolate* isolate = Isolate::Current(); 977 Isolate* isolate = CcTest::i_isolate();
978 HandleScope scope(isolate); 978 HandleScope scope(isolate);
979 979
980 typedef struct { 980 typedef struct {
981 int32_t x; 981 int32_t x;
982 int32_t y; 982 int32_t y;
983 int32_t y1; 983 int32_t y1;
984 int32_t y2; 984 int32_t y2;
985 int32_t y3; 985 int32_t y3;
986 int32_t y4; 986 int32_t y4;
987 } T; 987 } T;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 __ lw(t2, MemOperand(fp, OFFSET_OF(T, y)) ); 1036 __ lw(t2, MemOperand(fp, OFFSET_OF(T, y)) );
1037 __ pop(t3); 1037 __ pop(t3);
1038 __ nop(); 1038 __ nop();
1039 1039
1040 __ mov(fp, t6); 1040 __ mov(fp, t6);
1041 __ jr(ra); 1041 __ jr(ra);
1042 __ nop(); 1042 __ nop();
1043 1043
1044 CodeDesc desc; 1044 CodeDesc desc;
1045 assm.GetCode(&desc); 1045 assm.GetCode(&desc);
1046 Object* code = HEAP->CreateCode( 1046 Object* code = CcTest::heap()->CreateCode(
1047 desc, 1047 desc,
1048 Code::ComputeFlags(Code::STUB), 1048 Code::ComputeFlags(Code::STUB),
1049 Handle<Code>())->ToObjectChecked(); 1049 Handle<Code>())->ToObjectChecked();
1050 CHECK(code->IsCode()); 1050 CHECK(code->IsCode());
1051 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 1051 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
1052 t.x = 1; 1052 t.x = 1;
1053 t.y = 2; 1053 t.y = 2;
1054 t.y1 = 3; 1054 t.y1 = 3;
1055 t.y2 = 4; 1055 t.y2 = 4;
1056 t.y3 = 0XBABA; 1056 t.y3 = 0XBABA;
1057 t.y4 = 0xDEDA; 1057 t.y4 = 0xDEDA;
1058 1058
1059 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 1059 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
1060 USE(dummy); 1060 USE(dummy);
1061 1061
1062 CHECK_EQ(3, t.y1); 1062 CHECK_EQ(3, t.y1);
1063 } 1063 }
1064 1064
1065 1065
1066 TEST(MIPS13) { 1066 TEST(MIPS13) {
1067 // Test Cvt_d_uw and Trunc_uw_d macros. 1067 // Test Cvt_d_uw and Trunc_uw_d macros.
1068 CcTest::InitializeVM(); 1068 CcTest::InitializeVM();
1069 Isolate* isolate = Isolate::Current(); 1069 Isolate* isolate = CcTest::i_isolate();
1070 HandleScope scope(isolate); 1070 HandleScope scope(isolate);
1071 1071
1072 typedef struct { 1072 typedef struct {
1073 double cvt_big_out; 1073 double cvt_big_out;
1074 double cvt_small_out; 1074 double cvt_small_out;
1075 uint32_t trunc_big_out; 1075 uint32_t trunc_big_out;
1076 uint32_t trunc_small_out; 1076 uint32_t trunc_small_out;
1077 uint32_t cvt_big_in; 1077 uint32_t cvt_big_in;
1078 uint32_t cvt_small_in; 1078 uint32_t cvt_small_in;
1079 } T; 1079 } T;
(...skipping 13 matching lines...) Expand all
1093 __ sdc1(f8, MemOperand(a0, OFFSET_OF(T, cvt_big_out))); 1093 __ sdc1(f8, MemOperand(a0, OFFSET_OF(T, cvt_big_out)));
1094 1094
1095 __ Trunc_uw_d(f8, f8, f22); 1095 __ Trunc_uw_d(f8, f8, f22);
1096 __ swc1(f8, MemOperand(a0, OFFSET_OF(T, trunc_big_out))); 1096 __ swc1(f8, MemOperand(a0, OFFSET_OF(T, trunc_big_out)));
1097 1097
1098 __ jr(ra); 1098 __ jr(ra);
1099 __ nop(); 1099 __ nop();
1100 1100
1101 CodeDesc desc; 1101 CodeDesc desc;
1102 assm.GetCode(&desc); 1102 assm.GetCode(&desc);
1103 Object* code = HEAP->CreateCode( 1103 Object* code = CcTest::heap()->CreateCode(
1104 desc, 1104 desc,
1105 Code::ComputeFlags(Code::STUB), 1105 Code::ComputeFlags(Code::STUB),
1106 Handle<Code>())->ToObjectChecked(); 1106 Handle<Code>())->ToObjectChecked();
1107 CHECK(code->IsCode()); 1107 CHECK(code->IsCode());
1108 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 1108 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
1109 1109
1110 t.cvt_big_in = 0xFFFFFFFF; 1110 t.cvt_big_in = 0xFFFFFFFF;
1111 t.cvt_small_in = 333; 1111 t.cvt_small_in = 333;
1112 1112
1113 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 1113 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
1114 USE(dummy); 1114 USE(dummy);
1115 1115
1116 CHECK_EQ(t.cvt_big_out, static_cast<double>(t.cvt_big_in)); 1116 CHECK_EQ(t.cvt_big_out, static_cast<double>(t.cvt_big_in));
1117 CHECK_EQ(t.cvt_small_out, static_cast<double>(t.cvt_small_in)); 1117 CHECK_EQ(t.cvt_small_out, static_cast<double>(t.cvt_small_in));
1118 1118
1119 CHECK_EQ(static_cast<int>(t.trunc_big_out), static_cast<int>(t.cvt_big_in)); 1119 CHECK_EQ(static_cast<int>(t.trunc_big_out), static_cast<int>(t.cvt_big_in));
1120 CHECK_EQ(static_cast<int>(t.trunc_small_out), 1120 CHECK_EQ(static_cast<int>(t.trunc_small_out),
1121 static_cast<int>(t.cvt_small_in)); 1121 static_cast<int>(t.cvt_small_in));
1122 } 1122 }
1123 1123
1124 1124
1125 TEST(MIPS14) { 1125 TEST(MIPS14) {
1126 // Test round, floor, ceil, trunc, cvt. 1126 // Test round, floor, ceil, trunc, cvt.
1127 CcTest::InitializeVM(); 1127 CcTest::InitializeVM();
1128 Isolate* isolate = Isolate::Current(); 1128 Isolate* isolate = CcTest::i_isolate();
1129 HandleScope scope(isolate); 1129 HandleScope scope(isolate);
1130 1130
1131 #define ROUND_STRUCT_ELEMENT(x) \ 1131 #define ROUND_STRUCT_ELEMENT(x) \
1132 int32_t x##_up_out; \ 1132 int32_t x##_up_out; \
1133 int32_t x##_down_out; \ 1133 int32_t x##_down_out; \
1134 int32_t neg_##x##_up_out; \ 1134 int32_t neg_##x##_up_out; \
1135 int32_t neg_##x##_down_out; \ 1135 int32_t neg_##x##_down_out; \
1136 uint32_t x##_err1_out; \ 1136 uint32_t x##_err1_out; \
1137 uint32_t x##_err2_out; \ 1137 uint32_t x##_err2_out; \
1138 uint32_t x##_err3_out; \ 1138 uint32_t x##_err3_out; \
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 RUN_ROUND_TEST(cvt) 1214 RUN_ROUND_TEST(cvt)
1215 1215
1216 // Restore FCSR. 1216 // Restore FCSR.
1217 __ ctc1(a1, FCSR); 1217 __ ctc1(a1, FCSR);
1218 1218
1219 __ jr(ra); 1219 __ jr(ra);
1220 __ nop(); 1220 __ nop();
1221 1221
1222 CodeDesc desc; 1222 CodeDesc desc;
1223 assm.GetCode(&desc); 1223 assm.GetCode(&desc);
1224 Object* code = HEAP->CreateCode( 1224 Object* code = CcTest::heap()->CreateCode(
1225 desc, 1225 desc,
1226 Code::ComputeFlags(Code::STUB), 1226 Code::ComputeFlags(Code::STUB),
1227 Handle<Code>())->ToObjectChecked(); 1227 Handle<Code>())->ToObjectChecked();
1228 CHECK(code->IsCode()); 1228 CHECK(code->IsCode());
1229 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); 1229 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
1230 1230
1231 t.round_up_in = 123.51; 1231 t.round_up_in = 123.51;
1232 t.round_down_in = 123.49; 1232 t.round_down_in = 123.49;
1233 t.neg_round_up_in = -123.5; 1233 t.neg_round_up_in = -123.5;
1234 t.neg_round_down_in = -123.49; 1234 t.neg_round_down_in = -123.49;
(...skipping 16 matching lines...) Expand all
1251 CHECK_ROUND_RESULT(round); 1251 CHECK_ROUND_RESULT(round);
1252 CHECK_ROUND_RESULT(floor); 1252 CHECK_ROUND_RESULT(floor);
1253 CHECK_ROUND_RESULT(ceil); 1253 CHECK_ROUND_RESULT(ceil);
1254 CHECK_ROUND_RESULT(cvt); 1254 CHECK_ROUND_RESULT(cvt);
1255 } 1255 }
1256 1256
1257 1257
1258 TEST(MIPS15) { 1258 TEST(MIPS15) {
1259 // Test chaining of label usages within instructions (issue 1644). 1259 // Test chaining of label usages within instructions (issue 1644).
1260 CcTest::InitializeVM(); 1260 CcTest::InitializeVM();
1261 Isolate* isolate = Isolate::Current(); 1261 Isolate* isolate = CcTest::i_isolate();
1262 HandleScope scope(isolate); 1262 HandleScope scope(isolate);
1263 Assembler assm(isolate, NULL, 0); 1263 Assembler assm(isolate, NULL, 0);
1264 1264
1265 Label target; 1265 Label target;
1266 __ beq(v0, v1, &target); 1266 __ beq(v0, v1, &target);
1267 __ nop(); 1267 __ nop();
1268 __ bne(v0, v1, &target); 1268 __ bne(v0, v1, &target);
1269 __ nop(); 1269 __ nop();
1270 __ bind(&target); 1270 __ bind(&target);
1271 __ nop(); 1271 __ nop();
1272 } 1272 }
1273 1273
1274 #undef __ 1274 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698