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

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

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 years, 6 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
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | test/cctest/test-assembler-mips64.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 HandleScope scope(isolate); 56 HandleScope scope(isolate);
57 57
58 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 58 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
59 59
60 // Addition. 60 // Addition.
61 __ addu(v0, a0, a1); 61 __ addu(v0, a0, a1);
62 __ jr(ra); 62 __ jr(ra);
63 __ nop(); 63 __ nop();
64 64
65 CodeDesc desc; 65 CodeDesc desc;
66 assm.GetCode(&desc); 66 assm.GetCode(isolate, &desc);
67 Handle<Code> code = isolate->factory()->NewCode( 67 Handle<Code> code = isolate->factory()->NewCode(
68 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 68 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
69 F2 f = FUNCTION_CAST<F2>(code->entry()); 69 F2 f = FUNCTION_CAST<F2>(code->entry());
70 int res = reinterpret_cast<int>( 70 int res = reinterpret_cast<int>(
71 CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0)); 71 CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
72 CHECK_EQ(static_cast<int32_t>(0xabc), res); 72 CHECK_EQ(static_cast<int32_t>(0xabc), res);
73 } 73 }
74 74
75 75
76 TEST(MIPS1) { 76 TEST(MIPS1) {
(...skipping 15 matching lines...) Expand all
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(isolate, &desc);
103 Handle<Code> code = isolate->factory()->NewCode( 103 Handle<Code> code = isolate->factory()->NewCode(
104 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 104 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
105 F1 f = FUNCTION_CAST<F1>(code->entry()); 105 F1 f = FUNCTION_CAST<F1>(code->entry());
106 int res = reinterpret_cast<int>( 106 int res = reinterpret_cast<int>(
107 CALL_GENERATED_CODE(isolate, f, 50, 0, 0, 0, 0)); 107 CALL_GENERATED_CODE(isolate, f, 50, 0, 0, 0, 0));
108 CHECK_EQ(1275, res); 108 CHECK_EQ(1275, res);
109 } 109 }
110 110
111 111
112 TEST(MIPS2) { 112 TEST(MIPS2) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 __ bind(&error); 231 __ bind(&error);
232 // Got an error. Return a wrong result. 232 // Got an error. Return a wrong result.
233 __ li(v0, 666); 233 __ li(v0, 666);
234 234
235 __ bind(&exit); 235 __ bind(&exit);
236 __ jr(ra); 236 __ jr(ra);
237 __ nop(); 237 __ nop();
238 238
239 CodeDesc desc; 239 CodeDesc desc;
240 assm.GetCode(&desc); 240 assm.GetCode(isolate, &desc);
241 Handle<Code> code = isolate->factory()->NewCode( 241 Handle<Code> code = isolate->factory()->NewCode(
242 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 242 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
243 F2 f = FUNCTION_CAST<F2>(code->entry()); 243 F2 f = FUNCTION_CAST<F2>(code->entry());
244 int res = reinterpret_cast<int>( 244 int res = reinterpret_cast<int>(
245 CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0)); 245 CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
246 CHECK_EQ(static_cast<int32_t>(0x31415926), res); 246 CHECK_EQ(static_cast<int32_t>(0x31415926), res);
247 } 247 }
248 248
249 249
250 TEST(MIPS3) { 250 TEST(MIPS3) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 __ div_s(f12, f10, f4); 332 __ div_s(f12, f10, f4);
333 __ swc1(f12, MemOperand(a0, offsetof(T, ff)) ); // ff = fe / fa 333 __ swc1(f12, MemOperand(a0, offsetof(T, ff)) ); // ff = fe / fa
334 334
335 __ sqrt_s(f14, f12); 335 __ sqrt_s(f14, f12);
336 __ swc1(f14, MemOperand(a0, offsetof(T, fg)) ); 336 __ swc1(f14, MemOperand(a0, offsetof(T, fg)) );
337 337
338 __ jr(ra); 338 __ jr(ra);
339 __ nop(); 339 __ nop();
340 340
341 CodeDesc desc; 341 CodeDesc desc;
342 assm.GetCode(&desc); 342 assm.GetCode(isolate, &desc);
343 Handle<Code> code = isolate->factory()->NewCode( 343 Handle<Code> code = isolate->factory()->NewCode(
344 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 344 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
345 F3 f = FUNCTION_CAST<F3>(code->entry()); 345 F3 f = FUNCTION_CAST<F3>(code->entry());
346 // Double test values. 346 // Double test values.
347 t.a = 1.5e14; 347 t.a = 1.5e14;
348 t.b = 2.75e11; 348 t.b = 2.75e11;
349 t.c = 0.0; 349 t.c = 0.0;
350 t.d = 0.0; 350 t.d = 0.0;
351 t.e = 0.0; 351 t.e = 0.0;
352 t.f = 0.0; 352 t.f = 0.0;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } 436 }
437 437
438 // Store the swapped f4 and f5 back to memory. 438 // Store the swapped f4 and f5 back to memory.
439 __ Sdc1(f4, MemOperand(a0, offsetof(T, a))); 439 __ Sdc1(f4, MemOperand(a0, offsetof(T, a)));
440 __ Sdc1(f6, MemOperand(a0, offsetof(T, c))); 440 __ Sdc1(f6, MemOperand(a0, offsetof(T, c)));
441 441
442 __ jr(ra); 442 __ jr(ra);
443 __ nop(); 443 __ nop();
444 444
445 CodeDesc desc; 445 CodeDesc desc;
446 assm.GetCode(&desc); 446 assm.GetCode(isolate, &desc);
447 Handle<Code> code = isolate->factory()->NewCode( 447 Handle<Code> code = isolate->factory()->NewCode(
448 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 448 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
449 F3 f = FUNCTION_CAST<F3>(code->entry()); 449 F3 f = FUNCTION_CAST<F3>(code->entry());
450 t.a = 1.5e22; 450 t.a = 1.5e22;
451 t.b = 2.75e11; 451 t.b = 2.75e11;
452 t.c = 17.17; 452 t.c = 17.17;
453 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 453 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
454 USE(dummy); 454 USE(dummy);
455 455
456 CHECK_EQ(2.75e11, t.a); 456 CHECK_EQ(2.75e11, t.a);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 499
500 // Convert int in original j (t1) to double in b. 500 // Convert int in original j (t1) to double in b.
501 __ mtc1(t1, f14); 501 __ mtc1(t1, f14);
502 __ cvt_d_w(f2, f14); 502 __ cvt_d_w(f2, f14);
503 __ Sdc1(f2, MemOperand(a0, offsetof(T, b))); 503 __ Sdc1(f2, MemOperand(a0, offsetof(T, b)));
504 504
505 __ jr(ra); 505 __ jr(ra);
506 __ nop(); 506 __ nop();
507 507
508 CodeDesc desc; 508 CodeDesc desc;
509 assm.GetCode(&desc); 509 assm.GetCode(isolate, &desc);
510 Handle<Code> code = isolate->factory()->NewCode( 510 Handle<Code> code = isolate->factory()->NewCode(
511 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 511 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
512 F3 f = FUNCTION_CAST<F3>(code->entry()); 512 F3 f = FUNCTION_CAST<F3>(code->entry());
513 t.a = 1.5e4; 513 t.a = 1.5e4;
514 t.b = 2.75e8; 514 t.b = 2.75e8;
515 t.i = 12345678; 515 t.i = 12345678;
516 t.j = -100000; 516 t.j = -100000;
517 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 517 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
518 USE(dummy); 518 USE(dummy);
519 519
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 __ lui(t5, 0x3333); 569 __ lui(t5, 0x3333);
570 __ ori(t5, t5, 0x3333); 570 __ ori(t5, t5, 0x3333);
571 __ sw(t5, MemOperand(a0, offsetof(T, r6)) ); 571 __ sw(t5, MemOperand(a0, offsetof(T, r6)) );
572 __ lhu(t5, MemOperand(a0, offsetof(T, si)) ); 572 __ lhu(t5, MemOperand(a0, offsetof(T, si)) );
573 __ sh(t5, MemOperand(a0, offsetof(T, r6)) ); 573 __ sh(t5, MemOperand(a0, offsetof(T, r6)) );
574 574
575 __ jr(ra); 575 __ jr(ra);
576 __ nop(); 576 __ nop();
577 577
578 CodeDesc desc; 578 CodeDesc desc;
579 assm.GetCode(&desc); 579 assm.GetCode(isolate, &desc);
580 Handle<Code> code = isolate->factory()->NewCode( 580 Handle<Code> code = isolate->factory()->NewCode(
581 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 581 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
582 F3 f = FUNCTION_CAST<F3>(code->entry()); 582 F3 f = FUNCTION_CAST<F3>(code->entry());
583 t.ui = 0x11223344; 583 t.ui = 0x11223344;
584 t.si = 0x99aabbcc; 584 t.si = 0x99aabbcc;
585 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 585 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
586 USE(dummy); 586 USE(dummy);
587 587
588 CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1); 588 CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1);
589 #if __BYTE_ORDER == __LITTLE_ENDIAN 589 #if __BYTE_ORDER == __LITTLE_ENDIAN
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 662
663 663
664 // This test-case should have additional tests. 664 // This test-case should have additional tests.
665 665
666 __ bind(&outa_here); 666 __ bind(&outa_here);
667 667
668 __ jr(ra); 668 __ jr(ra);
669 __ nop(); 669 __ nop();
670 670
671 CodeDesc desc; 671 CodeDesc desc;
672 assm.GetCode(&desc); 672 assm.GetCode(isolate, &desc);
673 Handle<Code> code = isolate->factory()->NewCode( 673 Handle<Code> code = isolate->factory()->NewCode(
674 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 674 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
675 F3 f = FUNCTION_CAST<F3>(code->entry()); 675 F3 f = FUNCTION_CAST<F3>(code->entry());
676 t.a = 1.5e14; 676 t.a = 1.5e14;
677 t.b = 2.75e11; 677 t.b = 2.75e11;
678 t.c = 2.0; 678 t.c = 2.0;
679 t.d = -4.0; 679 t.d = -4.0;
680 t.e = 0.0; 680 t.e = 0.0;
681 t.f = 0.0; 681 t.f = 0.0;
682 t.result = 0; 682 t.result = 0;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 __ sw(t3, MemOperand(a0, offsetof(T, result_rotrv_12)) ); 760 __ sw(t3, MemOperand(a0, offsetof(T, result_rotrv_12)) );
761 __ sw(t4, MemOperand(a0, offsetof(T, result_rotrv_16)) ); 761 __ sw(t4, MemOperand(a0, offsetof(T, result_rotrv_16)) );
762 __ sw(t5, MemOperand(a0, offsetof(T, result_rotrv_20)) ); 762 __ sw(t5, MemOperand(a0, offsetof(T, result_rotrv_20)) );
763 __ sw(t6, MemOperand(a0, offsetof(T, result_rotrv_24)) ); 763 __ sw(t6, MemOperand(a0, offsetof(T, result_rotrv_24)) );
764 __ sw(t7, MemOperand(a0, offsetof(T, result_rotrv_28)) ); 764 __ sw(t7, MemOperand(a0, offsetof(T, result_rotrv_28)) );
765 765
766 __ jr(ra); 766 __ jr(ra);
767 __ nop(); 767 __ nop();
768 768
769 CodeDesc desc; 769 CodeDesc desc;
770 assm.GetCode(&desc); 770 assm.GetCode(isolate, &desc);
771 Handle<Code> code = isolate->factory()->NewCode( 771 Handle<Code> code = isolate->factory()->NewCode(
772 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 772 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
773 F3 f = FUNCTION_CAST<F3>(code->entry()); 773 F3 f = FUNCTION_CAST<F3>(code->entry());
774 t.input = 0x12345678; 774 t.input = 0x12345678;
775 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0x0, 0, 0, 0); 775 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0x0, 0, 0, 0);
776 USE(dummy); 776 USE(dummy);
777 CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4); 777 CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4);
778 CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8); 778 CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8);
779 CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotr_12); 779 CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotr_12);
780 CHECK_EQ(static_cast<int32_t>(0x56781234), t.result_rotr_16); 780 CHECK_EQ(static_cast<int32_t>(0x56781234), t.result_rotr_16);
(...skipping 25 matching lines...) Expand all
806 __ Branch(&exit2, ge, a0, Operand(0x00001FFF)); 806 __ Branch(&exit2, ge, a0, Operand(0x00001FFF));
807 __ Branch(&exit3, ge, a0, Operand(0x0001FFFF)); 807 __ Branch(&exit3, ge, a0, Operand(0x0001FFFF));
808 808
809 __ bind(&exit); 809 __ bind(&exit);
810 __ bind(&exit2); 810 __ bind(&exit2);
811 __ bind(&exit3); 811 __ bind(&exit3);
812 __ jr(ra); 812 __ jr(ra);
813 __ nop(); 813 __ nop();
814 814
815 CodeDesc desc; 815 CodeDesc desc;
816 assm.GetCode(&desc); 816 assm.GetCode(isolate, &desc);
817 isolate->factory()->NewCode( 817 isolate->factory()->NewCode(
818 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 818 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
819 } 819 }
820 820
821 821
822 TEST(MIPS10) { 822 TEST(MIPS10) {
823 // Test conversions between doubles and words. 823 // Test conversions between doubles and words.
824 CcTest::InitializeVM(); 824 CcTest::InitializeVM();
825 Isolate* isolate = CcTest::i_isolate(); 825 Isolate* isolate = CcTest::i_isolate();
826 HandleScope scope(isolate); 826 HandleScope scope(isolate);
(...skipping 30 matching lines...) Expand all
857 // Convert the b word to double b. 857 // Convert the b word to double b.
858 __ lw(t0, MemOperand(a0, offsetof(T, b_word))); 858 __ lw(t0, MemOperand(a0, offsetof(T, b_word)));
859 __ mtc1(t0, f8); // f8 has a 32-bits word. 859 __ mtc1(t0, f8); // f8 has a 32-bits word.
860 __ cvt_d_w(f10, f8); 860 __ cvt_d_w(f10, f8);
861 __ Sdc1(f10, MemOperand(a0, offsetof(T, b))); 861 __ Sdc1(f10, MemOperand(a0, offsetof(T, b)));
862 862
863 __ jr(ra); 863 __ jr(ra);
864 __ nop(); 864 __ nop();
865 865
866 CodeDesc desc; 866 CodeDesc desc;
867 assm.GetCode(&desc); 867 assm.GetCode(isolate, &desc);
868 Handle<Code> code = isolate->factory()->NewCode( 868 Handle<Code> code = isolate->factory()->NewCode(
869 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 869 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
870 F3 f = FUNCTION_CAST<F3>(code->entry()); 870 F3 f = FUNCTION_CAST<F3>(code->entry());
871 t.a = 2.147483646e+09; // 0x7FFFFFFE -> 0xFF80000041DFFFFF as double. 871 t.a = 2.147483646e+09; // 0x7FFFFFFE -> 0xFF80000041DFFFFF as double.
872 t.b_word = 0x0ff00ff0; // 0x0FF00FF0 -> 0x as double. 872 t.b_word = 0x0ff00ff0; // 0x0FF00FF0 -> 0x as double.
873 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 873 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
874 USE(dummy); 874 USE(dummy);
875 CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp); 875 CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp);
876 CHECK_EQ(static_cast<int32_t>(0xFF800000), t.dbl_mant); 876 CHECK_EQ(static_cast<int32_t>(0xFF800000), t.dbl_mant);
877 CHECK_EQ(static_cast<int32_t>(0x7FFFFFFE), t.word); 877 CHECK_EQ(static_cast<int32_t>(0x7FFFFFFE), t.word);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 985
986 __ lw(t3, MemOperand(a0, offsetof(T, mem_init)) ); 986 __ lw(t3, MemOperand(a0, offsetof(T, mem_init)) );
987 __ sw(t3, MemOperand(a0, offsetof(T, swr_3)) ); 987 __ sw(t3, MemOperand(a0, offsetof(T, swr_3)) );
988 __ lw(t3, MemOperand(a0, offsetof(T, reg_init)) ); 988 __ lw(t3, MemOperand(a0, offsetof(T, reg_init)) );
989 __ swr(t3, MemOperand(a0, offsetof(T, swr_3) + 3) ); 989 __ swr(t3, MemOperand(a0, offsetof(T, swr_3) + 3) );
990 990
991 __ jr(ra); 991 __ jr(ra);
992 __ nop(); 992 __ nop();
993 993
994 CodeDesc desc; 994 CodeDesc desc;
995 assm.GetCode(&desc); 995 assm.GetCode(isolate, &desc);
996 Handle<Code> code = isolate->factory()->NewCode( 996 Handle<Code> code = isolate->factory()->NewCode(
997 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 997 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
998 F3 f = FUNCTION_CAST<F3>(code->entry()); 998 F3 f = FUNCTION_CAST<F3>(code->entry());
999 t.reg_init = 0xaabbccdd; 999 t.reg_init = 0xaabbccdd;
1000 t.mem_init = 0x11223344; 1000 t.mem_init = 0x11223344;
1001 1001
1002 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 1002 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
1003 USE(dummy); 1003 USE(dummy);
1004 1004
1005 #if __BYTE_ORDER == __LITTLE_ENDIAN 1005 #if __BYTE_ORDER == __LITTLE_ENDIAN
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 __ push(t1); 1111 __ push(t1);
1112 __ lw(t2, MemOperand(fp, offsetof(T, y)) ); 1112 __ lw(t2, MemOperand(fp, offsetof(T, y)) );
1113 __ pop(t3); 1113 __ pop(t3);
1114 __ nop(); 1114 __ nop();
1115 1115
1116 __ mov(fp, t6); 1116 __ mov(fp, t6);
1117 __ jr(ra); 1117 __ jr(ra);
1118 __ nop(); 1118 __ nop();
1119 1119
1120 CodeDesc desc; 1120 CodeDesc desc;
1121 assm.GetCode(&desc); 1121 assm.GetCode(isolate, &desc);
1122 Handle<Code> code = isolate->factory()->NewCode( 1122 Handle<Code> code = isolate->factory()->NewCode(
1123 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1123 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1124 F3 f = FUNCTION_CAST<F3>(code->entry()); 1124 F3 f = FUNCTION_CAST<F3>(code->entry());
1125 t.x = 1; 1125 t.x = 1;
1126 t.y = 2; 1126 t.y = 2;
1127 t.y1 = 3; 1127 t.y1 = 3;
1128 t.y2 = 4; 1128 t.y2 = 4;
1129 t.y3 = 0XBABA; 1129 t.y3 = 0XBABA;
1130 t.y4 = 0xDEDA; 1130 t.y4 = 0xDEDA;
1131 1131
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 __ Cvt_d_uw(f8, t0, f4); 1165 __ Cvt_d_uw(f8, t0, f4);
1166 __ Sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out))); 1166 __ Sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out)));
1167 1167
1168 __ Trunc_uw_d(f8, f8, f4); 1168 __ Trunc_uw_d(f8, f8, f4);
1169 __ swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out))); 1169 __ swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out)));
1170 1170
1171 __ jr(ra); 1171 __ jr(ra);
1172 __ nop(); 1172 __ nop();
1173 1173
1174 CodeDesc desc; 1174 CodeDesc desc;
1175 assm.GetCode(&desc); 1175 assm.GetCode(isolate, &desc);
1176 Handle<Code> code = isolate->factory()->NewCode( 1176 Handle<Code> code = isolate->factory()->NewCode(
1177 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1177 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1178 F3 f = FUNCTION_CAST<F3>(code->entry()); 1178 F3 f = FUNCTION_CAST<F3>(code->entry());
1179 1179
1180 t.cvt_big_in = 0xFFFFFFFF; 1180 t.cvt_big_in = 0xFFFFFFFF;
1181 t.cvt_small_in = 333; 1181 t.cvt_small_in = 333;
1182 1182
1183 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 1183 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
1184 USE(dummy); 1184 USE(dummy);
1185 1185
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 RUN_ROUND_TEST(trunc) 1286 RUN_ROUND_TEST(trunc)
1287 RUN_ROUND_TEST(cvt) 1287 RUN_ROUND_TEST(cvt)
1288 1288
1289 // Restore FCSR. 1289 // Restore FCSR.
1290 __ ctc1(a1, FCSR); 1290 __ ctc1(a1, FCSR);
1291 1291
1292 __ jr(ra); 1292 __ jr(ra);
1293 __ nop(); 1293 __ nop();
1294 1294
1295 CodeDesc desc; 1295 CodeDesc desc;
1296 assm.GetCode(&desc); 1296 assm.GetCode(isolate, &desc);
1297 Handle<Code> code = isolate->factory()->NewCode( 1297 Handle<Code> code = isolate->factory()->NewCode(
1298 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1298 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1299 F3 f = FUNCTION_CAST<F3>(code->entry()); 1299 F3 f = FUNCTION_CAST<F3>(code->entry());
1300 1300
1301 t.round_up_in = 123.51; 1301 t.round_up_in = 123.51;
1302 t.round_down_in = 123.49; 1302 t.round_down_in = 123.49;
1303 t.neg_round_up_in = -123.5; 1303 t.neg_round_up_in = -123.5;
1304 t.neg_round_down_in = -123.49; 1304 t.neg_round_down_in = -123.49;
1305 t.err1_in = 123.51; 1305 t.err1_in = 123.51;
1306 t.err2_in = 1; 1306 t.err2_in = 1;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 __ selnez_d(f6, f0, f2); 1392 __ selnez_d(f6, f0, f2);
1393 __ seleqz_s(f12, f8, f10); 1393 __ seleqz_s(f12, f8, f10);
1394 __ selnez_s(f14, f8, f10); 1394 __ selnez_s(f14, f8, f10);
1395 __ Sdc1(f4, MemOperand(a0, offsetof(Test, g))); // src 1395 __ Sdc1(f4, MemOperand(a0, offsetof(Test, g))); // src
1396 __ Sdc1(f6, MemOperand(a0, offsetof(Test, h))); // src 1396 __ Sdc1(f6, MemOperand(a0, offsetof(Test, h))); // src
1397 __ swc1(f12, MemOperand(a0, offsetof(Test, k)) ); // src 1397 __ swc1(f12, MemOperand(a0, offsetof(Test, k)) ); // src
1398 __ swc1(f14, MemOperand(a0, offsetof(Test, l)) ); // src 1398 __ swc1(f14, MemOperand(a0, offsetof(Test, l)) ); // src
1399 __ jr(ra); 1399 __ jr(ra);
1400 __ nop(); 1400 __ nop();
1401 CodeDesc desc; 1401 CodeDesc desc;
1402 assm.GetCode(&desc); 1402 assm.GetCode(isolate, &desc);
1403 Handle<Code> code = isolate->factory()->NewCode( 1403 Handle<Code> code = isolate->factory()->NewCode(
1404 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1404 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1405 F3 f = FUNCTION_CAST<F3>(code->entry()); 1405 F3 f = FUNCTION_CAST<F3>(code->entry());
1406 1406
1407 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 1407 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
1408 1408
1409 CHECK_EQ(1, test.a); 1409 CHECK_EQ(1, test.a);
1410 CHECK_EQ(0, test.b); 1410 CHECK_EQ(0, test.b);
1411 CHECK_EQ(0, test.c); 1411 CHECK_EQ(0, test.c);
1412 CHECK_EQ(1, test.d); 1412 CHECK_EQ(1, test.d);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 __ min_s(f14, f2, f6); 1507 __ min_s(f14, f2, f6);
1508 __ max_s(f16, f2, f6); 1508 __ max_s(f16, f2, f6);
1509 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, c))); 1509 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, c)));
1510 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, d))); 1510 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, d)));
1511 __ swc1(f14, MemOperand(a0, offsetof(TestFloat, g))); 1511 __ swc1(f14, MemOperand(a0, offsetof(TestFloat, g)));
1512 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, h))); 1512 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, h)));
1513 __ jr(ra); 1513 __ jr(ra);
1514 __ nop(); 1514 __ nop();
1515 1515
1516 CodeDesc desc; 1516 CodeDesc desc;
1517 assm.GetCode(&desc); 1517 assm.GetCode(isolate, &desc);
1518 Handle<Code> code = isolate->factory()->NewCode( 1518 Handle<Code> code = isolate->factory()->NewCode(
1519 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1519 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1520 F3 f = FUNCTION_CAST<F3>(code->entry()); 1520 F3 f = FUNCTION_CAST<F3>(code->entry());
1521 for (int i = 0; i < kTableLength; i++) { 1521 for (int i = 0; i < kTableLength; i++) {
1522 test.a = inputsa[i]; 1522 test.a = inputsa[i];
1523 test.b = inputsb[i]; 1523 test.b = inputsb[i];
1524 test.e = inputse[i]; 1524 test.e = inputse[i];
1525 test.f = inputsf[i]; 1525 test.f = inputsf[i];
1526 1526
1527 CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0); 1527 CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 __ lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)) ); 1618 __ lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)) );
1619 __ cfc1(t1, FCSR); 1619 __ cfc1(t1, FCSR);
1620 __ ctc1(t0, FCSR); 1620 __ ctc1(t0, FCSR);
1621 __ rint_d(f8, f4); 1621 __ rint_d(f8, f4);
1622 __ Sdc1(f8, MemOperand(a0, offsetof(TestFloat, b))); 1622 __ Sdc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
1623 __ ctc1(t1, FCSR); 1623 __ ctc1(t1, FCSR);
1624 __ jr(ra); 1624 __ jr(ra);
1625 __ nop(); 1625 __ nop();
1626 1626
1627 CodeDesc desc; 1627 CodeDesc desc;
1628 assm.GetCode(&desc); 1628 assm.GetCode(isolate, &desc);
1629 Handle<Code> code = isolate->factory()->NewCode( 1629 Handle<Code> code = isolate->factory()->NewCode(
1630 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1630 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1631 F3 f = FUNCTION_CAST<F3>(code->entry()); 1631 F3 f = FUNCTION_CAST<F3>(code->entry());
1632 1632
1633 for (int j = 0; j < 4; j++) { 1633 for (int j = 0; j < 4; j++) {
1634 test.fcsr = fcsr_inputs[j]; 1634 test.fcsr = fcsr_inputs[j];
1635 for (int i = 0; i < kTableLength; i++) { 1635 for (int i = 0; i < kTableLength; i++) {
1636 test.a = inputs[i]; 1636 test.a = inputs[i];
1637 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 1637 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
1638 CHECK_EQ(test.b, outputs[j][i]); 1638 CHECK_EQ(test.b, outputs[j][i]);
(...skipping 27 matching lines...) Expand all
1666 __ lwc1(f6, MemOperand(a0, offsetof(Test, fd)) ); // test 1666 __ lwc1(f6, MemOperand(a0, offsetof(Test, fd)) ); // test
1667 __ lwc1(f8, MemOperand(a0, offsetof(Test, fs)) ); // src1 1667 __ lwc1(f8, MemOperand(a0, offsetof(Test, fs)) ); // src1
1668 __ lwc1(f10, MemOperand(a0, offsetof(Test, ft)) ); // src2 1668 __ lwc1(f10, MemOperand(a0, offsetof(Test, ft)) ); // src2
1669 __ sel_d(f0, f2, f4); 1669 __ sel_d(f0, f2, f4);
1670 __ sel_s(f6, f8, f10); 1670 __ sel_s(f6, f8, f10);
1671 __ Sdc1(f0, MemOperand(a0, offsetof(Test, dd))); 1671 __ Sdc1(f0, MemOperand(a0, offsetof(Test, dd)));
1672 __ swc1(f6, MemOperand(a0, offsetof(Test, fd)) ); 1672 __ swc1(f6, MemOperand(a0, offsetof(Test, fd)) );
1673 __ jr(ra); 1673 __ jr(ra);
1674 __ nop(); 1674 __ nop();
1675 CodeDesc desc; 1675 CodeDesc desc;
1676 assm.GetCode(&desc); 1676 assm.GetCode(isolate, &desc);
1677 Handle<Code> code = isolate->factory()->NewCode( 1677 Handle<Code> code = isolate->factory()->NewCode(
1678 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1678 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1679 F3 f = FUNCTION_CAST<F3>(code->entry()); 1679 F3 f = FUNCTION_CAST<F3>(code->entry());
1680 1680
1681 const int test_size = 3; 1681 const int test_size = 3;
1682 const int input_size = 5; 1682 const int input_size = 5;
1683 1683
1684 double inputs_dt[input_size] = {0.0, 65.2, -70.32, 1684 double inputs_dt[input_size] = {0.0, 65.2, -70.32,
1685 18446744073709551621.0, -18446744073709551621.0}; 1685 18446744073709551621.0, -18446744073709551621.0};
1686 double inputs_ds[input_size] = {0.1, 69.88, -91.325, 1686 double inputs_ds[input_size] = {0.1, 69.88, -91.325,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 __ lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)) ); 1799 __ lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)) );
1800 __ cfc1(t1, FCSR); 1800 __ cfc1(t1, FCSR);
1801 __ ctc1(t0, FCSR); 1801 __ ctc1(t0, FCSR);
1802 __ rint_s(f8, f4); 1802 __ rint_s(f8, f4);
1803 __ swc1(f8, MemOperand(a0, offsetof(TestFloat, b)) ); 1803 __ swc1(f8, MemOperand(a0, offsetof(TestFloat, b)) );
1804 __ ctc1(t1, FCSR); 1804 __ ctc1(t1, FCSR);
1805 __ jr(ra); 1805 __ jr(ra);
1806 __ nop(); 1806 __ nop();
1807 1807
1808 CodeDesc desc; 1808 CodeDesc desc;
1809 assm.GetCode(&desc); 1809 assm.GetCode(isolate, &desc);
1810 Handle<Code> code = isolate->factory()->NewCode( 1810 Handle<Code> code = isolate->factory()->NewCode(
1811 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1811 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1812 F3 f = FUNCTION_CAST<F3>(code->entry()); 1812 F3 f = FUNCTION_CAST<F3>(code->entry());
1813 1813
1814 for (int j = 0; j < 4; j++) { 1814 for (int j = 0; j < 4; j++) {
1815 test.fcsr = fcsr_inputs[j]; 1815 test.fcsr = fcsr_inputs[j];
1816 for (int i = 0; i < kTableLength; i++) { 1816 for (int i = 0; i < kTableLength; i++) {
1817 test.a = inputs[i]; 1817 test.a = inputs[i];
1818 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 1818 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
1819 CHECK_EQ(test.b, outputs[j][i]); 1819 CHECK_EQ(test.b, outputs[j][i]);
(...skipping 28 matching lines...) Expand all
1848 1848
1849 TestStruct test; 1849 TestStruct test;
1850 1850
1851 __ lw(t1, MemOperand(a0, offsetof(TestStruct, input))); 1851 __ lw(t1, MemOperand(a0, offsetof(TestStruct, input)));
1852 __ Cvt_d_uw(f4, t1, f6); 1852 __ Cvt_d_uw(f4, t1, f6);
1853 __ Sdc1(f4, MemOperand(a0, offsetof(TestStruct, output))); 1853 __ Sdc1(f4, MemOperand(a0, offsetof(TestStruct, output)));
1854 __ jr(ra); 1854 __ jr(ra);
1855 __ nop(); 1855 __ nop();
1856 1856
1857 CodeDesc desc; 1857 CodeDesc desc;
1858 assm.GetCode(&desc); 1858 assm.GetCode(isolate, &desc);
1859 Handle<Code> code = isolate->factory()->NewCode( 1859 Handle<Code> code = isolate->factory()->NewCode(
1860 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1860 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1861 F3 f = FUNCTION_CAST<F3>(code->entry()); 1861 F3 f = FUNCTION_CAST<F3>(code->entry());
1862 for (int i = 0; i < kTableLength; i++) { 1862 for (int i = 0; i < kTableLength; i++) {
1863 test.input = inputs[i]; 1863 test.input = inputs[i];
1864 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 1864 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
1865 // Check outputs 1865 // Check outputs
1866 CHECK_EQ(test.output, outputs[i]); 1866 CHECK_EQ(test.output, outputs[i]);
1867 } 1867 }
1868 } 1868 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 __ maxa_d(f14, f2, f4); 1930 __ maxa_d(f14, f2, f4);
1931 __ maxa_s(f16, f8, f10); 1931 __ maxa_s(f16, f8, f10);
1932 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, resf)) ); 1932 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, resf)) );
1933 __ Sdc1(f6, MemOperand(a0, offsetof(TestFloat, resd))); 1933 __ Sdc1(f6, MemOperand(a0, offsetof(TestFloat, resd)));
1934 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resf1)) ); 1934 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resf1)) );
1935 __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resd1))); 1935 __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resd1)));
1936 __ jr(ra); 1936 __ jr(ra);
1937 __ nop(); 1937 __ nop();
1938 1938
1939 CodeDesc desc; 1939 CodeDesc desc;
1940 assm.GetCode(&desc); 1940 assm.GetCode(isolate, &desc);
1941 Handle<Code> code = isolate->factory()->NewCode( 1941 Handle<Code> code = isolate->factory()->NewCode(
1942 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1942 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1943 F3 f = FUNCTION_CAST<F3>(code->entry()); 1943 F3 f = FUNCTION_CAST<F3>(code->entry());
1944 for (int i = 0; i < kTableLength; i++) { 1944 for (int i = 0; i < kTableLength; i++) {
1945 test.a = inputsa[i]; 1945 test.a = inputsa[i];
1946 test.b = inputsb[i]; 1946 test.b = inputsb[i];
1947 test.c = inputsc[i]; 1947 test.c = inputsc[i];
1948 test.d = inputsd[i]; 1948 test.d = inputsd[i];
1949 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 1949 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
1950 if (i < kTableLength - 1) { 1950 if (i < kTableLength - 1) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2011 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2012 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); 2012 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
2013 __ trunc_l_d(f8, f4); 2013 __ trunc_l_d(f8, f4);
2014 __ trunc_l_s(f10, f6); 2014 __ trunc_l_s(f10, f6);
2015 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c))); 2015 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
2016 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d))); 2016 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
2017 __ jr(ra); 2017 __ jr(ra);
2018 __ nop(); 2018 __ nop();
2019 Test test; 2019 Test test;
2020 CodeDesc desc; 2020 CodeDesc desc;
2021 assm.GetCode(&desc); 2021 assm.GetCode(isolate, &desc);
2022 Handle<Code> code = isolate->factory()->NewCode( 2022 Handle<Code> code = isolate->factory()->NewCode(
2023 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2023 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2024 F3 f = FUNCTION_CAST<F3>(code->entry()); 2024 F3 f = FUNCTION_CAST<F3>(code->entry());
2025 for (int i = 0; i < kTableLength; i++) { 2025 for (int i = 0; i < kTableLength; i++) {
2026 test.a = inputs_D[i]; 2026 test.a = inputs_D[i];
2027 test.b = inputs_S[i]; 2027 test.b = inputs_S[i];
2028 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2028 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2029 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && 2029 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
2030 kArchVariant == kMips32r6) { 2030 kArchVariant == kMips32r6) {
2031 CHECK_EQ(test.c, outputsNaN2008[i]); 2031 CHECK_EQ(test.c, outputsNaN2008[i]);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 __ movn_s(f14, f6, t0); 2092 __ movn_s(f14, f6, t0);
2093 __ movn_d(f16, f2, t0); 2093 __ movn_d(f16, f2, t0);
2094 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, d)) ); 2094 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, d)) );
2095 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, b))); 2095 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, b)));
2096 __ swc1(f14, MemOperand(a0, offsetof(TestFloat, d1)) ); 2096 __ swc1(f14, MemOperand(a0, offsetof(TestFloat, d1)) );
2097 __ Sdc1(f16, MemOperand(a0, offsetof(TestFloat, b1))); 2097 __ Sdc1(f16, MemOperand(a0, offsetof(TestFloat, b1)));
2098 __ jr(ra); 2098 __ jr(ra);
2099 __ nop(); 2099 __ nop();
2100 2100
2101 CodeDesc desc; 2101 CodeDesc desc;
2102 assm.GetCode(&desc); 2102 assm.GetCode(isolate, &desc);
2103 Handle<Code> code = isolate->factory()->NewCode( 2103 Handle<Code> code = isolate->factory()->NewCode(
2104 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2104 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2105 F3 f = FUNCTION_CAST<F3>(code->entry()); 2105 F3 f = FUNCTION_CAST<F3>(code->entry());
2106 for (int i = 0; i < kTableLength; i++) { 2106 for (int i = 0; i < kTableLength; i++) {
2107 test.a = inputs_D[i]; 2107 test.a = inputs_D[i];
2108 test.c = inputs_S[i]; 2108 test.c = inputs_S[i];
2109 2109
2110 test.rt = 1; 2110 test.rt = 1;
2111 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2111 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2112 CHECK_EQ(test.b, test.bold); 2112 CHECK_EQ(test.b, test.bold);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold1)) ); 2194 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold1)) );
2195 __ movf_s(f12, f4, test.cc); 2195 __ movf_s(f12, f4, test.cc);
2196 __ movf_d(f10, f2, test.cc); 2196 __ movf_d(f10, f2, test.cc);
2197 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf1)) ); 2197 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf1)) );
2198 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd1))); 2198 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd1)));
2199 __ ctc1(t0, FCSR); 2199 __ ctc1(t0, FCSR);
2200 __ jr(ra); 2200 __ jr(ra);
2201 __ nop(); 2201 __ nop();
2202 2202
2203 CodeDesc desc; 2203 CodeDesc desc;
2204 assm.GetCode(&desc); 2204 assm.GetCode(isolate, &desc);
2205 Handle<Code> code = isolate->factory()->NewCode( 2205 Handle<Code> code = isolate->factory()->NewCode(
2206 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2206 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2207 F3 f = FUNCTION_CAST<F3>(code->entry()); 2207 F3 f = FUNCTION_CAST<F3>(code->entry());
2208 2208
2209 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2209 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2210 CHECK_EQ(test.dstf, outputs_S[i]); 2210 CHECK_EQ(test.dstf, outputs_S[i]);
2211 CHECK_EQ(test.dstd, outputs_D[i]); 2211 CHECK_EQ(test.dstd, outputs_D[i]);
2212 CHECK_EQ(test.dstf1, test.dstfold1); 2212 CHECK_EQ(test.dstf1, test.dstfold1);
2213 CHECK_EQ(test.dstd1, test.dstdold1); 2213 CHECK_EQ(test.dstd1, test.dstdold1);
2214 test.fcsr = 0; 2214 test.fcsr = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2279 __ lw(t0, MemOperand(a0, offsetof(Test, fcsr)) ); 2279 __ lw(t0, MemOperand(a0, offsetof(Test, fcsr)) );
2280 __ cfc1(t1, FCSR); 2280 __ cfc1(t1, FCSR);
2281 __ ctc1(t0, FCSR); 2281 __ ctc1(t0, FCSR);
2282 __ cvt_w_d(f8, f4); 2282 __ cvt_w_d(f8, f4);
2283 __ swc1(f8, MemOperand(a0, offsetof(Test, b)) ); 2283 __ swc1(f8, MemOperand(a0, offsetof(Test, b)) );
2284 __ ctc1(t1, FCSR); 2284 __ ctc1(t1, FCSR);
2285 __ jr(ra); 2285 __ jr(ra);
2286 __ nop(); 2286 __ nop();
2287 Test test; 2287 Test test;
2288 CodeDesc desc; 2288 CodeDesc desc;
2289 assm.GetCode(&desc); 2289 assm.GetCode(isolate, &desc);
2290 Handle<Code> code = isolate->factory()->NewCode( 2290 Handle<Code> code = isolate->factory()->NewCode(
2291 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2291 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2292 F3 f = FUNCTION_CAST<F3>(code->entry()); 2292 F3 f = FUNCTION_CAST<F3>(code->entry());
2293 for (int j = 0; j < 4; j++) { 2293 for (int j = 0; j < 4; j++) {
2294 test.fcsr = fcsr_inputs[j]; 2294 test.fcsr = fcsr_inputs[j];
2295 for (int i = 0; i < kTableLength; i++) { 2295 for (int i = 0; i < kTableLength; i++) {
2296 test.a = inputs[i]; 2296 test.a = inputs[i];
2297 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2297 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2298 CHECK_EQ(test.b, outputs[j][i]); 2298 CHECK_EQ(test.b, outputs[j][i]);
2299 } 2299 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2346 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2346 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2347 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); 2347 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
2348 __ trunc_w_d(f8, f4); 2348 __ trunc_w_d(f8, f4);
2349 __ trunc_w_s(f10, f6); 2349 __ trunc_w_s(f10, f6);
2350 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) ); 2350 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) );
2351 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) ); 2351 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) );
2352 __ jr(ra); 2352 __ jr(ra);
2353 __ nop(); 2353 __ nop();
2354 Test test; 2354 Test test;
2355 CodeDesc desc; 2355 CodeDesc desc;
2356 assm.GetCode(&desc); 2356 assm.GetCode(isolate, &desc);
2357 Handle<Code> code = isolate->factory()->NewCode( 2357 Handle<Code> code = isolate->factory()->NewCode(
2358 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2358 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2359 F3 f = FUNCTION_CAST<F3>(code->entry()); 2359 F3 f = FUNCTION_CAST<F3>(code->entry());
2360 for (int i = 0; i < kTableLength; i++) { 2360 for (int i = 0; i < kTableLength; i++) {
2361 test.a = inputs_D[i]; 2361 test.a = inputs_D[i];
2362 test.b = inputs_S[i]; 2362 test.b = inputs_S[i];
2363 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2363 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2364 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) { 2364 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) {
2365 CHECK_EQ(test.c, outputsNaN2008[i]); 2365 CHECK_EQ(test.c, outputsNaN2008[i]);
2366 } else { 2366 } else {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2415 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2416 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); 2416 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
2417 __ round_w_d(f8, f4); 2417 __ round_w_d(f8, f4);
2418 __ round_w_s(f10, f6); 2418 __ round_w_s(f10, f6);
2419 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) ); 2419 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) );
2420 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) ); 2420 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) );
2421 __ jr(ra); 2421 __ jr(ra);
2422 __ nop(); 2422 __ nop();
2423 Test test; 2423 Test test;
2424 CodeDesc desc; 2424 CodeDesc desc;
2425 assm.GetCode(&desc); 2425 assm.GetCode(isolate, &desc);
2426 Handle<Code> code = isolate->factory()->NewCode( 2426 Handle<Code> code = isolate->factory()->NewCode(
2427 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2427 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2428 F3 f = FUNCTION_CAST<F3>(code->entry()); 2428 F3 f = FUNCTION_CAST<F3>(code->entry());
2429 for (int i = 0; i < kTableLength; i++) { 2429 for (int i = 0; i < kTableLength; i++) {
2430 test.a = inputs_D[i]; 2430 test.a = inputs_D[i];
2431 test.b = inputs_S[i]; 2431 test.b = inputs_S[i];
2432 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2432 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2433 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) { 2433 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) {
2434 CHECK_EQ(test.c, outputsNaN2008[i]); 2434 CHECK_EQ(test.c, outputsNaN2008[i]);
2435 } else { 2435 } else {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2487 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2487 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2488 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); 2488 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
2489 __ round_l_d(f8, f4); 2489 __ round_l_d(f8, f4);
2490 __ round_l_s(f10, f6); 2490 __ round_l_s(f10, f6);
2491 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c))); 2491 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
2492 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d))); 2492 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
2493 __ jr(ra); 2493 __ jr(ra);
2494 __ nop(); 2494 __ nop();
2495 Test test; 2495 Test test;
2496 CodeDesc desc; 2496 CodeDesc desc;
2497 assm.GetCode(&desc); 2497 assm.GetCode(isolate, &desc);
2498 Handle<Code> code = isolate->factory()->NewCode( 2498 Handle<Code> code = isolate->factory()->NewCode(
2499 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2499 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2500 F3 f = FUNCTION_CAST<F3>(code->entry()); 2500 F3 f = FUNCTION_CAST<F3>(code->entry());
2501 for (int i = 0; i < kTableLength; i++) { 2501 for (int i = 0; i < kTableLength; i++) {
2502 test.a = inputs_D[i]; 2502 test.a = inputs_D[i];
2503 test.b = inputs_S[i]; 2503 test.b = inputs_S[i];
2504 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2504 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2505 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && 2505 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
2506 kArchVariant == kMips32r6) { 2506 kArchVariant == kMips32r6) {
2507 CHECK_EQ(test.c, outputsNaN2008[i]); 2507 CHECK_EQ(test.c, outputsNaN2008[i]);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c))); 2560 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)));
2561 __ Ldc1(f10, MemOperand(a0, offsetof(TestFloat, d))); 2561 __ Ldc1(f10, MemOperand(a0, offsetof(TestFloat, d)));
2562 __ sub_s(f6, f2, f4); 2562 __ sub_s(f6, f2, f4);
2563 __ sub_d(f12, f8, f10); 2563 __ sub_d(f12, f8, f10);
2564 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) ); 2564 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) );
2565 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD))); 2565 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
2566 __ jr(ra); 2566 __ jr(ra);
2567 __ nop(); 2567 __ nop();
2568 2568
2569 CodeDesc desc; 2569 CodeDesc desc;
2570 assm.GetCode(&desc); 2570 assm.GetCode(isolate, &desc);
2571 Handle<Code> code = isolate->factory()->NewCode( 2571 Handle<Code> code = isolate->factory()->NewCode(
2572 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2572 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2573 F3 f = FUNCTION_CAST<F3>(code->entry()); 2573 F3 f = FUNCTION_CAST<F3>(code->entry());
2574 for (int i = 0; i < kTableLength; i++) { 2574 for (int i = 0; i < kTableLength; i++) {
2575 test.a = inputfs_S[i]; 2575 test.a = inputfs_S[i];
2576 test.b = inputft_S[i]; 2576 test.b = inputft_S[i];
2577 test.c = inputfs_D[i]; 2577 test.c = inputfs_D[i];
2578 test.d = inputft_D[i]; 2578 test.d = inputft_D[i];
2579 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2579 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2580 CHECK_EQ(test.resultS, outputs_S[i]); 2580 CHECK_EQ(test.resultS, outputs_S[i]);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { 2639 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) {
2640 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1)) ); 2640 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1)) );
2641 __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1))); 2641 __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1)));
2642 __ swc1(f4, MemOperand(a0, offsetof(TestFloat, resultS2)) ); 2642 __ swc1(f4, MemOperand(a0, offsetof(TestFloat, resultS2)) );
2643 __ Sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2))); 2643 __ Sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2)));
2644 } 2644 }
2645 __ jr(ra); 2645 __ jr(ra);
2646 __ nop(); 2646 __ nop();
2647 2647
2648 CodeDesc desc; 2648 CodeDesc desc;
2649 assm.GetCode(&desc); 2649 assm.GetCode(isolate, &desc);
2650 Handle<Code> code = isolate->factory()->NewCode( 2650 Handle<Code> code = isolate->factory()->NewCode(
2651 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2651 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2652 F3 f = FUNCTION_CAST<F3>(code->entry()); 2652 F3 f = FUNCTION_CAST<F3>(code->entry());
2653 2653
2654 for (int i = 0; i < kTableLength; i++) { 2654 for (int i = 0; i < kTableLength; i++) {
2655 float f1; 2655 float f1;
2656 double d1; 2656 double d1;
2657 test.a = inputs_S[i]; 2657 test.a = inputs_S[i];
2658 test.c = inputs_D[i]; 2658 test.c = inputs_D[i];
2659 2659
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); 2719 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) );
2720 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c))); 2720 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)));
2721 __ neg_s(f6, f2); 2721 __ neg_s(f6, f2);
2722 __ neg_d(f12, f8); 2722 __ neg_d(f12, f8);
2723 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) ); 2723 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) );
2724 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD))); 2724 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
2725 __ jr(ra); 2725 __ jr(ra);
2726 __ nop(); 2726 __ nop();
2727 2727
2728 CodeDesc desc; 2728 CodeDesc desc;
2729 assm.GetCode(&desc); 2729 assm.GetCode(isolate, &desc);
2730 Handle<Code> code = isolate->factory()->NewCode( 2730 Handle<Code> code = isolate->factory()->NewCode(
2731 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2731 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2732 F3 f = FUNCTION_CAST<F3>(code->entry()); 2732 F3 f = FUNCTION_CAST<F3>(code->entry());
2733 for (int i = 0; i < kTableLength; i++) { 2733 for (int i = 0; i < kTableLength; i++) {
2734 test.a = inputs_S[i]; 2734 test.a = inputs_S[i];
2735 test.c = inputs_D[i]; 2735 test.c = inputs_D[i];
2736 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2736 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2737 CHECK_EQ(test.resultS, outputs_S[i]); 2737 CHECK_EQ(test.resultS, outputs_S[i]);
2738 CHECK_EQ(test.resultD, outputs_D[i]); 2738 CHECK_EQ(test.resultD, outputs_D[i]);
2739 } 2739 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2776 __ Ldc1(f6, MemOperand(a0, offsetof(TestFloat, c))); 2776 __ Ldc1(f6, MemOperand(a0, offsetof(TestFloat, c)));
2777 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, d))); 2777 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, d)));
2778 __ mul_s(f10, f2, f4); 2778 __ mul_s(f10, f2, f4);
2779 __ mul_d(f12, f6, f8); 2779 __ mul_d(f12, f6, f8);
2780 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, resultS)) ); 2780 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, resultS)) );
2781 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD))); 2781 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
2782 __ jr(ra); 2782 __ jr(ra);
2783 __ nop(); 2783 __ nop();
2784 2784
2785 CodeDesc desc; 2785 CodeDesc desc;
2786 assm.GetCode(&desc); 2786 assm.GetCode(isolate, &desc);
2787 Handle<Code> code = isolate->factory()->NewCode( 2787 Handle<Code> code = isolate->factory()->NewCode(
2788 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2788 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2789 F3 f = FUNCTION_CAST<F3>(code->entry()); 2789 F3 f = FUNCTION_CAST<F3>(code->entry());
2790 for (int i = 0; i < kTableLength; i++) { 2790 for (int i = 0; i < kTableLength; i++) {
2791 test.a = inputfs_S[i]; 2791 test.a = inputfs_S[i];
2792 test.b = inputft_S[i]; 2792 test.b = inputft_S[i];
2793 test.c = inputfs_D[i]; 2793 test.c = inputfs_D[i];
2794 test.d = inputft_D[i]; 2794 test.d = inputft_D[i];
2795 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2795 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2796 CHECK_EQ(test.resultS, inputfs_S[i]*inputft_S[i]); 2796 CHECK_EQ(test.resultS, inputfs_S[i]*inputft_S[i]);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) ); 2832 __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) );
2833 __ mov_s(f8, f6); 2833 __ mov_s(f8, f6);
2834 __ mov_d(f10, f4); 2834 __ mov_d(f10, f4);
2835 __ swc1(f8, MemOperand(a0, offsetof(TestFloat, d)) ); 2835 __ swc1(f8, MemOperand(a0, offsetof(TestFloat, d)) );
2836 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, b))); 2836 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, b)));
2837 2837
2838 __ jr(ra); 2838 __ jr(ra);
2839 __ nop(); 2839 __ nop();
2840 2840
2841 CodeDesc desc; 2841 CodeDesc desc;
2842 assm.GetCode(&desc); 2842 assm.GetCode(isolate, &desc);
2843 Handle<Code> code = isolate->factory()->NewCode( 2843 Handle<Code> code = isolate->factory()->NewCode(
2844 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2844 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2845 F3 f = FUNCTION_CAST<F3>(code->entry()); 2845 F3 f = FUNCTION_CAST<F3>(code->entry());
2846 for (int i = 0; i < kTableLength; i++) { 2846 for (int i = 0; i < kTableLength; i++) {
2847 test.a = inputs_D[i]; 2847 test.a = inputs_D[i];
2848 test.c = inputs_S[i]; 2848 test.c = inputs_S[i];
2849 2849
2850 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2850 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2851 CHECK_EQ(test.b, outputs_D[i]); 2851 CHECK_EQ(test.b, outputs_D[i]);
2852 CHECK_EQ(test.d, outputs_S[i]); 2852 CHECK_EQ(test.d, outputs_S[i]);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2899 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2899 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2900 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); 2900 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
2901 __ floor_w_d(f8, f4); 2901 __ floor_w_d(f8, f4);
2902 __ floor_w_s(f10, f6); 2902 __ floor_w_s(f10, f6);
2903 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) ); 2903 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) );
2904 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) ); 2904 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) );
2905 __ jr(ra); 2905 __ jr(ra);
2906 __ nop(); 2906 __ nop();
2907 Test test; 2907 Test test;
2908 CodeDesc desc; 2908 CodeDesc desc;
2909 assm.GetCode(&desc); 2909 assm.GetCode(isolate, &desc);
2910 Handle<Code> code = isolate->factory()->NewCode( 2910 Handle<Code> code = isolate->factory()->NewCode(
2911 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2911 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2912 F3 f = FUNCTION_CAST<F3>(code->entry()); 2912 F3 f = FUNCTION_CAST<F3>(code->entry());
2913 for (int i = 0; i < kTableLength; i++) { 2913 for (int i = 0; i < kTableLength; i++) {
2914 test.a = inputs_D[i]; 2914 test.a = inputs_D[i];
2915 test.b = inputs_S[i]; 2915 test.b = inputs_S[i];
2916 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2916 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2917 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) { 2917 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) {
2918 CHECK_EQ(test.c, outputsNaN2008[i]); 2918 CHECK_EQ(test.c, outputsNaN2008[i]);
2919 } else { 2919 } else {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2971 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2971 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2972 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); 2972 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
2973 __ floor_l_d(f8, f4); 2973 __ floor_l_d(f8, f4);
2974 __ floor_l_s(f10, f6); 2974 __ floor_l_s(f10, f6);
2975 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c))); 2975 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
2976 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d))); 2976 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
2977 __ jr(ra); 2977 __ jr(ra);
2978 __ nop(); 2978 __ nop();
2979 Test test; 2979 Test test;
2980 CodeDesc desc; 2980 CodeDesc desc;
2981 assm.GetCode(&desc); 2981 assm.GetCode(isolate, &desc);
2982 Handle<Code> code = isolate->factory()->NewCode( 2982 Handle<Code> code = isolate->factory()->NewCode(
2983 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2983 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2984 F3 f = FUNCTION_CAST<F3>(code->entry()); 2984 F3 f = FUNCTION_CAST<F3>(code->entry());
2985 for (int i = 0; i < kTableLength; i++) { 2985 for (int i = 0; i < kTableLength; i++) {
2986 test.a = inputs_D[i]; 2986 test.a = inputs_D[i];
2987 test.b = inputs_S[i]; 2987 test.b = inputs_S[i];
2988 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2988 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2989 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && 2989 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
2990 kArchVariant == kMips32r6) { 2990 kArchVariant == kMips32r6) {
2991 CHECK_EQ(test.c, outputsNaN2008[i]); 2991 CHECK_EQ(test.c, outputsNaN2008[i]);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
3043 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 3043 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
3044 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); 3044 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
3045 __ ceil_w_d(f8, f4); 3045 __ ceil_w_d(f8, f4);
3046 __ ceil_w_s(f10, f6); 3046 __ ceil_w_s(f10, f6);
3047 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) ); 3047 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) );
3048 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) ); 3048 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) );
3049 __ jr(ra); 3049 __ jr(ra);
3050 __ nop(); 3050 __ nop();
3051 Test test; 3051 Test test;
3052 CodeDesc desc; 3052 CodeDesc desc;
3053 assm.GetCode(&desc); 3053 assm.GetCode(isolate, &desc);
3054 Handle<Code> code = isolate->factory()->NewCode( 3054 Handle<Code> code = isolate->factory()->NewCode(
3055 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3055 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3056 F3 f = FUNCTION_CAST<F3>(code->entry()); 3056 F3 f = FUNCTION_CAST<F3>(code->entry());
3057 for (int i = 0; i < kTableLength; i++) { 3057 for (int i = 0; i < kTableLength; i++) {
3058 test.a = inputs_D[i]; 3058 test.a = inputs_D[i];
3059 test.b = inputs_S[i]; 3059 test.b = inputs_S[i];
3060 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3060 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3061 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) { 3061 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) {
3062 CHECK_EQ(test.c, outputsNaN2008[i]); 3062 CHECK_EQ(test.c, outputsNaN2008[i]);
3063 } else { 3063 } else {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 3115 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
3116 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); 3116 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
3117 __ ceil_l_d(f8, f4); 3117 __ ceil_l_d(f8, f4);
3118 __ ceil_l_s(f10, f6); 3118 __ ceil_l_s(f10, f6);
3119 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c))); 3119 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
3120 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d))); 3120 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
3121 __ jr(ra); 3121 __ jr(ra);
3122 __ nop(); 3122 __ nop();
3123 Test test; 3123 Test test;
3124 CodeDesc desc; 3124 CodeDesc desc;
3125 assm.GetCode(&desc); 3125 assm.GetCode(isolate, &desc);
3126 Handle<Code> code = isolate->factory()->NewCode( 3126 Handle<Code> code = isolate->factory()->NewCode(
3127 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3127 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3128 F3 f = FUNCTION_CAST<F3>(code->entry()); 3128 F3 f = FUNCTION_CAST<F3>(code->entry());
3129 for (int i = 0; i < kTableLength; i++) { 3129 for (int i = 0; i < kTableLength; i++) {
3130 test.a = inputs_D[i]; 3130 test.a = inputs_D[i];
3131 test.b = inputs_S[i]; 3131 test.b = inputs_S[i];
3132 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3132 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3133 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && 3133 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
3134 kArchVariant == kMips32r6) { 3134 kArchVariant == kMips32r6) {
3135 CHECK_EQ(test.c, outputsNaN2008[i]); 3135 CHECK_EQ(test.c, outputsNaN2008[i]);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 3187
3188 __ bind(&done); 3188 __ bind(&done);
3189 __ lw(ra, MemOperand(sp)); 3189 __ lw(ra, MemOperand(sp));
3190 __ addiu(sp, sp, 4); 3190 __ addiu(sp, sp, 4);
3191 __ jr(ra); 3191 __ jr(ra);
3192 __ nop(); 3192 __ nop();
3193 3193
3194 CHECK_EQ(0, assm.UnboundLabelsCount()); 3194 CHECK_EQ(0, assm.UnboundLabelsCount());
3195 3195
3196 CodeDesc desc; 3196 CodeDesc desc;
3197 assm.GetCode(&desc); 3197 assm.GetCode(isolate, &desc);
3198 Handle<Code> code = isolate->factory()->NewCode( 3198 Handle<Code> code = isolate->factory()->NewCode(
3199 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3199 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3200 #ifdef OBJECT_PRINT 3200 #ifdef OBJECT_PRINT
3201 code->Print(std::cout); 3201 code->Print(std::cout);
3202 #endif 3202 #endif
3203 F1 f = FUNCTION_CAST<F1>(code->entry()); 3203 F1 f = FUNCTION_CAST<F1>(code->entry());
3204 for (int i = 0; i < kNumCases; ++i) { 3204 for (int i = 0; i < kNumCases; ++i) {
3205 int res = reinterpret_cast<int>( 3205 int res = reinterpret_cast<int>(
3206 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0)); 3206 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
3207 ::printf("f(%d) = %d\n", i, res); 3207 ::printf("f(%d) = %d\n", i, res);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3257 } 3257 }
3258 } 3258 }
3259 3259
3260 __ bind(&done); 3260 __ bind(&done);
3261 __ lw(ra, MemOperand(sp)); 3261 __ lw(ra, MemOperand(sp));
3262 __ addiu(sp, sp, 4); 3262 __ addiu(sp, sp, 4);
3263 __ jr(ra); 3263 __ jr(ra);
3264 __ nop(); 3264 __ nop();
3265 3265
3266 CodeDesc desc; 3266 CodeDesc desc;
3267 assm.GetCode(&desc); 3267 assm.GetCode(isolate, &desc);
3268 Handle<Code> code = isolate->factory()->NewCode( 3268 Handle<Code> code = isolate->factory()->NewCode(
3269 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3269 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3270 #ifdef OBJECT_PRINT 3270 #ifdef OBJECT_PRINT
3271 code->Print(std::cout); 3271 code->Print(std::cout);
3272 #endif 3272 #endif
3273 F1 f = FUNCTION_CAST<F1>(code->entry()); 3273 F1 f = FUNCTION_CAST<F1>(code->entry());
3274 for (int i = 0; i < kNumCases; ++i) { 3274 for (int i = 0; i < kNumCases; ++i) {
3275 int res = reinterpret_cast<int>( 3275 int res = reinterpret_cast<int>(
3276 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0)); 3276 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
3277 ::printf("f(%d) = %d\n", i, res); 3277 ::printf("f(%d) = %d\n", i, res);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
3334 } 3334 }
3335 } 3335 }
3336 3336
3337 __ bind(&done); 3337 __ bind(&done);
3338 __ lw(ra, MemOperand(sp)); 3338 __ lw(ra, MemOperand(sp));
3339 __ addiu(sp, sp, 4); 3339 __ addiu(sp, sp, 4);
3340 __ jr(ra); 3340 __ jr(ra);
3341 __ nop(); 3341 __ nop();
3342 3342
3343 CodeDesc desc; 3343 CodeDesc desc;
3344 assm.GetCode(&desc); 3344 assm.GetCode(isolate, &desc);
3345 Handle<Code> code = isolate->factory()->NewCode( 3345 Handle<Code> code = isolate->factory()->NewCode(
3346 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3346 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3347 #ifdef OBJECT_PRINT 3347 #ifdef OBJECT_PRINT
3348 code->Print(std::cout); 3348 code->Print(std::cout);
3349 #endif 3349 #endif
3350 F1 f = FUNCTION_CAST<F1>(code->entry()); 3350 F1 f = FUNCTION_CAST<F1>(code->entry());
3351 for (int i = 0; i < kNumCases; ++i) { 3351 for (int i = 0; i < kNumCases; ++i) {
3352 Handle<Object> result( 3352 Handle<Object> result(
3353 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0), isolate); 3353 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0), isolate);
3354 #ifdef OBJECT_PRINT 3354 #ifdef OBJECT_PRINT
(...skipping 30 matching lines...) Expand all
3385 3385
3386 __ lw(a2, MemOperand(a0, offsetof(T, r2))); 3386 __ lw(a2, MemOperand(a0, offsetof(T, r2)));
3387 __ nop(); 3387 __ nop();
3388 __ bitswap(a1, a2); 3388 __ bitswap(a1, a2);
3389 __ sw(a1, MemOperand(a0, offsetof(T, r2))); 3389 __ sw(a1, MemOperand(a0, offsetof(T, r2)));
3390 3390
3391 __ jr(ra); 3391 __ jr(ra);
3392 __ nop(); 3392 __ nop();
3393 3393
3394 CodeDesc desc; 3394 CodeDesc desc;
3395 assm.GetCode(&desc); 3395 assm.GetCode(isolate, &desc);
3396 Handle<Code> code = isolate->factory()->NewCode( 3396 Handle<Code> code = isolate->factory()->NewCode(
3397 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3397 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3398 F3 f = FUNCTION_CAST<F3>(code->entry()); 3398 F3 f = FUNCTION_CAST<F3>(code->entry());
3399 t.r1 = 0x781A15C3; 3399 t.r1 = 0x781A15C3;
3400 t.r2 = 0x8B71FCDE; 3400 t.r2 = 0x8B71FCDE;
3401 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 3401 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
3402 USE(dummy); 3402 USE(dummy);
3403 3403
3404 CHECK_EQ(static_cast<int32_t>(0x1E58A8C3), t.r1); 3404 CHECK_EQ(static_cast<int32_t>(0x1E58A8C3), t.r1);
3405 CHECK_EQ(static_cast<int32_t>(0xD18E3F7B), t.r2); 3405 CHECK_EQ(static_cast<int32_t>(0xD18E3F7B), t.r2);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 __ swc1(f6, MemOperand(a0, offsetof(T, fPosSubnorm))); 3520 __ swc1(f6, MemOperand(a0, offsetof(T, fPosSubnorm)));
3521 3521
3522 __ lwc1(f4, MemOperand(a0, offsetof(T, fPosZero))); 3522 __ lwc1(f4, MemOperand(a0, offsetof(T, fPosZero)));
3523 __ class_s(f6, f4); 3523 __ class_s(f6, f4);
3524 __ swc1(f6, MemOperand(a0, offsetof(T, fPosZero))); 3524 __ swc1(f6, MemOperand(a0, offsetof(T, fPosZero)));
3525 3525
3526 __ jr(ra); 3526 __ jr(ra);
3527 __ nop(); 3527 __ nop();
3528 3528
3529 CodeDesc desc; 3529 CodeDesc desc;
3530 assm.GetCode(&desc); 3530 assm.GetCode(isolate, &desc);
3531 Handle<Code> code = isolate->factory()->NewCode( 3531 Handle<Code> code = isolate->factory()->NewCode(
3532 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3532 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3533 F3 f = FUNCTION_CAST<F3>(code->entry()); 3533 F3 f = FUNCTION_CAST<F3>(code->entry());
3534 3534
3535 t.dSignalingNan = std::numeric_limits<double>::signaling_NaN(); 3535 t.dSignalingNan = std::numeric_limits<double>::signaling_NaN();
3536 t.dQuietNan = std::numeric_limits<double>::quiet_NaN(); 3536 t.dQuietNan = std::numeric_limits<double>::quiet_NaN();
3537 t.dNegInf = -1.0 / 0.0; 3537 t.dNegInf = -1.0 / 0.0;
3538 t.dNegNorm = -5.0; 3538 t.dNegNorm = -5.0;
3539 t.dNegSubnorm = -DBL_MIN / 2.0; 3539 t.dNegSubnorm = -DBL_MIN / 2.0;
3540 t.dNegZero = -0.0; 3540 t.dNegZero = -0.0;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
3612 __ abs_s(f10, f4); 3612 __ abs_s(f10, f4);
3613 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, b))); 3613 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, b)));
3614 3614
3615 // Restore FCSR. 3615 // Restore FCSR.
3616 __ ctc1(a1, FCSR); 3616 __ ctc1(a1, FCSR);
3617 3617
3618 __ jr(ra); 3618 __ jr(ra);
3619 __ nop(); 3619 __ nop();
3620 3620
3621 CodeDesc desc; 3621 CodeDesc desc;
3622 assm.GetCode(&desc); 3622 assm.GetCode(isolate, &desc);
3623 Handle<Code> code = isolate->factory()->NewCode( 3623 Handle<Code> code = isolate->factory()->NewCode(
3624 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3624 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3625 F3 f = FUNCTION_CAST<F3>(code->entry()); 3625 F3 f = FUNCTION_CAST<F3>(code->entry());
3626 test.a = -2.0; 3626 test.a = -2.0;
3627 test.b = -2.0; 3627 test.b = -2.0;
3628 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3628 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3629 CHECK_EQ(test.a, 2.0); 3629 CHECK_EQ(test.a, 2.0);
3630 CHECK_EQ(test.b, 2.0); 3630 CHECK_EQ(test.b, 2.0);
3631 3631
3632 test.a = 2.0; 3632 test.a = 2.0;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
3705 3705
3706 __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, fa))); 3706 __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, fa)));
3707 __ lwc1(f8, MemOperand(a0, offsetof(TestFloat, fb))); 3707 __ lwc1(f8, MemOperand(a0, offsetof(TestFloat, fb)));
3708 __ add_s(f10, f8, f4); 3708 __ add_s(f10, f8, f4);
3709 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, fc))); 3709 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, fc)));
3710 3710
3711 __ jr(ra); 3711 __ jr(ra);
3712 __ nop(); 3712 __ nop();
3713 3713
3714 CodeDesc desc; 3714 CodeDesc desc;
3715 assm.GetCode(&desc); 3715 assm.GetCode(isolate, &desc);
3716 Handle<Code> code = isolate->factory()->NewCode( 3716 Handle<Code> code = isolate->factory()->NewCode(
3717 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3717 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3718 F3 f = FUNCTION_CAST<F3>(code->entry()); 3718 F3 f = FUNCTION_CAST<F3>(code->entry());
3719 test.a = 2.0; 3719 test.a = 2.0;
3720 test.b = 3.0; 3720 test.b = 3.0;
3721 test.fa = 2.0; 3721 test.fa = 2.0;
3722 test.fb = 3.0; 3722 test.fb = 3.0;
3723 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3723 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3724 CHECK_EQ(test.c, 5.0); 3724 CHECK_EQ(test.c, 5.0);
3725 CHECK_EQ(test.fc, 5.0); 3725 CHECK_EQ(test.fc, 5.0);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
3860 __ c_s(ULE, f14, f16, 0); 3860 __ c_s(ULE, f14, f16, 0);
3861 __ movt(t2, t1, 6); 3861 __ movt(t2, t1, 6);
3862 __ movt(t3, t1, 0); 3862 __ movt(t3, t1, 0);
3863 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUle)) ); 3863 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUle)) );
3864 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUle)) ); 3864 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUle)) );
3865 3865
3866 __ jr(ra); 3866 __ jr(ra);
3867 __ nop(); 3867 __ nop();
3868 3868
3869 CodeDesc desc; 3869 CodeDesc desc;
3870 assm.GetCode(&desc); 3870 assm.GetCode(isolate, &desc);
3871 Handle<Code> code = isolate->factory()->NewCode( 3871 Handle<Code> code = isolate->factory()->NewCode(
3872 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3872 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3873 F3 f = FUNCTION_CAST<F3>(code->entry()); 3873 F3 f = FUNCTION_CAST<F3>(code->entry());
3874 test.dOp1 = 2.0; 3874 test.dOp1 = 2.0;
3875 test.dOp2 = 3.0; 3875 test.dOp2 = 3.0;
3876 test.fOp1 = 2.0; 3876 test.fOp1 = 2.0;
3877 test.fOp2 = 3.0; 3877 test.fOp2 = 3.0;
3878 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3878 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3879 CHECK_EQ(test.dF, 0U); 3879 CHECK_EQ(test.dF, 0U);
3880 CHECK_EQ(test.dUn, 0U); 3880 CHECK_EQ(test.dUn, 0U);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
4061 4061
4062 __ cmp_d(NE, f2, f4, f6); 4062 __ cmp_d(NE, f2, f4, f6);
4063 __ cmp_s(NE, f12, f14, f16); 4063 __ cmp_s(NE, f12, f14, f16);
4064 __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dNe))); 4064 __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dNe)));
4065 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fNe)) ); 4065 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fNe)) );
4066 4066
4067 __ jr(ra); 4067 __ jr(ra);
4068 __ nop(); 4068 __ nop();
4069 4069
4070 CodeDesc desc; 4070 CodeDesc desc;
4071 assm.GetCode(&desc); 4071 assm.GetCode(isolate, &desc);
4072 Handle<Code> code = isolate->factory()->NewCode( 4072 Handle<Code> code = isolate->factory()->NewCode(
4073 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4073 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4074 F3 f = FUNCTION_CAST<F3>(code->entry()); 4074 F3 f = FUNCTION_CAST<F3>(code->entry());
4075 uint64_t dTrue = 0xFFFFFFFFFFFFFFFF; 4075 uint64_t dTrue = 0xFFFFFFFFFFFFFFFF;
4076 uint64_t dFalse = 0x0000000000000000; 4076 uint64_t dFalse = 0x0000000000000000;
4077 uint32_t fTrue = 0xFFFFFFFF; 4077 uint32_t fTrue = 0xFFFFFFFF;
4078 uint32_t fFalse = 0x00000000; 4078 uint32_t fFalse = 0x00000000;
4079 4079
4080 test.dOp1 = 2.0; 4080 test.dOp1 = 2.0;
4081 test.dOp2 = 3.0; 4081 test.dOp2 = 3.0;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
4247 GENERATE_CVT_TEST(cvt_w_s, lw, sw) 4247 GENERATE_CVT_TEST(cvt_w_s, lw, sw)
4248 GENERATE_CVT_TEST(cvt_w_d, Ld, sw) 4248 GENERATE_CVT_TEST(cvt_w_d, Ld, sw)
4249 4249
4250 // Restore FCSR. 4250 // Restore FCSR.
4251 __ ctc1(a1, FCSR); 4251 __ ctc1(a1, FCSR);
4252 4252
4253 __ jr(ra); 4253 __ jr(ra);
4254 __ nop(); 4254 __ nop();
4255 4255
4256 CodeDesc desc; 4256 CodeDesc desc;
4257 assm.GetCode(&desc); 4257 assm.GetCode(isolate, &desc);
4258 Handle<Code> code = isolate->factory()->NewCode( 4258 Handle<Code> code = isolate->factory()->NewCode(
4259 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4259 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4260 F3 f = FUNCTION_CAST<F3>(code->entry()); 4260 F3 f = FUNCTION_CAST<F3>(code->entry());
4261 4261
4262 test.cvt_d_s_in = -0.51; 4262 test.cvt_d_s_in = -0.51;
4263 test.cvt_d_w_in = -1; 4263 test.cvt_d_w_in = -1;
4264 test.cvt_d_l_in = -1; 4264 test.cvt_d_l_in = -1;
4265 test.cvt_l_s_in = -0.51; 4265 test.cvt_l_s_in = -0.51;
4266 test.cvt_l_d_in = -0.51; 4266 test.cvt_l_d_in = -0.51;
4267 test.cvt_s_d_in = -0.51; 4267 test.cvt_s_d_in = -0.51;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
4459 __ div_s(f6, f4, f2); 4459 __ div_s(f6, f4, f2);
4460 __ swc1(f6, MemOperand(a0, offsetof(Test, fRes)) ); 4460 __ swc1(f6, MemOperand(a0, offsetof(Test, fRes)) );
4461 4461
4462 // Restore FCSR. 4462 // Restore FCSR.
4463 __ ctc1(a1, FCSR); 4463 __ ctc1(a1, FCSR);
4464 4464
4465 __ jr(ra); 4465 __ jr(ra);
4466 __ nop(); 4466 __ nop();
4467 4467
4468 CodeDesc desc; 4468 CodeDesc desc;
4469 assm.GetCode(&desc); 4469 assm.GetCode(isolate, &desc);
4470 Handle<Code> code = isolate->factory()->NewCode( 4470 Handle<Code> code = isolate->factory()->NewCode(
4471 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4471 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4472 4472
4473 F3 f = FUNCTION_CAST<F3>(code->entry()); 4473 F3 f = FUNCTION_CAST<F3>(code->entry());
4474 4474
4475 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 4475 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
4476 4476
4477 const int test_size = 3; 4477 const int test_size = 3;
4478 4478
4479 double dOp1[test_size] = { 4479 double dOp1[test_size] = {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
4551 Isolate* isolate = CcTest::i_isolate(); 4551 Isolate* isolate = CcTest::i_isolate();
4552 HandleScope scope(isolate); 4552 HandleScope scope(isolate);
4553 4553
4554 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4554 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4555 4555
4556 __ align(v0, a0, a1, bp); 4556 __ align(v0, a0, a1, bp);
4557 __ jr(ra); 4557 __ jr(ra);
4558 __ nop(); 4558 __ nop();
4559 4559
4560 CodeDesc desc; 4560 CodeDesc desc;
4561 assm.GetCode(&desc); 4561 assm.GetCode(isolate, &desc);
4562 Handle<Code> code = isolate->factory()->NewCode( 4562 Handle<Code> code = isolate->factory()->NewCode(
4563 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4563 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4564 4564
4565 F2 f = FUNCTION_CAST<F2>(code->entry()); 4565 F2 f = FUNCTION_CAST<F2>(code->entry());
4566 4566
4567 uint32_t res = reinterpret_cast<uint32_t>(CALL_GENERATED_CODE( 4567 uint32_t res = reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(
4568 isolate, f, rs_value, rt_value, 0, 0, 0)); 4568 isolate, f, rs_value, rt_value, 0, 0, 0));
4569 4569
4570 return res; 4570 return res;
4571 } 4571 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4604 Isolate* isolate = CcTest::i_isolate(); 4604 Isolate* isolate = CcTest::i_isolate();
4605 HandleScope scope(isolate); 4605 HandleScope scope(isolate);
4606 4606
4607 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4607 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4608 4608
4609 __ aluipc(v0, offset); 4609 __ aluipc(v0, offset);
4610 __ jr(ra); 4610 __ jr(ra);
4611 __ nop(); 4611 __ nop();
4612 4612
4613 CodeDesc desc; 4613 CodeDesc desc;
4614 assm.GetCode(&desc); 4614 assm.GetCode(isolate, &desc);
4615 Handle<Code> code = isolate->factory()->NewCode( 4615 Handle<Code> code = isolate->factory()->NewCode(
4616 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4616 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4617 4617
4618 F2 f = FUNCTION_CAST<F2>(code->entry()); 4618 F2 f = FUNCTION_CAST<F2>(code->entry());
4619 PC = (uint32_t) f; // Set the program counter. 4619 PC = (uint32_t) f; // Set the program counter.
4620 4620
4621 uint32_t res = reinterpret_cast<uint32_t>( 4621 uint32_t res = reinterpret_cast<uint32_t>(
4622 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4622 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4623 4623
4624 return res; 4624 return res;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4658 Isolate* isolate = CcTest::i_isolate(); 4658 Isolate* isolate = CcTest::i_isolate();
4659 HandleScope scope(isolate); 4659 HandleScope scope(isolate);
4660 4660
4661 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4661 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4662 4662
4663 __ auipc(v0, offset); 4663 __ auipc(v0, offset);
4664 __ jr(ra); 4664 __ jr(ra);
4665 __ nop(); 4665 __ nop();
4666 4666
4667 CodeDesc desc; 4667 CodeDesc desc;
4668 assm.GetCode(&desc); 4668 assm.GetCode(isolate, &desc);
4669 Handle<Code> code = isolate->factory()->NewCode( 4669 Handle<Code> code = isolate->factory()->NewCode(
4670 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4670 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4671 4671
4672 F2 f = FUNCTION_CAST<F2>(code->entry()); 4672 F2 f = FUNCTION_CAST<F2>(code->entry());
4673 PC = (uint32_t) f; // Set the program counter. 4673 PC = (uint32_t) f; // Set the program counter.
4674 4674
4675 uint32_t res = reinterpret_cast<uint32_t>( 4675 uint32_t res = reinterpret_cast<uint32_t>(
4676 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4676 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4677 4677
4678 return res; 4678 return res;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
4734 uint32_t addiu_start_2 = 0x25000000; 4734 uint32_t addiu_start_2 = 0x25000000;
4735 for (int32_t i = 0x80000; i <= 0xbffff; ++i) { 4735 for (int32_t i = 0x80000; i <= 0xbffff; ++i) {
4736 uint32_t addiu_new = addiu_start_2 + i; 4736 uint32_t addiu_new = addiu_start_2 + i;
4737 __ dd(addiu_new); 4737 __ dd(addiu_new);
4738 } 4738 }
4739 4739
4740 __ jr(ra); 4740 __ jr(ra);
4741 __ nop(); 4741 __ nop();
4742 4742
4743 CodeDesc desc; 4743 CodeDesc desc;
4744 assm.GetCode(&desc); 4744 assm.GetCode(isolate, &desc);
4745 Handle<Code> code = isolate->factory()->NewCode( 4745 Handle<Code> code = isolate->factory()->NewCode(
4746 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4746 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4747 4747
4748 F2 f = FUNCTION_CAST<F2>(code->entry()); 4748 F2 f = FUNCTION_CAST<F2>(code->entry());
4749 4749
4750 uint32_t res = reinterpret_cast<uint32_t>( 4750 uint32_t res = reinterpret_cast<uint32_t>(
4751 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4751 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4752 4752
4753 return res; 4753 return res;
4754 } 4754 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
4818 __ mov(t0, ra); 4818 __ mov(t0, ra);
4819 __ jr(ra); 4819 __ jr(ra);
4820 __ nop(); 4820 __ nop();
4821 4821
4822 __ bind(&stop_execution); 4822 __ bind(&stop_execution);
4823 __ pop(ra); 4823 __ pop(ra);
4824 __ jr(ra); 4824 __ jr(ra);
4825 __ nop(); 4825 __ nop();
4826 4826
4827 CodeDesc desc; 4827 CodeDesc desc;
4828 assm.GetCode(&desc); 4828 assm.GetCode(isolate, &desc);
4829 Handle<Code> code = isolate->factory()->NewCode( 4829 Handle<Code> code = isolate->factory()->NewCode(
4830 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4830 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4831 4831
4832 F2 f = FUNCTION_CAST<F2>(code->entry()); 4832 F2 f = FUNCTION_CAST<F2>(code->entry());
4833 4833
4834 uint32_t res = reinterpret_cast<uint32_t>( 4834 uint32_t res = reinterpret_cast<uint32_t>(
4835 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4835 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4836 4836
4837 return res; 4837 return res;
4838 } 4838 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
4890 __ addiu(v0, v0, 0x1000); 4890 __ addiu(v0, v0, 0x1000);
4891 __ addiu(v0, v0, 0x2000); // <--- offset = 16 4891 __ addiu(v0, v0, 0x2000); // <--- offset = 16
4892 __ jr(ra); 4892 __ jr(ra);
4893 __ nop(); 4893 __ nop();
4894 4894
4895 __ bind(&stop_execution); 4895 __ bind(&stop_execution);
4896 __ jr(ra); 4896 __ jr(ra);
4897 __ nop(); 4897 __ nop();
4898 4898
4899 CodeDesc desc; 4899 CodeDesc desc;
4900 assm.GetCode(&desc); 4900 assm.GetCode(isolate, &desc);
4901 Handle<Code> code = isolate->factory()->NewCode( 4901 Handle<Code> code = isolate->factory()->NewCode(
4902 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4902 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4903 4903
4904 F2 f = FUNCTION_CAST<F2>(code->entry()); 4904 F2 f = FUNCTION_CAST<F2>(code->entry());
4905 4905
4906 uint32_t res = reinterpret_cast<uint32_t>( 4906 uint32_t res = reinterpret_cast<uint32_t>(
4907 CALL_GENERATED_CODE(isolate, f, value, 0, 0, 0, 0)); 4907 CALL_GENERATED_CODE(isolate, f, value, 0, 0, 0, 0));
4908 4908
4909 return res; 4909 return res;
4910 } 4910 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
4984 __ jr(ra); 4984 __ jr(ra);
4985 __ nop(); 4985 __ nop();
4986 4986
4987 __ bind(&get_program_counter); 4987 __ bind(&get_program_counter);
4988 __ mov(t0, ra); 4988 __ mov(t0, ra);
4989 __ jr(ra); 4989 __ jr(ra);
4990 __ nop(); 4990 __ nop();
4991 4991
4992 4992
4993 CodeDesc desc; 4993 CodeDesc desc;
4994 assm.GetCode(&desc); 4994 assm.GetCode(isolate, &desc);
4995 Handle<Code> code = isolate->factory()->NewCode( 4995 Handle<Code> code = isolate->factory()->NewCode(
4996 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4996 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4997 4997
4998 F2 f = FUNCTION_CAST<F2>(code->entry()); 4998 F2 f = FUNCTION_CAST<F2>(code->entry());
4999 4999
5000 uint32_t res = reinterpret_cast<uint32_t>( 5000 uint32_t res = reinterpret_cast<uint32_t>(
5001 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5001 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5002 5002
5003 return res; 5003 return res;
5004 } 5004 }
(...skipping 28 matching lines...) Expand all
5033 Isolate* isolate = CcTest::i_isolate(); 5033 Isolate* isolate = CcTest::i_isolate();
5034 HandleScope scope(isolate); 5034 HandleScope scope(isolate);
5035 5035
5036 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 5036 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
5037 5037
5038 __ addiupc(v0, imm19); 5038 __ addiupc(v0, imm19);
5039 __ jr(ra); 5039 __ jr(ra);
5040 __ nop(); 5040 __ nop();
5041 5041
5042 CodeDesc desc; 5042 CodeDesc desc;
5043 assm.GetCode(&desc); 5043 assm.GetCode(isolate, &desc);
5044 Handle<Code> code = isolate->factory()->NewCode( 5044 Handle<Code> code = isolate->factory()->NewCode(
5045 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5045 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5046 5046
5047 F2 f = FUNCTION_CAST<F2>(code->entry()); 5047 F2 f = FUNCTION_CAST<F2>(code->entry());
5048 PC = (uint32_t) f; // Set the program counter. 5048 PC = (uint32_t) f; // Set the program counter.
5049 5049
5050 uint32_t rs = reinterpret_cast<uint32_t>( 5050 uint32_t rs = reinterpret_cast<uint32_t>(
5051 CALL_GENERATED_CODE(isolate, f, imm19, 0, 0, 0, 0)); 5051 CALL_GENERATED_CODE(isolate, f, imm19, 0, 0, 0, 0));
5052 5052
5053 return rs; 5053 return rs;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
5116 5116
5117 for (int32_t i = 0; i <= 99; ++i) { 5117 for (int32_t i = 0; i <= 99; ++i) {
5118 __ addiu(v0, v0, 1); 5118 __ addiu(v0, v0, 1);
5119 } 5119 }
5120 5120
5121 __ pop(ra); 5121 __ pop(ra);
5122 __ jr(ra); 5122 __ jr(ra);
5123 __ nop(); 5123 __ nop();
5124 5124
5125 CodeDesc desc; 5125 CodeDesc desc;
5126 assm.GetCode(&desc); 5126 assm.GetCode(isolate, &desc);
5127 Handle<Code> code = isolate->factory()->NewCode( 5127 Handle<Code> code = isolate->factory()->NewCode(
5128 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5128 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5129 5129
5130 F2 f = FUNCTION_CAST<F2>(code->entry()); 5130 F2 f = FUNCTION_CAST<F2>(code->entry());
5131 5131
5132 int32_t res = reinterpret_cast<int32_t>( 5132 int32_t res = reinterpret_cast<int32_t>(
5133 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5133 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5134 5134
5135 return res; 5135 return res;
5136 } 5136 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
5198 __ jr(ra); // 2 5198 __ jr(ra); // 2
5199 __ nop(); // 3 5199 __ nop(); // 3
5200 5200
5201 for (int32_t i = 4; i <= 44; ++i) { 5201 for (int32_t i = 4; i <= 44; ++i) {
5202 __ dd(instruction_addiu); 5202 __ dd(instruction_addiu);
5203 } 5203 }
5204 __ jr(ra); 5204 __ jr(ra);
5205 __ nop(); 5205 __ nop();
5206 5206
5207 CodeDesc desc; 5207 CodeDesc desc;
5208 assm.GetCode(&desc); 5208 assm.GetCode(isolate, &desc);
5209 Handle<Code> code = isolate->factory()->NewCode( 5209 Handle<Code> code = isolate->factory()->NewCode(
5210 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5210 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5211 5211
5212 F2 f = FUNCTION_CAST<F2>(code->entry()); 5212 F2 f = FUNCTION_CAST<F2>(code->entry());
5213 5213
5214 int32_t res = reinterpret_cast<int32_t>( 5214 int32_t res = reinterpret_cast<int32_t>(
5215 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5215 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5216 5216
5217 return res; 5217 return res;
5218 } 5218 }
5219 5219
5220 5220
5221 uint32_t run_aui(uint32_t rs, uint16_t offset) { 5221 uint32_t run_aui(uint32_t rs, uint16_t offset) {
5222 Isolate* isolate = CcTest::i_isolate(); 5222 Isolate* isolate = CcTest::i_isolate();
5223 HandleScope scope(isolate); 5223 HandleScope scope(isolate);
5224 5224
5225 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 5225 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
5226 5226
5227 __ li(t0, rs); 5227 __ li(t0, rs);
5228 __ aui(v0, t0, offset); 5228 __ aui(v0, t0, offset);
5229 __ jr(ra); 5229 __ jr(ra);
5230 __ nop(); 5230 __ nop();
5231 5231
5232 CodeDesc desc; 5232 CodeDesc desc;
5233 assm.GetCode(&desc); 5233 assm.GetCode(isolate, &desc);
5234 Handle<Code> code = isolate->factory()->NewCode( 5234 Handle<Code> code = isolate->factory()->NewCode(
5235 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5235 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5236 5236
5237 F2 f = FUNCTION_CAST<F2>(code->entry()); 5237 F2 f = FUNCTION_CAST<F2>(code->entry());
5238 5238
5239 uint32_t res = 5239 uint32_t res =
5240 reinterpret_cast<uint32_t> 5240 reinterpret_cast<uint32_t>
5241 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5241 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5242 5242
5243 return res; 5243 return res;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
5314 5314
5315 __ mov(ra, t0); 5315 __ mov(ra, t0);
5316 __ jr(ra); 5316 __ jr(ra);
5317 __ nop(); 5317 __ nop();
5318 5318
5319 __ li(v0, 1); 5319 __ li(v0, 1);
5320 __ jr(ra); 5320 __ jr(ra);
5321 __ nop(); 5321 __ nop();
5322 5322
5323 CodeDesc desc; 5323 CodeDesc desc;
5324 assm.GetCode(&desc); 5324 assm.GetCode(isolate, &desc);
5325 Handle<Code> code = isolate->factory()->NewCode( 5325 Handle<Code> code = isolate->factory()->NewCode(
5326 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5326 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5327 5327
5328 F2 f = FUNCTION_CAST<F2>(code->entry()); 5328 F2 f = FUNCTION_CAST<F2>(code->entry());
5329 5329
5330 uint32_t res = reinterpret_cast<uint32_t>( 5330 uint32_t res = reinterpret_cast<uint32_t>(
5331 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5331 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5332 5332
5333 return res; 5333 return res;
5334 } 5334 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
5368 size_t nr_calls = kMaxBranchOffset / (2 * Instruction::kInstrSize) + 2; 5368 size_t nr_calls = kMaxBranchOffset / (2 * Instruction::kInstrSize) + 2;
5369 5369
5370 for (size_t i = 0; i < nr_calls; ++i) { 5370 for (size_t i = 0; i < nr_calls; ++i) {
5371 __ BranchShort(&done, eq, a0, Operand(a1)); 5371 __ BranchShort(&done, eq, a0, Operand(a1));
5372 } 5372 }
5373 __ bind(&done); 5373 __ bind(&done);
5374 __ Ret(USE_DELAY_SLOT); 5374 __ Ret(USE_DELAY_SLOT);
5375 __ mov(v0, zero_reg); 5375 __ mov(v0, zero_reg);
5376 5376
5377 CodeDesc desc; 5377 CodeDesc desc;
5378 assm.GetCode(&desc); 5378 assm.GetCode(isolate, &desc);
5379 Handle<Code> code = isolate->factory()->NewCode( 5379 Handle<Code> code = isolate->factory()->NewCode(
5380 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5380 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5381 F2 f = FUNCTION_CAST<F2>(code->entry()); 5381 F2 f = FUNCTION_CAST<F2>(code->entry());
5382 5382
5383 int32_t res = reinterpret_cast<int32_t>( 5383 int32_t res = reinterpret_cast<int32_t>(
5384 CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0)); 5384 CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0));
5385 CHECK_EQ(0, res); 5385 CHECK_EQ(0, res);
5386 } 5386 }
5387 5387
5388 template <class T> 5388 template <class T>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
5435 } else { 5435 } else {
5436 UNREACHABLE(); 5436 UNREACHABLE();
5437 } 5437 }
5438 5438
5439 func(assm); 5439 func(assm);
5440 5440
5441 __ jr(ra); 5441 __ jr(ra);
5442 __ nop(); 5442 __ nop();
5443 5443
5444 CodeDesc desc; 5444 CodeDesc desc;
5445 assm.GetCode(&desc); 5445 assm.GetCode(isolate, &desc);
5446 Handle<Code> code = isolate->factory()->NewCode( 5446 Handle<Code> code = isolate->factory()->NewCode(
5447 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5447 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5448 F3 f = FUNCTION_CAST<F3>(code->entry()); 5448 F3 f = FUNCTION_CAST<F3>(code->entry());
5449 5449
5450 const size_t kTableLength = sizeof(test_cases) / sizeof(TestCaseMaddMsub<T>); 5450 const size_t kTableLength = sizeof(test_cases) / sizeof(TestCaseMaddMsub<T>);
5451 TestCaseMaddMsub<T> tc; 5451 TestCaseMaddMsub<T> tc;
5452 for (size_t i = 0; i < kTableLength; i++) { 5452 for (size_t i = 0; i < kTableLength; i++) {
5453 tc.fr = test_cases[i].fr; 5453 tc.fr = test_cases[i].fr;
5454 tc.fs = test_cases[i].fs; 5454 tc.fs = test_cases[i].fs;
5455 tc.ft = test_cases[i].ft; 5455 tc.ft = test_cases[i].ft;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
5521 5521
5522 Label code_start; 5522 Label code_start;
5523 __ bind(&code_start); 5523 __ bind(&code_start);
5524 __ Subu(v0, zero_reg, imm); 5524 __ Subu(v0, zero_reg, imm);
5525 CHECK_EQ(assm.SizeOfCodeGeneratedSince(&code_start), 5525 CHECK_EQ(assm.SizeOfCodeGeneratedSince(&code_start),
5526 num_instr * Assembler::kInstrSize); 5526 num_instr * Assembler::kInstrSize);
5527 __ jr(ra); 5527 __ jr(ra);
5528 __ nop(); 5528 __ nop();
5529 5529
5530 CodeDesc desc; 5530 CodeDesc desc;
5531 assm.GetCode(&desc); 5531 assm.GetCode(isolate, &desc);
5532 Handle<Code> code = isolate->factory()->NewCode( 5532 Handle<Code> code = isolate->factory()->NewCode(
5533 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5533 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5534 F2 f = FUNCTION_CAST<F2>(code->entry()); 5534 F2 f = FUNCTION_CAST<F2>(code->entry());
5535 5535
5536 uint32_t res = reinterpret_cast<uint32_t>( 5536 uint32_t res = reinterpret_cast<uint32_t>(
5537 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5537 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5538 5538
5539 return res; 5539 return res;
5540 } 5540 }
5541 5541
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
5626 __ copy_s_h(t1, w2, 5); 5626 __ copy_s_h(t1, w2, 5);
5627 __ sw(t1, MemOperand(a0, offsetof(T, s16))); 5627 __ sw(t1, MemOperand(a0, offsetof(T, s16)));
5628 __ copy_s_w(t1, w4, 1); 5628 __ copy_s_w(t1, w4, 1);
5629 __ sw(t1, MemOperand(a0, offsetof(T, s32))); 5629 __ sw(t1, MemOperand(a0, offsetof(T, s32)));
5630 5630
5631 __ jr(ra); 5631 __ jr(ra);
5632 __ nop(); 5632 __ nop();
5633 } 5633 }
5634 5634
5635 CodeDesc desc; 5635 CodeDesc desc;
5636 assm.GetCode(&desc); 5636 assm.GetCode(isolate, &desc);
5637 Handle<Code> code = isolate->factory()->NewCode( 5637 Handle<Code> code = isolate->factory()->NewCode(
5638 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5638 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5639 #ifdef OBJECT_PRINT 5639 #ifdef OBJECT_PRINT
5640 code->Print(std::cout); 5640 code->Print(std::cout);
5641 #endif 5641 #endif
5642 F3 f = FUNCTION_CAST<F3>(code->entry()); 5642 F3 f = FUNCTION_CAST<F3>(code->entry());
5643 5643
5644 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 5644 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
5645 USE(dummy); 5645 USE(dummy);
5646 5646
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
5695 5695
5696 STORE_MSA_REG(w0, a0, t2) 5696 STORE_MSA_REG(w0, a0, t2)
5697 STORE_MSA_REG(w2, a1, t2) 5697 STORE_MSA_REG(w2, a1, t2)
5698 #undef STORE_MSA_REG 5698 #undef STORE_MSA_REG
5699 5699
5700 __ jr(ra); 5700 __ jr(ra);
5701 __ nop(); 5701 __ nop();
5702 } 5702 }
5703 5703
5704 CodeDesc desc; 5704 CodeDesc desc;
5705 assm.GetCode(&desc); 5705 assm.GetCode(isolate, &desc);
5706 Handle<Code> code = isolate->factory()->NewCode( 5706 Handle<Code> code = isolate->factory()->NewCode(
5707 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5707 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5708 #ifdef OBJECT_PRINT 5708 #ifdef OBJECT_PRINT
5709 code->Print(std::cout); 5709 code->Print(std::cout);
5710 #endif 5710 #endif
5711 F4 f = FUNCTION_CAST<F4>(code->entry()); 5711 F4 f = FUNCTION_CAST<F4>(code->entry());
5712 5712
5713 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0); 5713 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0);
5714 USE(dummy); 5714 USE(dummy);
5715 5715
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
5753 __ fill_w(w2, t1); 5753 __ fill_w(w2, t1);
5754 5754
5755 __ Sdc1(f0, MemOperand(a0, offsetof(T, d0))); 5755 __ Sdc1(f0, MemOperand(a0, offsetof(T, d0)));
5756 __ Sdc1(f2, MemOperand(a1, offsetof(T, d0))); 5756 __ Sdc1(f2, MemOperand(a1, offsetof(T, d0)));
5757 5757
5758 __ jr(ra); 5758 __ jr(ra);
5759 __ nop(); 5759 __ nop();
5760 } 5760 }
5761 5761
5762 CodeDesc desc; 5762 CodeDesc desc;
5763 assm.GetCode(&desc); 5763 assm.GetCode(isolate, &desc);
5764 Handle<Code> code = isolate->factory()->NewCode( 5764 Handle<Code> code = isolate->factory()->NewCode(
5765 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5765 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5766 #ifdef OBJECT_PRINT 5766 #ifdef OBJECT_PRINT
5767 code->Print(std::cout); 5767 code->Print(std::cout);
5768 #endif 5768 #endif
5769 F4 f = FUNCTION_CAST<F4>(code->entry()); 5769 F4 f = FUNCTION_CAST<F4>(code->entry());
5770 5770
5771 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0); 5771 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0);
5772 USE(dummy); 5772 USE(dummy);
5773 5773
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
5813 __ sw(t2, MemOperand(a0, 4)); 5813 __ sw(t2, MemOperand(a0, 4));
5814 __ copy_u_w(t2, w0, 2); 5814 __ copy_u_w(t2, w0, 2);
5815 __ sw(t2, MemOperand(a0, 8)); 5815 __ sw(t2, MemOperand(a0, 8));
5816 __ copy_u_w(t2, w0, 3); 5816 __ copy_u_w(t2, w0, 3);
5817 __ sw(t2, MemOperand(a0, 12)); 5817 __ sw(t2, MemOperand(a0, 12));
5818 5818
5819 __ jr(ra); 5819 __ jr(ra);
5820 __ nop(); 5820 __ nop();
5821 5821
5822 CodeDesc desc; 5822 CodeDesc desc;
5823 assm.GetCode(&desc); 5823 assm.GetCode(isolate, &desc);
5824 Handle<Code> code = isolate->factory()->NewCode( 5824 Handle<Code> code = isolate->factory()->NewCode(
5825 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5825 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5826 #ifdef OBJECT_PRINT 5826 #ifdef OBJECT_PRINT
5827 code->Print(std::cout); 5827 code->Print(std::cout);
5828 #endif 5828 #endif
5829 F3 f = FUNCTION_CAST<F3>(code->entry()); 5829 F3 f = FUNCTION_CAST<F3>(code->entry());
5830 5830
5831 (CALL_GENERATED_CODE(isolate, f, w, 0, 0, 0, 0)); 5831 (CALL_GENERATED_CODE(isolate, f, w, 0, 0, 0, 0));
5832 } 5832 }
5833 5833
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
5962 __ sw(t2, MemOperand(a0, 8)); 5962 __ sw(t2, MemOperand(a0, 8));
5963 __ copy_u_w(t2, w2, 3); 5963 __ copy_u_w(t2, w2, 3);
5964 __ sw(t2, MemOperand(a0, 12)); 5964 __ sw(t2, MemOperand(a0, 12));
5965 5965
5966 __ jr(ra); 5966 __ jr(ra);
5967 __ nop(); 5967 __ nop();
5968 5968
5969 #undef LOAD_W_REG 5969 #undef LOAD_W_REG
5970 5970
5971 CodeDesc desc; 5971 CodeDesc desc;
5972 assm.GetCode(&desc); 5972 assm.GetCode(isolate, &desc);
5973 Handle<Code> code = isolate->factory()->NewCode( 5973 Handle<Code> code = isolate->factory()->NewCode(
5974 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5974 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5975 #ifdef OBJECT_PRINT 5975 #ifdef OBJECT_PRINT
5976 code->Print(std::cout); 5976 code->Print(std::cout);
5977 #endif 5977 #endif
5978 F3 f = FUNCTION_CAST<F3>(code->entry()); 5978 F3 f = FUNCTION_CAST<F3>(code->entry());
5979 5979
5980 (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0)); 5980 (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
5981 5981
5982 uint64_t mask = i8 * 0x0101010101010101ull; 5982 uint64_t mask = i8 * 0x0101010101010101ull;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
6128 }; 6128 };
6129 6129
6130 for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) { 6130 for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) {
6131 run_msa_i8(SHF_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8); 6131 run_msa_i8(SHF_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
6132 run_msa_i8(SHF_H, tc[i].input_lo, tc[i].input_hi, tc[i].i8); 6132 run_msa_i8(SHF_H, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
6133 run_msa_i8(SHF_W, tc[i].input_lo, tc[i].input_hi, tc[i].i8); 6133 run_msa_i8(SHF_W, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
6134 } 6134 }
6135 } 6135 }
6136 6136
6137 #undef __ 6137 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | test/cctest/test-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698