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

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

Issue 24169005: remove HEAP from tests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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-api.cc ('k') | test/cctest/test-compiler.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
(...skipping 18 matching lines...) Expand all
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
(...skipping 120 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
(...skipping 52 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
(...skipping 56 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;
(...skipping 78 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);
(...skipping 27 matching lines...) Expand all
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.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
(...skipping 112 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 84 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;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
(...skipping 100 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 30 matching lines...) Expand all
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-api.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698