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

Side by Side Diff: test/cctest/test-assembler-mips64.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-mips.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 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 int64_t res = reinterpret_cast<int64_t>( 70 int64_t res = reinterpret_cast<int64_t>(
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(0xabcL, res); 72 CHECK_EQ(0xabcL, 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((int64_t)0)); 95 __ Branch(&L, ne, v1, Operand((int64_t)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 int64_t res = reinterpret_cast<int64_t>( 106 int64_t res = reinterpret_cast<int64_t>(
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(1275L, res); 108 CHECK_EQ(1275L, res);
109 } 109 }
110 110
111 111
112 TEST(MIPS2) { 112 TEST(MIPS2) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 __ bind(&error); 239 __ bind(&error);
240 // Got an error. Return a wrong result. 240 // Got an error. Return a wrong result.
241 __ li(v0, 666); 241 __ li(v0, 666);
242 242
243 __ bind(&exit); 243 __ bind(&exit);
244 __ jr(ra); 244 __ jr(ra);
245 __ nop(); 245 __ nop();
246 246
247 CodeDesc desc; 247 CodeDesc desc;
248 assm.GetCode(&desc); 248 assm.GetCode(isolate, &desc);
249 Handle<Code> code = isolate->factory()->NewCode( 249 Handle<Code> code = isolate->factory()->NewCode(
250 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 250 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
251 F2 f = FUNCTION_CAST<F2>(code->entry()); 251 F2 f = FUNCTION_CAST<F2>(code->entry());
252 int64_t res = reinterpret_cast<int64_t>( 252 int64_t res = reinterpret_cast<int64_t>(
253 CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0)); 253 CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
254 254
255 CHECK_EQ(0x31415926L, res); 255 CHECK_EQ(0x31415926L, res);
256 } 256 }
257 257
258 258
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 __ div_s(f12, f10, f4); 341 __ div_s(f12, f10, f4);
342 __ Swc1(f12, MemOperand(a0, offsetof(T, ff))); // ff = fe / fa 342 __ Swc1(f12, MemOperand(a0, offsetof(T, ff))); // ff = fe / fa
343 343
344 __ sqrt_s(f14, f12); 344 __ sqrt_s(f14, f12);
345 __ Swc1(f14, MemOperand(a0, offsetof(T, fg))); 345 __ Swc1(f14, MemOperand(a0, offsetof(T, fg)));
346 346
347 __ jr(ra); 347 __ jr(ra);
348 __ nop(); 348 __ nop();
349 349
350 CodeDesc desc; 350 CodeDesc desc;
351 assm.GetCode(&desc); 351 assm.GetCode(isolate, &desc);
352 Handle<Code> code = isolate->factory()->NewCode( 352 Handle<Code> code = isolate->factory()->NewCode(
353 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 353 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
354 F3 f = FUNCTION_CAST<F3>(code->entry()); 354 F3 f = FUNCTION_CAST<F3>(code->entry());
355 // Double test values. 355 // Double test values.
356 t.a = 1.5e14; 356 t.a = 1.5e14;
357 t.b = 2.75e11; 357 t.b = 2.75e11;
358 t.c = 0.0; 358 t.c = 0.0;
359 t.d = 0.0; 359 t.d = 0.0;
360 t.e = 0.0; 360 t.e = 0.0;
361 t.f = 0.0; 361 t.f = 0.0;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 __ mfhc1(a4, f4); 435 __ mfhc1(a4, f4);
436 __ mfc1(a5, f4); 436 __ mfc1(a5, f4);
437 437
438 __ Sd(a4, MemOperand(a0, offsetof(T, high))); 438 __ Sd(a4, MemOperand(a0, offsetof(T, high)));
439 __ Sd(a5, MemOperand(a0, offsetof(T, low))); 439 __ Sd(a5, MemOperand(a0, offsetof(T, low)));
440 440
441 __ jr(ra); 441 __ jr(ra);
442 __ nop(); 442 __ nop();
443 443
444 CodeDesc desc; 444 CodeDesc desc;
445 assm.GetCode(&desc); 445 assm.GetCode(isolate, &desc);
446 Handle<Code> code = isolate->factory()->NewCode( 446 Handle<Code> code = isolate->factory()->NewCode(
447 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 447 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
448 F3 f = FUNCTION_CAST<F3>(code->entry()); 448 F3 f = FUNCTION_CAST<F3>(code->entry());
449 t.a = 1.5e22; 449 t.a = 1.5e22;
450 t.b = 2.75e11; 450 t.b = 2.75e11;
451 t.c = 17.17; 451 t.c = 17.17;
452 t.d = -2.75e11; 452 t.d = -2.75e11;
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
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 501
502 // Convert int in original j (a5) to double in b. 502 // Convert int in original j (a5) to double in b.
503 __ mtc1(a5, f14); 503 __ mtc1(a5, f14);
504 __ cvt_d_w(f2, f14); 504 __ cvt_d_w(f2, f14);
505 __ Sdc1(f2, MemOperand(a0, offsetof(T, b))); 505 __ Sdc1(f2, MemOperand(a0, offsetof(T, b)));
506 506
507 __ jr(ra); 507 __ jr(ra);
508 __ nop(); 508 __ nop();
509 509
510 CodeDesc desc; 510 CodeDesc desc;
511 assm.GetCode(&desc); 511 assm.GetCode(isolate, &desc);
512 Handle<Code> code = isolate->factory()->NewCode( 512 Handle<Code> code = isolate->factory()->NewCode(
513 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 513 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
514 F3 f = FUNCTION_CAST<F3>(code->entry()); 514 F3 f = FUNCTION_CAST<F3>(code->entry());
515 t.a = 1.5e4; 515 t.a = 1.5e4;
516 t.b = 2.75e8; 516 t.b = 2.75e8;
517 t.i = 12345678; 517 t.i = 12345678;
518 t.j = -100000; 518 t.j = -100000;
519 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 519 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
520 USE(dummy); 520 USE(dummy);
521 521
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 __ lui(t1, 0x3333); 571 __ lui(t1, 0x3333);
572 __ ori(t1, t1, 0x3333); 572 __ ori(t1, t1, 0x3333);
573 __ Sw(t1, MemOperand(a0, offsetof(T, r6))); 573 __ Sw(t1, MemOperand(a0, offsetof(T, r6)));
574 __ Lhu(t1, MemOperand(a0, offsetof(T, si))); 574 __ Lhu(t1, MemOperand(a0, offsetof(T, si)));
575 __ Sh(t1, MemOperand(a0, offsetof(T, r6))); 575 __ Sh(t1, MemOperand(a0, offsetof(T, r6)));
576 576
577 __ jr(ra); 577 __ jr(ra);
578 __ nop(); 578 __ nop();
579 579
580 CodeDesc desc; 580 CodeDesc desc;
581 assm.GetCode(&desc); 581 assm.GetCode(isolate, &desc);
582 Handle<Code> code = isolate->factory()->NewCode( 582 Handle<Code> code = isolate->factory()->NewCode(
583 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 583 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
584 F3 f = FUNCTION_CAST<F3>(code->entry()); 584 F3 f = FUNCTION_CAST<F3>(code->entry());
585 t.ui = 0x11223344; 585 t.ui = 0x11223344;
586 t.si = 0x99aabbcc; 586 t.si = 0x99aabbcc;
587 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 587 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
588 USE(dummy); 588 USE(dummy);
589 589
590 CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1); 590 CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1);
591 if (kArchEndian == kLittle) { 591 if (kArchEndian == kLittle) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 __ Sw(a4, MemOperand(a0, offsetof(T, result))); // Set true. 658 __ Sw(a4, MemOperand(a0, offsetof(T, result))); // Set true.
659 659
660 // This test-case should have additional tests. 660 // This test-case should have additional tests.
661 661
662 __ bind(&outa_here); 662 __ bind(&outa_here);
663 663
664 __ jr(ra); 664 __ jr(ra);
665 __ nop(); 665 __ nop();
666 666
667 CodeDesc desc; 667 CodeDesc desc;
668 assm.GetCode(&desc); 668 assm.GetCode(isolate, &desc);
669 Handle<Code> code = isolate->factory()->NewCode( 669 Handle<Code> code = isolate->factory()->NewCode(
670 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 670 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
671 F3 f = FUNCTION_CAST<F3>(code->entry()); 671 F3 f = FUNCTION_CAST<F3>(code->entry());
672 t.a = 1.5e14; 672 t.a = 1.5e14;
673 t.b = 2.75e11; 673 t.b = 2.75e11;
674 t.c = 2.0; 674 t.c = 2.0;
675 t.d = -4.0; 675 t.d = -4.0;
676 t.e = 0.0; 676 t.e = 0.0;
677 t.f = 0.0; 677 t.f = 0.0;
678 t.result = 0; 678 t.result = 0;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 __ Sw(a7, MemOperand(a0, offsetof(T, result_rotrv_12))); 756 __ Sw(a7, MemOperand(a0, offsetof(T, result_rotrv_12)));
757 __ Sw(t0, MemOperand(a0, offsetof(T, result_rotrv_16))); 757 __ Sw(t0, MemOperand(a0, offsetof(T, result_rotrv_16)));
758 __ Sw(t1, MemOperand(a0, offsetof(T, result_rotrv_20))); 758 __ Sw(t1, MemOperand(a0, offsetof(T, result_rotrv_20)));
759 __ Sw(t2, MemOperand(a0, offsetof(T, result_rotrv_24))); 759 __ Sw(t2, MemOperand(a0, offsetof(T, result_rotrv_24)));
760 __ Sw(t3, MemOperand(a0, offsetof(T, result_rotrv_28))); 760 __ Sw(t3, MemOperand(a0, offsetof(T, result_rotrv_28)));
761 761
762 __ jr(ra); 762 __ jr(ra);
763 __ nop(); 763 __ nop();
764 764
765 CodeDesc desc; 765 CodeDesc desc;
766 assm.GetCode(&desc); 766 assm.GetCode(isolate, &desc);
767 Handle<Code> code = isolate->factory()->NewCode( 767 Handle<Code> code = isolate->factory()->NewCode(
768 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 768 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
769 F3 f = FUNCTION_CAST<F3>(code->entry()); 769 F3 f = FUNCTION_CAST<F3>(code->entry());
770 t.input = 0x12345678; 770 t.input = 0x12345678;
771 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0x0, 0, 0, 0); 771 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0x0, 0, 0, 0);
772 USE(dummy); 772 USE(dummy);
773 CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4); 773 CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4);
774 CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8); 774 CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8);
775 CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotr_12); 775 CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotr_12);
776 CHECK_EQ(static_cast<int32_t>(0x56781234), t.result_rotr_16); 776 CHECK_EQ(static_cast<int32_t>(0x56781234), t.result_rotr_16);
(...skipping 25 matching lines...) Expand all
802 __ Branch(&exit2, ge, a0, Operand(0x00001FFF)); 802 __ Branch(&exit2, ge, a0, Operand(0x00001FFF));
803 __ Branch(&exit3, ge, a0, Operand(0x0001FFFF)); 803 __ Branch(&exit3, ge, a0, Operand(0x0001FFFF));
804 804
805 __ bind(&exit); 805 __ bind(&exit);
806 __ bind(&exit2); 806 __ bind(&exit2);
807 __ bind(&exit3); 807 __ bind(&exit3);
808 __ jr(ra); 808 __ jr(ra);
809 __ nop(); 809 __ nop();
810 810
811 CodeDesc desc; 811 CodeDesc desc;
812 assm.GetCode(&desc); 812 assm.GetCode(isolate, &desc);
813 isolate->factory()->NewCode( 813 isolate->factory()->NewCode(
814 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 814 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
815 } 815 }
816 816
817 817
818 TEST(MIPS10) { 818 TEST(MIPS10) {
819 // Test conversions between doubles and long integers. 819 // Test conversions between doubles and long integers.
820 // Test hos the long ints map to FP regs pairs. 820 // Test hos the long ints map to FP regs pairs.
821 CcTest::InitializeVM(); 821 CcTest::InitializeVM();
822 Isolate* isolate = CcTest::i_isolate(); 822 Isolate* isolate = CcTest::i_isolate();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 // Convert double b back to long-int. 878 // Convert double b back to long-int.
879 __ Ldc1(f31, MemOperand(a0, offsetof(T, b))); 879 __ Ldc1(f31, MemOperand(a0, offsetof(T, b)));
880 __ cvt_l_d(f31, f31); 880 __ cvt_l_d(f31, f31);
881 __ dmfc1(a7, f31); 881 __ dmfc1(a7, f31);
882 __ Sd(a7, MemOperand(a0, offsetof(T, b_long_as_int64))); 882 __ Sd(a7, MemOperand(a0, offsetof(T, b_long_as_int64)));
883 883
884 __ jr(ra); 884 __ jr(ra);
885 __ nop(); 885 __ nop();
886 886
887 CodeDesc desc; 887 CodeDesc desc;
888 assm.GetCode(&desc); 888 assm.GetCode(isolate, &desc);
889 Handle<Code> code = isolate->factory()->NewCode( 889 Handle<Code> code = isolate->factory()->NewCode(
890 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 890 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
891 F3 f = FUNCTION_CAST<F3>(code->entry()); 891 F3 f = FUNCTION_CAST<F3>(code->entry());
892 t.a = 2.147483647e9; // 0x7fffffff -> 0x41DFFFFFFFC00000 as double. 892 t.a = 2.147483647e9; // 0x7fffffff -> 0x41DFFFFFFFC00000 as double.
893 t.b_long_hi = 0x000000ff; // 0xFF00FF00FF -> 0x426FE01FE01FE000 as double. 893 t.b_long_hi = 0x000000ff; // 0xFF00FF00FF -> 0x426FE01FE01FE000 as double.
894 t.b_long_lo = 0x00ff00ff; 894 t.b_long_lo = 0x00ff00ff;
895 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 895 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
896 USE(dummy); 896 USE(dummy);
897 897
898 CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp); 898 CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 1014
1015 __ Lw(a7, MemOperand(a0, offsetof(T, mem_init))); 1015 __ Lw(a7, MemOperand(a0, offsetof(T, mem_init)));
1016 __ Sw(a7, MemOperand(a0, offsetof(T, swr_3))); 1016 __ Sw(a7, MemOperand(a0, offsetof(T, swr_3)));
1017 __ Lw(a7, MemOperand(a0, offsetof(T, reg_init))); 1017 __ Lw(a7, MemOperand(a0, offsetof(T, reg_init)));
1018 __ swr(a7, MemOperand(a0, offsetof(T, swr_3) + 3)); 1018 __ swr(a7, MemOperand(a0, offsetof(T, swr_3) + 3));
1019 1019
1020 __ jr(ra); 1020 __ jr(ra);
1021 __ nop(); 1021 __ nop();
1022 1022
1023 CodeDesc desc; 1023 CodeDesc desc;
1024 assm.GetCode(&desc); 1024 assm.GetCode(isolate, &desc);
1025 Handle<Code> code = isolate->factory()->NewCode( 1025 Handle<Code> code = isolate->factory()->NewCode(
1026 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1026 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1027 F3 f = FUNCTION_CAST<F3>(code->entry()); 1027 F3 f = FUNCTION_CAST<F3>(code->entry());
1028 t.reg_init = 0xaabbccdd; 1028 t.reg_init = 0xaabbccdd;
1029 t.mem_init = 0x11223344; 1029 t.mem_init = 0x11223344;
1030 1030
1031 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 1031 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
1032 USE(dummy); 1032 USE(dummy);
1033 1033
1034 if (kArchEndian == kLittle) { 1034 if (kArchEndian == kLittle) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 __ push(a5); 1139 __ push(a5);
1140 __ Lw(a6, MemOperand(fp, offsetof(T, y))); 1140 __ Lw(a6, MemOperand(fp, offsetof(T, y)));
1141 __ pop(a7); 1141 __ pop(a7);
1142 __ nop(); 1142 __ nop();
1143 1143
1144 __ mov(fp, t2); 1144 __ mov(fp, t2);
1145 __ jr(ra); 1145 __ jr(ra);
1146 __ nop(); 1146 __ nop();
1147 1147
1148 CodeDesc desc; 1148 CodeDesc desc;
1149 assm.GetCode(&desc); 1149 assm.GetCode(isolate, &desc);
1150 Handle<Code> code = isolate->factory()->NewCode( 1150 Handle<Code> code = isolate->factory()->NewCode(
1151 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1151 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1152 F3 f = FUNCTION_CAST<F3>(code->entry()); 1152 F3 f = FUNCTION_CAST<F3>(code->entry());
1153 t.x = 1; 1153 t.x = 1;
1154 t.y = 2; 1154 t.y = 2;
1155 t.y1 = 3; 1155 t.y1 = 3;
1156 t.y2 = 4; 1156 t.y2 = 4;
1157 t.y3 = 0XBABA; 1157 t.y3 = 0XBABA;
1158 t.y4 = 0xDEDA; 1158 t.y4 = 0xDEDA;
1159 1159
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 __ Cvt_d_uw(f8, a4); 1193 __ Cvt_d_uw(f8, a4);
1194 __ Sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out))); 1194 __ Sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out)));
1195 1195
1196 __ Trunc_uw_d(f8, f8, f4); 1196 __ Trunc_uw_d(f8, f8, f4);
1197 __ Swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out))); 1197 __ Swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out)));
1198 1198
1199 __ jr(ra); 1199 __ jr(ra);
1200 __ nop(); 1200 __ nop();
1201 1201
1202 CodeDesc desc; 1202 CodeDesc desc;
1203 assm.GetCode(&desc); 1203 assm.GetCode(isolate, &desc);
1204 Handle<Code> code = isolate->factory()->NewCode( 1204 Handle<Code> code = isolate->factory()->NewCode(
1205 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1205 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1206 F3 f = FUNCTION_CAST<F3>(code->entry()); 1206 F3 f = FUNCTION_CAST<F3>(code->entry());
1207 1207
1208 t.cvt_big_in = 0xFFFFFFFF; 1208 t.cvt_big_in = 0xFFFFFFFF;
1209 t.cvt_small_in = 333; 1209 t.cvt_small_in = 333;
1210 1210
1211 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 1211 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
1212 USE(dummy); 1212 USE(dummy);
1213 1213
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 RUN_ROUND_TEST(trunc) 1314 RUN_ROUND_TEST(trunc)
1315 RUN_ROUND_TEST(cvt) 1315 RUN_ROUND_TEST(cvt)
1316 1316
1317 // Restore FCSR. 1317 // Restore FCSR.
1318 __ ctc1(a1, FCSR); 1318 __ ctc1(a1, FCSR);
1319 1319
1320 __ jr(ra); 1320 __ jr(ra);
1321 __ nop(); 1321 __ nop();
1322 1322
1323 CodeDesc desc; 1323 CodeDesc desc;
1324 assm.GetCode(&desc); 1324 assm.GetCode(isolate, &desc);
1325 Handle<Code> code = isolate->factory()->NewCode( 1325 Handle<Code> code = isolate->factory()->NewCode(
1326 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1326 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1327 F3 f = FUNCTION_CAST<F3>(code->entry()); 1327 F3 f = FUNCTION_CAST<F3>(code->entry());
1328 1328
1329 t.round_up_in = 123.51; 1329 t.round_up_in = 123.51;
1330 t.round_down_in = 123.49; 1330 t.round_down_in = 123.49;
1331 t.neg_round_up_in = -123.5; 1331 t.neg_round_up_in = -123.5;
1332 t.neg_round_down_in = -123.49; 1332 t.neg_round_down_in = -123.49;
1333 t.err1_in = 123.51; 1333 t.err1_in = 123.51;
1334 t.err2_in = 1; 1334 t.err2_in = 1;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 // sh writes only 1/2 of word. 1444 // sh writes only 1/2 of word.
1445 __ Lw(a4, MemOperand(a0, offsetof(T, ui))); 1445 __ Lw(a4, MemOperand(a0, offsetof(T, ui)));
1446 __ Sh(a4, MemOperand(a0, offsetof(T, r11))); 1446 __ Sh(a4, MemOperand(a0, offsetof(T, r11)));
1447 __ Lw(a4, MemOperand(a0, offsetof(T, si))); 1447 __ Lw(a4, MemOperand(a0, offsetof(T, si)));
1448 __ Sh(a4, MemOperand(a0, offsetof(T, r12))); 1448 __ Sh(a4, MemOperand(a0, offsetof(T, r12)));
1449 1449
1450 __ jr(ra); 1450 __ jr(ra);
1451 __ nop(); 1451 __ nop();
1452 1452
1453 CodeDesc desc; 1453 CodeDesc desc;
1454 assm.GetCode(&desc); 1454 assm.GetCode(isolate, &desc);
1455 Handle<Code> code = isolate->factory()->NewCode( 1455 Handle<Code> code = isolate->factory()->NewCode(
1456 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1456 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1457 F3 f = FUNCTION_CAST<F3>(code->entry()); 1457 F3 f = FUNCTION_CAST<F3>(code->entry());
1458 t.ui = 0x44332211; 1458 t.ui = 0x44332211;
1459 t.si = 0x99aabbcc; 1459 t.si = 0x99aabbcc;
1460 t.r1 = 0x5555555555555555; 1460 t.r1 = 0x5555555555555555;
1461 t.r2 = 0x5555555555555555; 1461 t.r2 = 0x5555555555555555;
1462 t.r3 = 0x5555555555555555; 1462 t.r3 = 0x5555555555555555;
1463 t.r4 = 0x5555555555555555; 1463 t.r4 = 0x5555555555555555;
1464 t.r5 = 0x5555555555555555; 1464 t.r5 = 0x5555555555555555;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 __ selnez_d(f6, f0, f2); 1573 __ selnez_d(f6, f0, f2);
1574 __ seleqz_s(f12, f8, f10); 1574 __ seleqz_s(f12, f8, f10);
1575 __ selnez_s(f14, f8, f10); 1575 __ selnez_s(f14, f8, f10);
1576 __ Sdc1(f4, MemOperand(a0, offsetof(Test, g))); // src 1576 __ Sdc1(f4, MemOperand(a0, offsetof(Test, g))); // src
1577 __ Sdc1(f6, MemOperand(a0, offsetof(Test, h))); // src 1577 __ Sdc1(f6, MemOperand(a0, offsetof(Test, h))); // src
1578 __ Swc1(f12, MemOperand(a0, offsetof(Test, k))); // src 1578 __ Swc1(f12, MemOperand(a0, offsetof(Test, k))); // src
1579 __ Swc1(f14, MemOperand(a0, offsetof(Test, l))); // src 1579 __ Swc1(f14, MemOperand(a0, offsetof(Test, l))); // src
1580 __ jr(ra); 1580 __ jr(ra);
1581 __ nop(); 1581 __ nop();
1582 CodeDesc desc; 1582 CodeDesc desc;
1583 assm.GetCode(&desc); 1583 assm.GetCode(isolate, &desc);
1584 Handle<Code> code = isolate->factory()->NewCode( 1584 Handle<Code> code = isolate->factory()->NewCode(
1585 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1585 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1586 F3 f = FUNCTION_CAST<F3>(code->entry()); 1586 F3 f = FUNCTION_CAST<F3>(code->entry());
1587 1587
1588 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 1588 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
1589 1589
1590 CHECK_EQ(1, test.a); 1590 CHECK_EQ(1, test.a);
1591 CHECK_EQ(0, test.b); 1591 CHECK_EQ(0, test.b);
1592 CHECK_EQ(0, test.c); 1592 CHECK_EQ(0, test.c);
1593 CHECK_EQ(1, test.d); 1593 CHECK_EQ(1, test.d);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 __ min_s(f14, f2, f6); 1689 __ min_s(f14, f2, f6);
1690 __ max_s(f16, f2, f6); 1690 __ max_s(f16, f2, f6);
1691 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, c))); 1691 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, c)));
1692 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, d))); 1692 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, d)));
1693 __ Swc1(f14, MemOperand(a0, offsetof(TestFloat, g))); 1693 __ Swc1(f14, MemOperand(a0, offsetof(TestFloat, g)));
1694 __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, h))); 1694 __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, h)));
1695 __ jr(ra); 1695 __ jr(ra);
1696 __ nop(); 1696 __ nop();
1697 1697
1698 CodeDesc desc; 1698 CodeDesc desc;
1699 assm.GetCode(&desc); 1699 assm.GetCode(isolate, &desc);
1700 Handle<Code> code = isolate->factory()->NewCode( 1700 Handle<Code> code = isolate->factory()->NewCode(
1701 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1701 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1702 F3 f = FUNCTION_CAST<F3>(code->entry()); 1702 F3 f = FUNCTION_CAST<F3>(code->entry());
1703 for (int i = 4; i < kTableLength; i++) { 1703 for (int i = 4; i < kTableLength; i++) {
1704 test.a = inputsa[i]; 1704 test.a = inputsa[i];
1705 test.b = inputsb[i]; 1705 test.b = inputsb[i];
1706 test.e = inputse[i]; 1706 test.e = inputse[i];
1707 test.f = inputsf[i]; 1707 test.f = inputsf[i];
1708 1708
1709 CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0); 1709 CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 double* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM}; 1798 double* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM};
1799 __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a))); 1799 __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
1800 __ Lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr))); 1800 __ Lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)));
1801 __ ctc1(t0, FCSR); 1801 __ ctc1(t0, FCSR);
1802 __ rint_d(f8, f4); 1802 __ rint_d(f8, f4);
1803 __ Sdc1(f8, MemOperand(a0, offsetof(TestFloat, b))); 1803 __ Sdc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
1804 __ jr(ra); 1804 __ jr(ra);
1805 __ nop(); 1805 __ nop();
1806 1806
1807 CodeDesc desc; 1807 CodeDesc desc;
1808 assm.GetCode(&desc); 1808 assm.GetCode(isolate, &desc);
1809 Handle<Code> code = isolate->factory()->NewCode( 1809 Handle<Code> code = isolate->factory()->NewCode(
1810 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1810 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1811 F3 f = FUNCTION_CAST<F3>(code->entry()); 1811 F3 f = FUNCTION_CAST<F3>(code->entry());
1812 1812
1813 for (int j = 0; j < 4; j++) { 1813 for (int j = 0; j < 4; j++) {
1814 test.fcsr = fcsr_inputs[j]; 1814 test.fcsr = fcsr_inputs[j];
1815 for (int i = 0; i < kTableLength; i++) { 1815 for (int i = 0; i < kTableLength; i++) {
1816 test.a = inputs[i]; 1816 test.a = inputs[i];
1817 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 1817 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
1818 CHECK_EQ(test.b, outputs[j][i]); 1818 CHECK_EQ(test.b, outputs[j][i]);
(...skipping 27 matching lines...) Expand all
1846 __ Lwc1(f6, MemOperand(a0, offsetof(Test, fd))); // test 1846 __ Lwc1(f6, MemOperand(a0, offsetof(Test, fd))); // test
1847 __ Lwc1(f8, MemOperand(a0, offsetof(Test, fs))); // src1 1847 __ Lwc1(f8, MemOperand(a0, offsetof(Test, fs))); // src1
1848 __ Lwc1(f10, MemOperand(a0, offsetof(Test, ft))); // src2 1848 __ Lwc1(f10, MemOperand(a0, offsetof(Test, ft))); // src2
1849 __ sel_d(f0, f2, f4); 1849 __ sel_d(f0, f2, f4);
1850 __ sel_s(f6, f8, f10); 1850 __ sel_s(f6, f8, f10);
1851 __ Sdc1(f0, MemOperand(a0, offsetof(Test, dd))); 1851 __ Sdc1(f0, MemOperand(a0, offsetof(Test, dd)));
1852 __ Swc1(f6, MemOperand(a0, offsetof(Test, fd))); 1852 __ Swc1(f6, MemOperand(a0, offsetof(Test, fd)));
1853 __ jr(ra); 1853 __ jr(ra);
1854 __ nop(); 1854 __ nop();
1855 CodeDesc desc; 1855 CodeDesc desc;
1856 assm.GetCode(&desc); 1856 assm.GetCode(isolate, &desc);
1857 Handle<Code> code = isolate->factory()->NewCode( 1857 Handle<Code> code = isolate->factory()->NewCode(
1858 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1858 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1859 F3 f = FUNCTION_CAST<F3>(code->entry()); 1859 F3 f = FUNCTION_CAST<F3>(code->entry());
1860 1860
1861 const int test_size = 3; 1861 const int test_size = 3;
1862 const int input_size = 5; 1862 const int input_size = 5;
1863 1863
1864 double inputs_dt[input_size] = {0.0, 65.2, -70.32, 1864 double inputs_dt[input_size] = {0.0, 65.2, -70.32,
1865 18446744073709551621.0, -18446744073709551621.0}; 1865 18446744073709551621.0, -18446744073709551621.0};
1866 double inputs_ds[input_size] = {0.1, 69.88, -91.325, 1866 double inputs_ds[input_size] = {0.1, 69.88, -91.325,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 __ Lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr))); 1979 __ Lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)));
1980 __ cfc1(t1, FCSR); 1980 __ cfc1(t1, FCSR);
1981 __ ctc1(t0, FCSR); 1981 __ ctc1(t0, FCSR);
1982 __ rint_s(f8, f4); 1982 __ rint_s(f8, f4);
1983 __ Swc1(f8, MemOperand(a0, offsetof(TestFloat, b))); 1983 __ Swc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
1984 __ ctc1(t1, FCSR); 1984 __ ctc1(t1, FCSR);
1985 __ jr(ra); 1985 __ jr(ra);
1986 __ nop(); 1986 __ nop();
1987 1987
1988 CodeDesc desc; 1988 CodeDesc desc;
1989 assm.GetCode(&desc); 1989 assm.GetCode(isolate, &desc);
1990 Handle<Code> code = isolate->factory()->NewCode( 1990 Handle<Code> code = isolate->factory()->NewCode(
1991 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1991 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1992 F3 f = FUNCTION_CAST<F3>(code->entry()); 1992 F3 f = FUNCTION_CAST<F3>(code->entry());
1993 1993
1994 for (int j = 0; j < 4; j++) { 1994 for (int j = 0; j < 4; j++) {
1995 test.fcsr = fcsr_inputs[j]; 1995 test.fcsr = fcsr_inputs[j];
1996 for (int i = 0; i < kTableLength; i++) { 1996 for (int i = 0; i < kTableLength; i++) {
1997 test.a = inputs[i]; 1997 test.a = inputs[i];
1998 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 1998 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
1999 CHECK_EQ(test.b, outputs[j][i]); 1999 CHECK_EQ(test.b, outputs[j][i]);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 __ maxa_d(f14, f2, f4); 2065 __ maxa_d(f14, f2, f4);
2066 __ maxa_s(f16, f8, f10); 2066 __ maxa_s(f16, f8, f10);
2067 __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, resf))); 2067 __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, resf)));
2068 __ Sdc1(f6, MemOperand(a0, offsetof(TestFloat, resd))); 2068 __ Sdc1(f6, MemOperand(a0, offsetof(TestFloat, resd)));
2069 __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, resf1))); 2069 __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, resf1)));
2070 __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resd1))); 2070 __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resd1)));
2071 __ jr(ra); 2071 __ jr(ra);
2072 __ nop(); 2072 __ nop();
2073 2073
2074 CodeDesc desc; 2074 CodeDesc desc;
2075 assm.GetCode(&desc); 2075 assm.GetCode(isolate, &desc);
2076 Handle<Code> code = isolate->factory()->NewCode( 2076 Handle<Code> code = isolate->factory()->NewCode(
2077 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2077 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2078 F3 f = FUNCTION_CAST<F3>(code->entry()); 2078 F3 f = FUNCTION_CAST<F3>(code->entry());
2079 for (int i = 0; i < kTableLength; i++) { 2079 for (int i = 0; i < kTableLength; i++) {
2080 test.a = inputsa[i]; 2080 test.a = inputsa[i];
2081 test.b = inputsb[i]; 2081 test.b = inputsb[i];
2082 test.c = inputsc[i]; 2082 test.c = inputsc[i];
2083 test.d = inputsd[i]; 2083 test.d = inputsd[i];
2084 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2084 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2085 2085
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2147 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2148 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b))); 2148 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
2149 __ trunc_l_d(f8, f4); 2149 __ trunc_l_d(f8, f4);
2150 __ trunc_l_s(f10, f6); 2150 __ trunc_l_s(f10, f6);
2151 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c))); 2151 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
2152 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d))); 2152 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
2153 __ jr(ra); 2153 __ jr(ra);
2154 __ nop(); 2154 __ nop();
2155 Test test; 2155 Test test;
2156 CodeDesc desc; 2156 CodeDesc desc;
2157 assm.GetCode(&desc); 2157 assm.GetCode(isolate, &desc);
2158 Handle<Code> code = isolate->factory()->NewCode( 2158 Handle<Code> code = isolate->factory()->NewCode(
2159 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2159 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2160 F3 f = FUNCTION_CAST<F3>(code->entry()); 2160 F3 f = FUNCTION_CAST<F3>(code->entry());
2161 for (int i = 0; i < kTableLength; i++) { 2161 for (int i = 0; i < kTableLength; i++) {
2162 test.a = inputs_D[i]; 2162 test.a = inputs_D[i];
2163 test.b = inputs_S[i]; 2163 test.b = inputs_S[i];
2164 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2164 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2165 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && 2165 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
2166 kArchVariant == kMips64r6) { 2166 kArchVariant == kMips64r6) {
2167 CHECK_EQ(test.c, outputsNaN2008[i]); 2167 CHECK_EQ(test.c, outputsNaN2008[i]);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 __ movn_s(f14, f6, t0); 2228 __ movn_s(f14, f6, t0);
2229 __ movn_d(f16, f2, t0); 2229 __ movn_d(f16, f2, t0);
2230 __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, d))); 2230 __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, d)));
2231 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, b))); 2231 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, b)));
2232 __ Swc1(f14, MemOperand(a0, offsetof(TestFloat, d1))); 2232 __ Swc1(f14, MemOperand(a0, offsetof(TestFloat, d1)));
2233 __ Sdc1(f16, MemOperand(a0, offsetof(TestFloat, b1))); 2233 __ Sdc1(f16, MemOperand(a0, offsetof(TestFloat, b1)));
2234 __ jr(ra); 2234 __ jr(ra);
2235 __ nop(); 2235 __ nop();
2236 2236
2237 CodeDesc desc; 2237 CodeDesc desc;
2238 assm.GetCode(&desc); 2238 assm.GetCode(isolate, &desc);
2239 Handle<Code> code = isolate->factory()->NewCode( 2239 Handle<Code> code = isolate->factory()->NewCode(
2240 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2240 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2241 F3 f = FUNCTION_CAST<F3>(code->entry()); 2241 F3 f = FUNCTION_CAST<F3>(code->entry());
2242 for (int i = 0; i < kTableLength; i++) { 2242 for (int i = 0; i < kTableLength; i++) {
2243 test.a = inputs_D[i]; 2243 test.a = inputs_D[i];
2244 test.c = inputs_S[i]; 2244 test.c = inputs_S[i];
2245 2245
2246 test.rt = 1; 2246 test.rt = 1;
2247 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2247 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2248 CHECK_EQ(test.b, test.bold); 2248 CHECK_EQ(test.b, test.bold);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold1))); 2329 __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold1)));
2330 __ movf_s(f12, f4, test.cc); 2330 __ movf_s(f12, f4, test.cc);
2331 __ movf_d(f10, f2, test.cc); 2331 __ movf_d(f10, f2, test.cc);
2332 __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf1))); 2332 __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf1)));
2333 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd1))); 2333 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd1)));
2334 __ ctc1(t0, FCSR); 2334 __ ctc1(t0, FCSR);
2335 __ jr(ra); 2335 __ jr(ra);
2336 __ nop(); 2336 __ nop();
2337 2337
2338 CodeDesc desc; 2338 CodeDesc desc;
2339 assm.GetCode(&desc); 2339 assm.GetCode(isolate, &desc);
2340 Handle<Code> code = isolate->factory()->NewCode( 2340 Handle<Code> code = isolate->factory()->NewCode(
2341 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2341 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2342 F3 f = FUNCTION_CAST<F3>(code->entry()); 2342 F3 f = FUNCTION_CAST<F3>(code->entry());
2343 2343
2344 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2344 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2345 CHECK_EQ(test.dstf, outputs_S[i]); 2345 CHECK_EQ(test.dstf, outputs_S[i]);
2346 CHECK_EQ(test.dstd, outputs_D[i]); 2346 CHECK_EQ(test.dstd, outputs_D[i]);
2347 CHECK_EQ(test.dstf1, test.dstfold1); 2347 CHECK_EQ(test.dstf1, test.dstfold1);
2348 CHECK_EQ(test.dstd1, test.dstdold1); 2348 CHECK_EQ(test.dstd1, test.dstdold1);
2349 test.fcsr = 0; 2349 test.fcsr = 0;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 __ Lw(t0, MemOperand(a0, offsetof(Test, fcsr))); 2415 __ Lw(t0, MemOperand(a0, offsetof(Test, fcsr)));
2416 __ cfc1(t1, FCSR); 2416 __ cfc1(t1, FCSR);
2417 __ ctc1(t0, FCSR); 2417 __ ctc1(t0, FCSR);
2418 __ cvt_w_d(f8, f4); 2418 __ cvt_w_d(f8, f4);
2419 __ Swc1(f8, MemOperand(a0, offsetof(Test, b))); 2419 __ Swc1(f8, MemOperand(a0, offsetof(Test, b)));
2420 __ ctc1(t1, FCSR); 2420 __ ctc1(t1, FCSR);
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 j = 0; j < 4; j++) { 2429 for (int j = 0; j < 4; j++) {
2430 test.fcsr = fcsr_inputs[j]; 2430 test.fcsr = fcsr_inputs[j];
2431 for (int i = 0; i < kTableLength; i++) { 2431 for (int i = 0; i < kTableLength; i++) {
2432 test.a = inputs[i]; 2432 test.a = inputs[i];
2433 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2433 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2434 CHECK_EQ(test.b, outputs[j][i]); 2434 CHECK_EQ(test.b, outputs[j][i]);
2435 } 2435 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2482 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2483 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b))); 2483 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
2484 __ trunc_w_d(f8, f4); 2484 __ trunc_w_d(f8, f4);
2485 __ trunc_w_s(f10, f6); 2485 __ trunc_w_s(f10, f6);
2486 __ Swc1(f8, MemOperand(a0, offsetof(Test, c))); 2486 __ Swc1(f8, MemOperand(a0, offsetof(Test, c)));
2487 __ Swc1(f10, MemOperand(a0, offsetof(Test, d))); 2487 __ Swc1(f10, MemOperand(a0, offsetof(Test, d)));
2488 __ jr(ra); 2488 __ jr(ra);
2489 __ nop(); 2489 __ nop();
2490 Test test; 2490 Test test;
2491 CodeDesc desc; 2491 CodeDesc desc;
2492 assm.GetCode(&desc); 2492 assm.GetCode(isolate, &desc);
2493 Handle<Code> code = isolate->factory()->NewCode( 2493 Handle<Code> code = isolate->factory()->NewCode(
2494 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2494 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2495 F3 f = FUNCTION_CAST<F3>(code->entry()); 2495 F3 f = FUNCTION_CAST<F3>(code->entry());
2496 for (int i = 0; i < kTableLength; i++) { 2496 for (int i = 0; i < kTableLength; i++) {
2497 test.a = inputs_D[i]; 2497 test.a = inputs_D[i];
2498 test.b = inputs_S[i]; 2498 test.b = inputs_S[i];
2499 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2499 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2500 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) { 2500 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) {
2501 CHECK_EQ(test.c, outputsNaN2008[i]); 2501 CHECK_EQ(test.c, outputsNaN2008[i]);
2502 } else { 2502 } else {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2551 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2552 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b))); 2552 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
2553 __ round_w_d(f8, f4); 2553 __ round_w_d(f8, f4);
2554 __ round_w_s(f10, f6); 2554 __ round_w_s(f10, f6);
2555 __ Swc1(f8, MemOperand(a0, offsetof(Test, c))); 2555 __ Swc1(f8, MemOperand(a0, offsetof(Test, c)));
2556 __ Swc1(f10, MemOperand(a0, offsetof(Test, d))); 2556 __ Swc1(f10, MemOperand(a0, offsetof(Test, d)));
2557 __ jr(ra); 2557 __ jr(ra);
2558 __ nop(); 2558 __ nop();
2559 Test test; 2559 Test test;
2560 CodeDesc desc; 2560 CodeDesc desc;
2561 assm.GetCode(&desc); 2561 assm.GetCode(isolate, &desc);
2562 Handle<Code> code = isolate->factory()->NewCode( 2562 Handle<Code> code = isolate->factory()->NewCode(
2563 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2563 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2564 F3 f = FUNCTION_CAST<F3>(code->entry()); 2564 F3 f = FUNCTION_CAST<F3>(code->entry());
2565 for (int i = 0; i < kTableLength; i++) { 2565 for (int i = 0; i < kTableLength; i++) {
2566 test.a = inputs_D[i]; 2566 test.a = inputs_D[i];
2567 test.b = inputs_S[i]; 2567 test.b = inputs_S[i];
2568 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2568 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2569 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) { 2569 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) {
2570 CHECK_EQ(test.c, outputsNaN2008[i]); 2570 CHECK_EQ(test.c, outputsNaN2008[i]);
2571 } else { 2571 } else {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 2622 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
2623 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b))); 2623 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
2624 __ round_l_d(f8, f4); 2624 __ round_l_d(f8, f4);
2625 __ round_l_s(f10, f6); 2625 __ round_l_s(f10, f6);
2626 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c))); 2626 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
2627 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d))); 2627 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
2628 __ jr(ra); 2628 __ jr(ra);
2629 __ nop(); 2629 __ nop();
2630 Test test; 2630 Test test;
2631 CodeDesc desc; 2631 CodeDesc desc;
2632 assm.GetCode(&desc); 2632 assm.GetCode(isolate, &desc);
2633 Handle<Code> code = isolate->factory()->NewCode( 2633 Handle<Code> code = isolate->factory()->NewCode(
2634 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2634 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2635 F3 f = FUNCTION_CAST<F3>(code->entry()); 2635 F3 f = FUNCTION_CAST<F3>(code->entry());
2636 for (int i = 0; i < kTableLength; i++) { 2636 for (int i = 0; i < kTableLength; i++) {
2637 test.a = inputs_D[i]; 2637 test.a = inputs_D[i];
2638 test.b = inputs_S[i]; 2638 test.b = inputs_S[i];
2639 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2639 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2640 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && 2640 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
2641 kArchVariant == kMips64r6) { 2641 kArchVariant == kMips64r6) {
2642 CHECK_EQ(test.c, outputsNaN2008[i]); 2642 CHECK_EQ(test.c, outputsNaN2008[i]);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2694 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c))); 2694 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)));
2695 __ Ldc1(f10, MemOperand(a0, offsetof(TestFloat, d))); 2695 __ Ldc1(f10, MemOperand(a0, offsetof(TestFloat, d)));
2696 __ sub_s(f6, f2, f4); 2696 __ sub_s(f6, f2, f4);
2697 __ sub_d(f12, f8, f10); 2697 __ sub_d(f12, f8, f10);
2698 __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS))); 2698 __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)));
2699 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD))); 2699 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
2700 __ jr(ra); 2700 __ jr(ra);
2701 __ nop(); 2701 __ nop();
2702 2702
2703 CodeDesc desc; 2703 CodeDesc desc;
2704 assm.GetCode(&desc); 2704 assm.GetCode(isolate, &desc);
2705 Handle<Code> code = isolate->factory()->NewCode( 2705 Handle<Code> code = isolate->factory()->NewCode(
2706 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2706 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2707 F3 f = FUNCTION_CAST<F3>(code->entry()); 2707 F3 f = FUNCTION_CAST<F3>(code->entry());
2708 for (int i = 0; i < kTableLength; i++) { 2708 for (int i = 0; i < kTableLength; i++) {
2709 test.a = inputfs_S[i]; 2709 test.a = inputfs_S[i];
2710 test.b = inputft_S[i]; 2710 test.b = inputft_S[i];
2711 test.c = inputfs_D[i]; 2711 test.c = inputfs_D[i];
2712 test.d = inputft_D[i]; 2712 test.d = inputft_D[i];
2713 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2713 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2714 CHECK_EQ(test.resultS, outputs_S[i]); 2714 CHECK_EQ(test.resultS, outputs_S[i]);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS))); 2766 __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)));
2767 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD))); 2767 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
2768 __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1))); 2768 __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1)));
2769 __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1))); 2769 __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1)));
2770 __ Swc1(f4, MemOperand(a0, offsetof(TestFloat, resultS2))); 2770 __ Swc1(f4, MemOperand(a0, offsetof(TestFloat, resultS2)));
2771 __ Sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2))); 2771 __ Sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2)));
2772 __ jr(ra); 2772 __ jr(ra);
2773 __ nop(); 2773 __ nop();
2774 2774
2775 CodeDesc desc; 2775 CodeDesc desc;
2776 assm.GetCode(&desc); 2776 assm.GetCode(isolate, &desc);
2777 Handle<Code> code = isolate->factory()->NewCode( 2777 Handle<Code> code = isolate->factory()->NewCode(
2778 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2778 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2779 F3 f = FUNCTION_CAST<F3>(code->entry()); 2779 F3 f = FUNCTION_CAST<F3>(code->entry());
2780 2780
2781 for (int i = 0; i < kTableLength; i++) { 2781 for (int i = 0; i < kTableLength; i++) {
2782 float f1; 2782 float f1;
2783 double d1; 2783 double d1;
2784 test.a = inputs_S[i]; 2784 test.a = inputs_S[i];
2785 test.c = inputs_D[i]; 2785 test.c = inputs_D[i];
2786 2786
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
2844 __ Lwc1(f2, MemOperand(a0, offsetof(TestFloat, a))); 2844 __ Lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)));
2845 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c))); 2845 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)));
2846 __ neg_s(f6, f2); 2846 __ neg_s(f6, f2);
2847 __ neg_d(f12, f8); 2847 __ neg_d(f12, f8);
2848 __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS))); 2848 __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)));
2849 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD))); 2849 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
2850 __ jr(ra); 2850 __ jr(ra);
2851 __ nop(); 2851 __ nop();
2852 2852
2853 CodeDesc desc; 2853 CodeDesc desc;
2854 assm.GetCode(&desc); 2854 assm.GetCode(isolate, &desc);
2855 Handle<Code> code = isolate->factory()->NewCode( 2855 Handle<Code> code = isolate->factory()->NewCode(
2856 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2856 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2857 F3 f = FUNCTION_CAST<F3>(code->entry()); 2857 F3 f = FUNCTION_CAST<F3>(code->entry());
2858 for (int i = 0; i < kTableLength; i++) { 2858 for (int i = 0; i < kTableLength; i++) {
2859 test.a = inputs_S[i]; 2859 test.a = inputs_S[i];
2860 test.c = inputs_D[i]; 2860 test.c = inputs_D[i];
2861 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2861 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2862 CHECK_EQ(test.resultS, outputs_S[i]); 2862 CHECK_EQ(test.resultS, outputs_S[i]);
2863 CHECK_EQ(test.resultD, outputs_D[i]); 2863 CHECK_EQ(test.resultD, outputs_D[i]);
2864 } 2864 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2902 __ Ldc1(f6, MemOperand(a0, offsetof(TestFloat, c))); 2902 __ Ldc1(f6, MemOperand(a0, offsetof(TestFloat, c)));
2903 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, d))); 2903 __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, d)));
2904 __ mul_s(f10, f2, f4); 2904 __ mul_s(f10, f2, f4);
2905 __ mul_d(f12, f6, f8); 2905 __ mul_d(f12, f6, f8);
2906 __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, resultS))); 2906 __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, resultS)));
2907 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD))); 2907 __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
2908 __ jr(ra); 2908 __ jr(ra);
2909 __ nop(); 2909 __ nop();
2910 2910
2911 CodeDesc desc; 2911 CodeDesc desc;
2912 assm.GetCode(&desc); 2912 assm.GetCode(isolate, &desc);
2913 Handle<Code> code = isolate->factory()->NewCode( 2913 Handle<Code> code = isolate->factory()->NewCode(
2914 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2914 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2915 F3 f = FUNCTION_CAST<F3>(code->entry()); 2915 F3 f = FUNCTION_CAST<F3>(code->entry());
2916 for (int i = 0; i < kTableLength; i++) { 2916 for (int i = 0; i < kTableLength; i++) {
2917 test.a = inputfs_S[i]; 2917 test.a = inputfs_S[i];
2918 test.b = inputft_S[i]; 2918 test.b = inputft_S[i];
2919 test.c = inputfs_D[i]; 2919 test.c = inputfs_D[i];
2920 test.d = inputft_D[i]; 2920 test.d = inputft_D[i];
2921 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2921 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2922 CHECK_EQ(test.resultS, inputfs_S[i]*inputft_S[i]); 2922 CHECK_EQ(test.resultS, inputfs_S[i]*inputft_S[i]);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a))); 2957 __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
2958 __ Lwc1(f6, MemOperand(a0, offsetof(TestFloat, c))); 2958 __ Lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)));
2959 __ mov_s(f8, f6); 2959 __ mov_s(f8, f6);
2960 __ mov_d(f10, f4); 2960 __ mov_d(f10, f4);
2961 __ Swc1(f8, MemOperand(a0, offsetof(TestFloat, d))); 2961 __ Swc1(f8, MemOperand(a0, offsetof(TestFloat, d)));
2962 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, b))); 2962 __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, b)));
2963 __ jr(ra); 2963 __ jr(ra);
2964 __ nop(); 2964 __ nop();
2965 2965
2966 CodeDesc desc; 2966 CodeDesc desc;
2967 assm.GetCode(&desc); 2967 assm.GetCode(isolate, &desc);
2968 Handle<Code> code = isolate->factory()->NewCode( 2968 Handle<Code> code = isolate->factory()->NewCode(
2969 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 2969 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
2970 F3 f = FUNCTION_CAST<F3>(code->entry()); 2970 F3 f = FUNCTION_CAST<F3>(code->entry());
2971 for (int i = 0; i < kTableLength; i++) { 2971 for (int i = 0; i < kTableLength; i++) {
2972 test.a = inputs_D[i]; 2972 test.a = inputs_D[i];
2973 test.c = inputs_S[i]; 2973 test.c = inputs_S[i];
2974 2974
2975 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 2975 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
2976 CHECK_EQ(test.b, outputs_D[i]); 2976 CHECK_EQ(test.b, outputs_D[i]);
2977 CHECK_EQ(test.d, outputs_S[i]); 2977 CHECK_EQ(test.d, outputs_S[i]);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 3024 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
3025 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b))); 3025 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
3026 __ floor_w_d(f8, f4); 3026 __ floor_w_d(f8, f4);
3027 __ floor_w_s(f10, f6); 3027 __ floor_w_s(f10, f6);
3028 __ Swc1(f8, MemOperand(a0, offsetof(Test, c))); 3028 __ Swc1(f8, MemOperand(a0, offsetof(Test, c)));
3029 __ Swc1(f10, MemOperand(a0, offsetof(Test, d))); 3029 __ Swc1(f10, MemOperand(a0, offsetof(Test, d)));
3030 __ jr(ra); 3030 __ jr(ra);
3031 __ nop(); 3031 __ nop();
3032 Test test; 3032 Test test;
3033 CodeDesc desc; 3033 CodeDesc desc;
3034 assm.GetCode(&desc); 3034 assm.GetCode(isolate, &desc);
3035 Handle<Code> code = isolate->factory()->NewCode( 3035 Handle<Code> code = isolate->factory()->NewCode(
3036 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3036 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3037 F3 f = FUNCTION_CAST<F3>(code->entry()); 3037 F3 f = FUNCTION_CAST<F3>(code->entry());
3038 for (int i = 0; i < kTableLength; i++) { 3038 for (int i = 0; i < kTableLength; i++) {
3039 test.a = inputs_D[i]; 3039 test.a = inputs_D[i];
3040 test.b = inputs_S[i]; 3040 test.b = inputs_S[i];
3041 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3041 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3042 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) { 3042 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) {
3043 CHECK_EQ(test.c, outputsNaN2008[i]); 3043 CHECK_EQ(test.c, outputsNaN2008[i]);
3044 } else { 3044 } else {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
3095 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 3095 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
3096 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b))); 3096 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
3097 __ floor_l_d(f8, f4); 3097 __ floor_l_d(f8, f4);
3098 __ floor_l_s(f10, f6); 3098 __ floor_l_s(f10, f6);
3099 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c))); 3099 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
3100 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d))); 3100 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
3101 __ jr(ra); 3101 __ jr(ra);
3102 __ nop(); 3102 __ nop();
3103 Test test; 3103 Test test;
3104 CodeDesc desc; 3104 CodeDesc desc;
3105 assm.GetCode(&desc); 3105 assm.GetCode(isolate, &desc);
3106 Handle<Code> code = isolate->factory()->NewCode( 3106 Handle<Code> code = isolate->factory()->NewCode(
3107 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3107 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3108 F3 f = FUNCTION_CAST<F3>(code->entry()); 3108 F3 f = FUNCTION_CAST<F3>(code->entry());
3109 for (int i = 0; i < kTableLength; i++) { 3109 for (int i = 0; i < kTableLength; i++) {
3110 test.a = inputs_D[i]; 3110 test.a = inputs_D[i];
3111 test.b = inputs_S[i]; 3111 test.b = inputs_S[i];
3112 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3112 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3113 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && 3113 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
3114 kArchVariant == kMips64r6) { 3114 kArchVariant == kMips64r6) {
3115 CHECK_EQ(test.c, outputsNaN2008[i]); 3115 CHECK_EQ(test.c, outputsNaN2008[i]);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
3166 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 3166 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
3167 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b))); 3167 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
3168 __ ceil_w_d(f8, f4); 3168 __ ceil_w_d(f8, f4);
3169 __ ceil_w_s(f10, f6); 3169 __ ceil_w_s(f10, f6);
3170 __ Swc1(f8, MemOperand(a0, offsetof(Test, c))); 3170 __ Swc1(f8, MemOperand(a0, offsetof(Test, c)));
3171 __ Swc1(f10, MemOperand(a0, offsetof(Test, d))); 3171 __ Swc1(f10, MemOperand(a0, offsetof(Test, d)));
3172 __ jr(ra); 3172 __ jr(ra);
3173 __ nop(); 3173 __ nop();
3174 Test test; 3174 Test test;
3175 CodeDesc desc; 3175 CodeDesc desc;
3176 assm.GetCode(&desc); 3176 assm.GetCode(isolate, &desc);
3177 Handle<Code> code = isolate->factory()->NewCode( 3177 Handle<Code> code = isolate->factory()->NewCode(
3178 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3178 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3179 F3 f = FUNCTION_CAST<F3>(code->entry()); 3179 F3 f = FUNCTION_CAST<F3>(code->entry());
3180 for (int i = 0; i < kTableLength; i++) { 3180 for (int i = 0; i < kTableLength; i++) {
3181 test.a = inputs_D[i]; 3181 test.a = inputs_D[i];
3182 test.b = inputs_S[i]; 3182 test.b = inputs_S[i];
3183 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3183 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3184 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) { 3184 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) {
3185 CHECK_EQ(test.c, outputsNaN2008[i]); 3185 CHECK_EQ(test.c, outputsNaN2008[i]);
3186 } else { 3186 } else {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
3237 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a))); 3237 __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
3238 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b))); 3238 __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
3239 __ ceil_l_d(f8, f4); 3239 __ ceil_l_d(f8, f4);
3240 __ ceil_l_s(f10, f6); 3240 __ ceil_l_s(f10, f6);
3241 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c))); 3241 __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
3242 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d))); 3242 __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
3243 __ jr(ra); 3243 __ jr(ra);
3244 __ nop(); 3244 __ nop();
3245 Test test; 3245 Test test;
3246 CodeDesc desc; 3246 CodeDesc desc;
3247 assm.GetCode(&desc); 3247 assm.GetCode(isolate, &desc);
3248 Handle<Code> code = isolate->factory()->NewCode( 3248 Handle<Code> code = isolate->factory()->NewCode(
3249 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3249 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3250 F3 f = FUNCTION_CAST<F3>(code->entry()); 3250 F3 f = FUNCTION_CAST<F3>(code->entry());
3251 for (int i = 0; i < kTableLength; i++) { 3251 for (int i = 0; i < kTableLength; i++) {
3252 test.a = inputs_D[i]; 3252 test.a = inputs_D[i];
3253 test.b = inputs_S[i]; 3253 test.b = inputs_S[i];
3254 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3254 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3255 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && 3255 if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
3256 kArchVariant == kMips64r6) { 3256 kArchVariant == kMips64r6) {
3257 CHECK_EQ(test.c, outputsNaN2008[i]); 3257 CHECK_EQ(test.c, outputsNaN2008[i]);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
3308 3308
3309 __ bind(&done); 3309 __ bind(&done);
3310 __ Ld(ra, MemOperand(sp)); 3310 __ Ld(ra, MemOperand(sp));
3311 __ daddiu(sp, sp, 8); 3311 __ daddiu(sp, sp, 8);
3312 __ jr(ra); 3312 __ jr(ra);
3313 __ nop(); 3313 __ nop();
3314 3314
3315 CHECK_EQ(0, assm.UnboundLabelsCount()); 3315 CHECK_EQ(0, assm.UnboundLabelsCount());
3316 3316
3317 CodeDesc desc; 3317 CodeDesc desc;
3318 assm.GetCode(&desc); 3318 assm.GetCode(isolate, &desc);
3319 Handle<Code> code = isolate->factory()->NewCode( 3319 Handle<Code> code = isolate->factory()->NewCode(
3320 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3320 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3321 #ifdef OBJECT_PRINT 3321 #ifdef OBJECT_PRINT
3322 code->Print(std::cout); 3322 code->Print(std::cout);
3323 #endif 3323 #endif
3324 F1 f = FUNCTION_CAST<F1>(code->entry()); 3324 F1 f = FUNCTION_CAST<F1>(code->entry());
3325 for (int i = 0; i < kNumCases; ++i) { 3325 for (int i = 0; i < kNumCases; ++i) {
3326 int64_t res = reinterpret_cast<int64_t>( 3326 int64_t res = reinterpret_cast<int64_t>(
3327 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0)); 3327 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
3328 ::printf("f(%d) = %" PRId64 "\n", i, res); 3328 ::printf("f(%d) = %" PRId64 "\n", i, res);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 } 3378 }
3379 } 3379 }
3380 3380
3381 __ bind(&done); 3381 __ bind(&done);
3382 __ Ld(ra, MemOperand(sp)); 3382 __ Ld(ra, MemOperand(sp));
3383 __ daddiu(sp, sp, 8); 3383 __ daddiu(sp, sp, 8);
3384 __ jr(ra); 3384 __ jr(ra);
3385 __ nop(); 3385 __ nop();
3386 3386
3387 CodeDesc desc; 3387 CodeDesc desc;
3388 assm.GetCode(&desc); 3388 assm.GetCode(isolate, &desc);
3389 Handle<Code> code = isolate->factory()->NewCode( 3389 Handle<Code> code = isolate->factory()->NewCode(
3390 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3390 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3391 #ifdef OBJECT_PRINT 3391 #ifdef OBJECT_PRINT
3392 code->Print(std::cout); 3392 code->Print(std::cout);
3393 #endif 3393 #endif
3394 F1 f = FUNCTION_CAST<F1>(code->entry()); 3394 F1 f = FUNCTION_CAST<F1>(code->entry());
3395 for (int i = 0; i < kNumCases; ++i) { 3395 for (int i = 0; i < kNumCases; ++i) {
3396 int64_t res = reinterpret_cast<int64_t>( 3396 int64_t res = reinterpret_cast<int64_t>(
3397 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0)); 3397 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
3398 ::printf("f(%d) = %" PRId64 "\n", i, res); 3398 ::printf("f(%d) = %" PRId64 "\n", i, res);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
3458 } 3458 }
3459 } 3459 }
3460 3460
3461 __ bind(&done); 3461 __ bind(&done);
3462 __ Ld(ra, MemOperand(sp)); 3462 __ Ld(ra, MemOperand(sp));
3463 __ daddiu(sp, sp, 8); 3463 __ daddiu(sp, sp, 8);
3464 __ jr(ra); 3464 __ jr(ra);
3465 __ nop(); 3465 __ nop();
3466 3466
3467 CodeDesc desc; 3467 CodeDesc desc;
3468 assm.GetCode(&desc); 3468 assm.GetCode(isolate, &desc);
3469 Handle<Code> code = isolate->factory()->NewCode( 3469 Handle<Code> code = isolate->factory()->NewCode(
3470 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3470 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3471 #ifdef OBJECT_PRINT 3471 #ifdef OBJECT_PRINT
3472 code->Print(std::cout); 3472 code->Print(std::cout);
3473 #endif 3473 #endif
3474 F1 f = FUNCTION_CAST<F1>(code->entry()); 3474 F1 f = FUNCTION_CAST<F1>(code->entry());
3475 for (int i = 0; i < kNumCases; ++i) { 3475 for (int i = 0; i < kNumCases; ++i) {
3476 Handle<Object> result( 3476 Handle<Object> result(
3477 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0), isolate); 3477 CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0), isolate);
3478 #ifdef OBJECT_PRINT 3478 #ifdef OBJECT_PRINT
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
3532 3532
3533 __ Ld(a4, MemOperand(a0, offsetof(T, r6))); 3533 __ Ld(a4, MemOperand(a0, offsetof(T, r6)));
3534 __ nop(); 3534 __ nop();
3535 __ dbitswap(a6, a4); 3535 __ dbitswap(a6, a4);
3536 __ Sd(a6, MemOperand(a0, offsetof(T, r6))); 3536 __ Sd(a6, MemOperand(a0, offsetof(T, r6)));
3537 3537
3538 __ jr(ra); 3538 __ jr(ra);
3539 __ nop(); 3539 __ nop();
3540 3540
3541 CodeDesc desc; 3541 CodeDesc desc;
3542 assm.GetCode(&desc); 3542 assm.GetCode(isolate, &desc);
3543 Handle<Code> code = isolate->factory()->NewCode( 3543 Handle<Code> code = isolate->factory()->NewCode(
3544 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3544 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3545 F3 f = FUNCTION_CAST<F3>(code->entry()); 3545 F3 f = FUNCTION_CAST<F3>(code->entry());
3546 t.r1 = 0x00102100781A15C3; 3546 t.r1 = 0x00102100781A15C3;
3547 t.r2 = 0x001021008B71FCDE; 3547 t.r2 = 0x001021008B71FCDE;
3548 t.r3 = 0xFF8017FF781A15C3; 3548 t.r3 = 0xFF8017FF781A15C3;
3549 t.r4 = 0xFF8017FF8B71FCDE; 3549 t.r4 = 0xFF8017FF8B71FCDE;
3550 t.r5 = 0x10C021098B71FCDE; 3550 t.r5 = 0x10C021098B71FCDE;
3551 t.r6 = 0xFB8017FF781A15C3; 3551 t.r6 = 0xFB8017FF781A15C3;
3552 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 3552 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
3675 __ Swc1(f6, MemOperand(a0, offsetof(T, fPosSubnorm))); 3675 __ Swc1(f6, MemOperand(a0, offsetof(T, fPosSubnorm)));
3676 3676
3677 __ Lwc1(f4, MemOperand(a0, offsetof(T, fPosZero))); 3677 __ Lwc1(f4, MemOperand(a0, offsetof(T, fPosZero)));
3678 __ class_s(f6, f4); 3678 __ class_s(f6, f4);
3679 __ Swc1(f6, MemOperand(a0, offsetof(T, fPosZero))); 3679 __ Swc1(f6, MemOperand(a0, offsetof(T, fPosZero)));
3680 3680
3681 __ jr(ra); 3681 __ jr(ra);
3682 __ nop(); 3682 __ nop();
3683 3683
3684 CodeDesc desc; 3684 CodeDesc desc;
3685 assm.GetCode(&desc); 3685 assm.GetCode(isolate, &desc);
3686 Handle<Code> code = isolate->factory()->NewCode( 3686 Handle<Code> code = isolate->factory()->NewCode(
3687 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3687 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3688 F3 f = FUNCTION_CAST<F3>(code->entry()); 3688 F3 f = FUNCTION_CAST<F3>(code->entry());
3689 3689
3690 // Double test values. 3690 // Double test values.
3691 t.dSignalingNan = std::numeric_limits<double>::signaling_NaN(); 3691 t.dSignalingNan = std::numeric_limits<double>::signaling_NaN();
3692 t.dQuietNan = std::numeric_limits<double>::quiet_NaN(); 3692 t.dQuietNan = std::numeric_limits<double>::quiet_NaN();
3693 t.dNegInf = -1.0 / 0.0; 3693 t.dNegInf = -1.0 / 0.0;
3694 t.dNegNorm = -5.0; 3694 t.dNegNorm = -5.0;
3695 t.dNegSubnorm = -DBL_MIN / 2.0; 3695 t.dNegSubnorm = -DBL_MIN / 2.0;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
3769 __ abs_s(f10, f4); 3769 __ abs_s(f10, f4);
3770 __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, b))); 3770 __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, b)));
3771 3771
3772 // Restore FCSR. 3772 // Restore FCSR.
3773 __ ctc1(a1, FCSR); 3773 __ ctc1(a1, FCSR);
3774 3774
3775 __ jr(ra); 3775 __ jr(ra);
3776 __ nop(); 3776 __ nop();
3777 3777
3778 CodeDesc desc; 3778 CodeDesc desc;
3779 assm.GetCode(&desc); 3779 assm.GetCode(isolate, &desc);
3780 Handle<Code> code = isolate->factory()->NewCode( 3780 Handle<Code> code = isolate->factory()->NewCode(
3781 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3781 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3782 F3 f = FUNCTION_CAST<F3>(code->entry()); 3782 F3 f = FUNCTION_CAST<F3>(code->entry());
3783 test.a = -2.0; 3783 test.a = -2.0;
3784 test.b = -2.0; 3784 test.b = -2.0;
3785 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3785 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3786 CHECK_EQ(test.a, 2.0); 3786 CHECK_EQ(test.a, 2.0);
3787 CHECK_EQ(test.b, 2.0); 3787 CHECK_EQ(test.b, 2.0);
3788 3788
3789 test.a = 2.0; 3789 test.a = 2.0;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
3862 3862
3863 __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, fa))); 3863 __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, fa)));
3864 __ Lwc1(f8, MemOperand(a0, offsetof(TestFloat, fb))); 3864 __ Lwc1(f8, MemOperand(a0, offsetof(TestFloat, fb)));
3865 __ add_s(f10, f8, f4); 3865 __ add_s(f10, f8, f4);
3866 __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, fc))); 3866 __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, fc)));
3867 3867
3868 __ jr(ra); 3868 __ jr(ra);
3869 __ nop(); 3869 __ nop();
3870 3870
3871 CodeDesc desc; 3871 CodeDesc desc;
3872 assm.GetCode(&desc); 3872 assm.GetCode(isolate, &desc);
3873 Handle<Code> code = isolate->factory()->NewCode( 3873 Handle<Code> code = isolate->factory()->NewCode(
3874 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 3874 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
3875 F3 f = FUNCTION_CAST<F3>(code->entry()); 3875 F3 f = FUNCTION_CAST<F3>(code->entry());
3876 test.a = 2.0; 3876 test.a = 2.0;
3877 test.b = 3.0; 3877 test.b = 3.0;
3878 test.fa = 2.0; 3878 test.fa = 2.0;
3879 test.fb = 3.0; 3879 test.fb = 3.0;
3880 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 3880 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
3881 CHECK_EQ(test.c, 5.0); 3881 CHECK_EQ(test.c, 5.0);
3882 CHECK_EQ(test.fc, 5.0); 3882 CHECK_EQ(test.fc, 5.0);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
4017 __ c_s(ULE, f14, f16, 0); 4017 __ c_s(ULE, f14, f16, 0);
4018 __ movt(t2, t1, 6); 4018 __ movt(t2, t1, 6);
4019 __ movt(t3, t1, 0); 4019 __ movt(t3, t1, 0);
4020 __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dUle))); 4020 __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dUle)));
4021 __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fUle))); 4021 __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fUle)));
4022 4022
4023 __ jr(ra); 4023 __ jr(ra);
4024 __ nop(); 4024 __ nop();
4025 4025
4026 CodeDesc desc; 4026 CodeDesc desc;
4027 assm.GetCode(&desc); 4027 assm.GetCode(isolate, &desc);
4028 Handle<Code> code = isolate->factory()->NewCode( 4028 Handle<Code> code = isolate->factory()->NewCode(
4029 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4029 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4030 F3 f = FUNCTION_CAST<F3>(code->entry()); 4030 F3 f = FUNCTION_CAST<F3>(code->entry());
4031 test.dOp1 = 2.0; 4031 test.dOp1 = 2.0;
4032 test.dOp2 = 3.0; 4032 test.dOp2 = 3.0;
4033 test.fOp1 = 2.0; 4033 test.fOp1 = 2.0;
4034 test.fOp2 = 3.0; 4034 test.fOp2 = 3.0;
4035 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 4035 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
4036 CHECK_EQ(test.dF, 0U); 4036 CHECK_EQ(test.dF, 0U);
4037 CHECK_EQ(test.dUn, 0U); 4037 CHECK_EQ(test.dUn, 0U);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
4218 4218
4219 __ cmp_d(NE, f2, f4, f6); 4219 __ cmp_d(NE, f2, f4, f6);
4220 __ cmp_s(NE, f12, f14, f16); 4220 __ cmp_s(NE, f12, f14, f16);
4221 __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dNe))); 4221 __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dNe)));
4222 __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fNe))); 4222 __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fNe)));
4223 4223
4224 __ jr(ra); 4224 __ jr(ra);
4225 __ nop(); 4225 __ nop();
4226 4226
4227 CodeDesc desc; 4227 CodeDesc desc;
4228 assm.GetCode(&desc); 4228 assm.GetCode(isolate, &desc);
4229 Handle<Code> code = isolate->factory()->NewCode( 4229 Handle<Code> code = isolate->factory()->NewCode(
4230 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4230 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4231 F3 f = FUNCTION_CAST<F3>(code->entry()); 4231 F3 f = FUNCTION_CAST<F3>(code->entry());
4232 uint64_t dTrue = 0xFFFFFFFFFFFFFFFF; 4232 uint64_t dTrue = 0xFFFFFFFFFFFFFFFF;
4233 uint64_t dFalse = 0x0000000000000000; 4233 uint64_t dFalse = 0x0000000000000000;
4234 uint32_t fTrue = 0xFFFFFFFF; 4234 uint32_t fTrue = 0xFFFFFFFF;
4235 uint32_t fFalse = 0x00000000; 4235 uint32_t fFalse = 0x00000000;
4236 4236
4237 test.dOp1 = 2.0; 4237 test.dOp1 = 2.0;
4238 test.dOp2 = 3.0; 4238 test.dOp2 = 3.0;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4396 GENERATE_CVT_TEST(cvt_w_s, lw, sw) 4396 GENERATE_CVT_TEST(cvt_w_s, lw, sw)
4397 GENERATE_CVT_TEST(cvt_w_d, ld, sw) 4397 GENERATE_CVT_TEST(cvt_w_d, ld, sw)
4398 4398
4399 // Restore FCSR. 4399 // Restore FCSR.
4400 __ ctc1(a1, FCSR); 4400 __ ctc1(a1, FCSR);
4401 4401
4402 __ jr(ra); 4402 __ jr(ra);
4403 __ nop(); 4403 __ nop();
4404 4404
4405 CodeDesc desc; 4405 CodeDesc desc;
4406 assm.GetCode(&desc); 4406 assm.GetCode(isolate, &desc);
4407 Handle<Code> code = isolate->factory()->NewCode( 4407 Handle<Code> code = isolate->factory()->NewCode(
4408 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4408 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4409 F3 f = FUNCTION_CAST<F3>(code->entry()); 4409 F3 f = FUNCTION_CAST<F3>(code->entry());
4410 4410
4411 test.cvt_d_s_in = -0.51; 4411 test.cvt_d_s_in = -0.51;
4412 test.cvt_d_w_in = -1; 4412 test.cvt_d_w_in = -1;
4413 test.cvt_d_l_in = -1; 4413 test.cvt_d_l_in = -1;
4414 test.cvt_l_s_in = -0.51; 4414 test.cvt_l_s_in = -0.51;
4415 test.cvt_l_d_in = -0.51; 4415 test.cvt_l_d_in = -0.51;
4416 test.cvt_s_d_in = -0.51; 4416 test.cvt_s_d_in = -0.51;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
4567 __ nop(); 4567 __ nop();
4568 __ div_s(f6, f4, f2); 4568 __ div_s(f6, f4, f2);
4569 __ Swc1(f6, MemOperand(a0, offsetof(Test, fRes))); 4569 __ Swc1(f6, MemOperand(a0, offsetof(Test, fRes)));
4570 4570
4571 // Restore FCSR. 4571 // Restore FCSR.
4572 __ ctc1(a1, FCSR); 4572 __ ctc1(a1, FCSR);
4573 4573
4574 __ jr(ra); 4574 __ jr(ra);
4575 __ nop(); 4575 __ nop();
4576 CodeDesc desc; 4576 CodeDesc desc;
4577 assm.GetCode(&desc); 4577 assm.GetCode(isolate, &desc);
4578 Handle<Code> code = isolate->factory()->NewCode( 4578 Handle<Code> code = isolate->factory()->NewCode(
4579 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4579 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4580 F3 f = FUNCTION_CAST<F3>(code->entry()); 4580 F3 f = FUNCTION_CAST<F3>(code->entry());
4581 4581
4582 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); 4582 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
4583 4583
4584 const int test_size = 3; 4584 const int test_size = 3;
4585 4585
4586 double dOp1[test_size] = { 4586 double dOp1[test_size] = {
4587 5.0, 4587 5.0,
(...skipping 70 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 __ align(v0, a0, a1, bp); 4663 __ align(v0, a0, a1, bp);
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 F4 f = FUNCTION_CAST<F4>(code->entry()); 4672 F4 f = FUNCTION_CAST<F4>(code->entry());
4673 4673
4674 uint64_t res = reinterpret_cast<uint64_t>( 4674 uint64_t res = reinterpret_cast<uint64_t>(
4675 CALL_GENERATED_CODE(isolate, f, rs_value, rt_value, 0, 0, 0)); 4675 CALL_GENERATED_CODE(isolate, f, rs_value, rt_value, 0, 0, 0));
4676 4676
4677 return res; 4677 return res;
4678 } 4678 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4711 Isolate* isolate = CcTest::i_isolate(); 4711 Isolate* isolate = CcTest::i_isolate();
4712 HandleScope scope(isolate); 4712 HandleScope scope(isolate);
4713 4713
4714 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4714 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4715 4715
4716 __ dalign(v0, a0, a1, bp); 4716 __ dalign(v0, a0, a1, bp);
4717 __ jr(ra); 4717 __ jr(ra);
4718 __ nop(); 4718 __ nop();
4719 4719
4720 CodeDesc desc; 4720 CodeDesc desc;
4721 assm.GetCode(&desc); 4721 assm.GetCode(isolate, &desc);
4722 Handle<Code> code = isolate->factory()->NewCode( 4722 Handle<Code> code = isolate->factory()->NewCode(
4723 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4723 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4724 4724
4725 F4 f = FUNCTION_CAST<F4>(code->entry()); 4725 F4 f = FUNCTION_CAST<F4>(code->entry());
4726 uint64_t res = reinterpret_cast<uint64_t>( 4726 uint64_t res = reinterpret_cast<uint64_t>(
4727 CALL_GENERATED_CODE(isolate, f, rs_value, rt_value, 0, 0, 0)); 4727 CALL_GENERATED_CODE(isolate, f, rs_value, rt_value, 0, 0, 0));
4728 4728
4729 return res; 4729 return res;
4730 } 4730 }
4731 4731
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
4769 Isolate* isolate = CcTest::i_isolate(); 4769 Isolate* isolate = CcTest::i_isolate();
4770 HandleScope scope(isolate); 4770 HandleScope scope(isolate);
4771 4771
4772 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4772 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4773 4773
4774 __ aluipc(v0, offset); 4774 __ aluipc(v0, offset);
4775 __ jr(ra); 4775 __ jr(ra);
4776 __ nop(); 4776 __ nop();
4777 4777
4778 CodeDesc desc; 4778 CodeDesc desc;
4779 assm.GetCode(&desc); 4779 assm.GetCode(isolate, &desc);
4780 Handle<Code> code = isolate->factory()->NewCode( 4780 Handle<Code> code = isolate->factory()->NewCode(
4781 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4781 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4782 4782
4783 F2 f = FUNCTION_CAST<F2>(code->entry()); 4783 F2 f = FUNCTION_CAST<F2>(code->entry());
4784 PC = (uint64_t) f; // Set the program counter. 4784 PC = (uint64_t) f; // Set the program counter.
4785 4785
4786 uint64_t res = reinterpret_cast<uint64_t>( 4786 uint64_t res = reinterpret_cast<uint64_t>(
4787 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4787 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4788 4788
4789 return res; 4789 return res;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4823 Isolate* isolate = CcTest::i_isolate(); 4823 Isolate* isolate = CcTest::i_isolate();
4824 HandleScope scope(isolate); 4824 HandleScope scope(isolate);
4825 4825
4826 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4826 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4827 4827
4828 __ auipc(v0, offset); 4828 __ auipc(v0, offset);
4829 __ jr(ra); 4829 __ jr(ra);
4830 __ nop(); 4830 __ nop();
4831 4831
4832 CodeDesc desc; 4832 CodeDesc desc;
4833 assm.GetCode(&desc); 4833 assm.GetCode(isolate, &desc);
4834 Handle<Code> code = isolate->factory()->NewCode( 4834 Handle<Code> code = isolate->factory()->NewCode(
4835 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4835 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4836 4836
4837 F2 f = FUNCTION_CAST<F2>(code->entry()); 4837 F2 f = FUNCTION_CAST<F2>(code->entry());
4838 PC = (uint64_t) f; // Set the program counter. 4838 PC = (uint64_t) f; // Set the program counter.
4839 4839
4840 uint64_t res = reinterpret_cast<uint64_t>( 4840 uint64_t res = reinterpret_cast<uint64_t>(
4841 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4841 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4842 4842
4843 return res; 4843 return res;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
4878 HandleScope scope(isolate); 4878 HandleScope scope(isolate);
4879 4879
4880 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4880 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4881 4881
4882 __ li(t0, rs); 4882 __ li(t0, rs);
4883 __ aui(v0, t0, offset); 4883 __ aui(v0, t0, offset);
4884 __ jr(ra); 4884 __ jr(ra);
4885 __ nop(); 4885 __ nop();
4886 4886
4887 CodeDesc desc; 4887 CodeDesc desc;
4888 assm.GetCode(&desc); 4888 assm.GetCode(isolate, &desc);
4889 Handle<Code> code = isolate->factory()->NewCode( 4889 Handle<Code> code = isolate->factory()->NewCode(
4890 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4890 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4891 4891
4892 F2 f = FUNCTION_CAST<F2>(code->entry()); 4892 F2 f = FUNCTION_CAST<F2>(code->entry());
4893 4893
4894 uint64_t res = 4894 uint64_t res =
4895 reinterpret_cast<uint64_t> 4895 reinterpret_cast<uint64_t>
4896 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4896 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4897 4897
4898 return res; 4898 return res;
4899 } 4899 }
4900 4900
4901 4901
4902 uint64_t run_daui(uint64_t rs, uint16_t offset) { 4902 uint64_t run_daui(uint64_t rs, uint16_t offset) {
4903 Isolate* isolate = CcTest::i_isolate(); 4903 Isolate* isolate = CcTest::i_isolate();
4904 HandleScope scope(isolate); 4904 HandleScope scope(isolate);
4905 4905
4906 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4906 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4907 4907
4908 __ li(t0, rs); 4908 __ li(t0, rs);
4909 __ daui(v0, t0, offset); 4909 __ daui(v0, t0, offset);
4910 __ jr(ra); 4910 __ jr(ra);
4911 __ nop(); 4911 __ nop();
4912 4912
4913 CodeDesc desc; 4913 CodeDesc desc;
4914 assm.GetCode(&desc); 4914 assm.GetCode(isolate, &desc);
4915 Handle<Code> code = isolate->factory()->NewCode( 4915 Handle<Code> code = isolate->factory()->NewCode(
4916 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4916 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4917 4917
4918 F2 f = FUNCTION_CAST<F2>(code->entry()); 4918 F2 f = FUNCTION_CAST<F2>(code->entry());
4919 4919
4920 uint64_t res = 4920 uint64_t res =
4921 reinterpret_cast<uint64_t> 4921 reinterpret_cast<uint64_t>
4922 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4922 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4923 4923
4924 return res; 4924 return res;
4925 } 4925 }
4926 4926
4927 4927
4928 uint64_t run_dahi(uint64_t rs, uint16_t offset) { 4928 uint64_t run_dahi(uint64_t rs, uint16_t offset) {
4929 Isolate* isolate = CcTest::i_isolate(); 4929 Isolate* isolate = CcTest::i_isolate();
4930 HandleScope scope(isolate); 4930 HandleScope scope(isolate);
4931 4931
4932 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4932 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4933 4933
4934 __ li(v0, rs); 4934 __ li(v0, rs);
4935 __ dahi(v0, offset); 4935 __ dahi(v0, offset);
4936 __ jr(ra); 4936 __ jr(ra);
4937 __ nop(); 4937 __ nop();
4938 4938
4939 CodeDesc desc; 4939 CodeDesc desc;
4940 assm.GetCode(&desc); 4940 assm.GetCode(isolate, &desc);
4941 Handle<Code> code = isolate->factory()->NewCode( 4941 Handle<Code> code = isolate->factory()->NewCode(
4942 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4942 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4943 4943
4944 F2 f = FUNCTION_CAST<F2>(code->entry()); 4944 F2 f = FUNCTION_CAST<F2>(code->entry());
4945 4945
4946 uint64_t res = 4946 uint64_t res =
4947 reinterpret_cast<uint64_t> 4947 reinterpret_cast<uint64_t>
4948 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4948 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4949 4949
4950 return res; 4950 return res;
4951 } 4951 }
4952 4952
4953 4953
4954 uint64_t run_dati(uint64_t rs, uint16_t offset) { 4954 uint64_t run_dati(uint64_t rs, uint16_t offset) {
4955 Isolate* isolate = CcTest::i_isolate(); 4955 Isolate* isolate = CcTest::i_isolate();
4956 HandleScope scope(isolate); 4956 HandleScope scope(isolate);
4957 4957
4958 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 4958 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
4959 4959
4960 __ li(v0, rs); 4960 __ li(v0, rs);
4961 __ dati(v0, offset); 4961 __ dati(v0, offset);
4962 __ jr(ra); 4962 __ jr(ra);
4963 __ nop(); 4963 __ nop();
4964 4964
4965 CodeDesc desc; 4965 CodeDesc desc;
4966 assm.GetCode(&desc); 4966 assm.GetCode(isolate, &desc);
4967 Handle<Code> code = isolate->factory()->NewCode( 4967 Handle<Code> code = isolate->factory()->NewCode(
4968 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4968 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
4969 4969
4970 F2 f = FUNCTION_CAST<F2>(code->entry()); 4970 F2 f = FUNCTION_CAST<F2>(code->entry());
4971 4971
4972 uint64_t res = 4972 uint64_t res =
4973 reinterpret_cast<uint64_t> 4973 reinterpret_cast<uint64_t>
4974 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 4974 (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
4975 4975
4976 return res; 4976 return res;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
5061 Label code_start; 5061 Label code_start;
5062 __ bind(&code_start); 5062 __ bind(&code_start);
5063 __ li(v0, imm, mode); 5063 __ li(v0, imm, mode);
5064 if (num_instr > 0) { 5064 if (num_instr > 0) {
5065 CHECK_EQ(assm.InstructionsGeneratedSince(&code_start), num_instr); 5065 CHECK_EQ(assm.InstructionsGeneratedSince(&code_start), num_instr);
5066 } 5066 }
5067 __ jr(ra); 5067 __ jr(ra);
5068 __ nop(); 5068 __ nop();
5069 5069
5070 CodeDesc desc; 5070 CodeDesc desc;
5071 assm.GetCode(&desc); 5071 assm.GetCode(isolate, &desc);
5072 Handle<Code> code = isolate->factory()->NewCode( 5072 Handle<Code> code = isolate->factory()->NewCode(
5073 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5073 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5074 F2 f = FUNCTION_CAST<F2>(code->entry()); 5074 F2 f = FUNCTION_CAST<F2>(code->entry());
5075 5075
5076 uint64_t res = reinterpret_cast<uint64_t>( 5076 uint64_t res = reinterpret_cast<uint64_t>(
5077 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5077 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5078 5078
5079 return res; 5079 return res;
5080 } 5080 }
5081 5081
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
5254 uint32_t addiu_start_2 = 0x25000000; 5254 uint32_t addiu_start_2 = 0x25000000;
5255 for (int32_t i = 0x80000; i <= 0xbffff; ++i) { 5255 for (int32_t i = 0x80000; i <= 0xbffff; ++i) {
5256 uint32_t addiu_new = addiu_start_2 + i; 5256 uint32_t addiu_new = addiu_start_2 + i;
5257 __ dd(addiu_new); 5257 __ dd(addiu_new);
5258 } 5258 }
5259 5259
5260 __ jr(ra); 5260 __ jr(ra);
5261 __ nop(); 5261 __ nop();
5262 5262
5263 CodeDesc desc; 5263 CodeDesc desc;
5264 assm.GetCode(&desc); 5264 assm.GetCode(isolate, &desc);
5265 Handle<Code> code = isolate->factory()->NewCode( 5265 Handle<Code> code = isolate->factory()->NewCode(
5266 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5266 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5267 5267
5268 F2 f = FUNCTION_CAST<F2>(code->entry()); 5268 F2 f = FUNCTION_CAST<F2>(code->entry());
5269 5269
5270 uint64_t res = reinterpret_cast<uint64_t>( 5270 uint64_t res = reinterpret_cast<uint64_t>(
5271 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5271 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5272 5272
5273 return res; 5273 return res;
5274 } 5274 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
5330 uint32_t addiu_start_2 = 0x25000000; 5330 uint32_t addiu_start_2 = 0x25000000;
5331 for (int32_t i = 0x80000; i <= 0xbffff; ++i) { 5331 for (int32_t i = 0x80000; i <= 0xbffff; ++i) {
5332 uint32_t addiu_new = addiu_start_2 + i; 5332 uint32_t addiu_new = addiu_start_2 + i;
5333 __ dd(addiu_new); 5333 __ dd(addiu_new);
5334 } 5334 }
5335 5335
5336 __ jr(ra); 5336 __ jr(ra);
5337 __ nop(); 5337 __ nop();
5338 5338
5339 CodeDesc desc; 5339 CodeDesc desc;
5340 assm.GetCode(&desc); 5340 assm.GetCode(isolate, &desc);
5341 Handle<Code> code = isolate->factory()->NewCode( 5341 Handle<Code> code = isolate->factory()->NewCode(
5342 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5342 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5343 5343
5344 F2 f = FUNCTION_CAST<F2>(code->entry()); 5344 F2 f = FUNCTION_CAST<F2>(code->entry());
5345 5345
5346 uint64_t res = reinterpret_cast<uint64_t>( 5346 uint64_t res = reinterpret_cast<uint64_t>(
5347 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5347 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5348 5348
5349 return res; 5349 return res;
5350 } 5350 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5414 __ mov(t0, ra); 5414 __ mov(t0, ra);
5415 __ jr(ra); 5415 __ jr(ra);
5416 __ nop(); 5416 __ nop();
5417 5417
5418 __ bind(&stop_execution); 5418 __ bind(&stop_execution);
5419 __ pop(ra); 5419 __ pop(ra);
5420 __ jr(ra); 5420 __ jr(ra);
5421 __ nop(); 5421 __ nop();
5422 5422
5423 CodeDesc desc; 5423 CodeDesc desc;
5424 assm.GetCode(&desc); 5424 assm.GetCode(isolate, &desc);
5425 Handle<Code> code = isolate->factory()->NewCode( 5425 Handle<Code> code = isolate->factory()->NewCode(
5426 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5426 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5427 5427
5428 F2 f = FUNCTION_CAST<F2>(code->entry()); 5428 F2 f = FUNCTION_CAST<F2>(code->entry());
5429 5429
5430 uint64_t res = reinterpret_cast<uint64_t>( 5430 uint64_t res = reinterpret_cast<uint64_t>(
5431 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5431 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5432 5432
5433 return res; 5433 return res;
5434 } 5434 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
5486 __ addiu(v0, v0, 0x1000); 5486 __ addiu(v0, v0, 0x1000);
5487 __ addiu(v0, v0, 0x2000); // <--- offset = 4 5487 __ addiu(v0, v0, 0x2000); // <--- offset = 4
5488 __ jr(ra); 5488 __ jr(ra);
5489 __ nop(); 5489 __ nop();
5490 5490
5491 __ bind(&stop_execution); 5491 __ bind(&stop_execution);
5492 __ jr(ra); 5492 __ jr(ra);
5493 __ nop(); 5493 __ nop();
5494 5494
5495 CodeDesc desc; 5495 CodeDesc desc;
5496 assm.GetCode(&desc); 5496 assm.GetCode(isolate, &desc);
5497 Handle<Code> code = isolate->factory()->NewCode( 5497 Handle<Code> code = isolate->factory()->NewCode(
5498 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5498 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5499 5499
5500 F2 f = FUNCTION_CAST<F2>(code->entry()); 5500 F2 f = FUNCTION_CAST<F2>(code->entry());
5501 5501
5502 uint64_t res = reinterpret_cast<uint64_t>( 5502 uint64_t res = reinterpret_cast<uint64_t>(
5503 CALL_GENERATED_CODE(isolate, f, value, 0, 0, 0, 0)); 5503 CALL_GENERATED_CODE(isolate, f, value, 0, 0, 0, 0));
5504 5504
5505 return res; 5505 return res;
5506 } 5506 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
5580 __ jr(ra); 5580 __ jr(ra);
5581 __ nop(); 5581 __ nop();
5582 5582
5583 __ bind(&get_program_counter); 5583 __ bind(&get_program_counter);
5584 __ mov(t0, ra); 5584 __ mov(t0, ra);
5585 __ jr(ra); 5585 __ jr(ra);
5586 __ nop(); 5586 __ nop();
5587 5587
5588 5588
5589 CodeDesc desc; 5589 CodeDesc desc;
5590 assm.GetCode(&desc); 5590 assm.GetCode(isolate, &desc);
5591 Handle<Code> code = isolate->factory()->NewCode( 5591 Handle<Code> code = isolate->factory()->NewCode(
5592 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5592 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5593 5593
5594 F2 f = FUNCTION_CAST<F2>(code->entry()); 5594 F2 f = FUNCTION_CAST<F2>(code->entry());
5595 5595
5596 uint64_t res = reinterpret_cast<uint64_t>( 5596 uint64_t res = reinterpret_cast<uint64_t>(
5597 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5597 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5598 5598
5599 return res; 5599 return res;
5600 } 5600 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
5632 Isolate* isolate = CcTest::i_isolate(); 5632 Isolate* isolate = CcTest::i_isolate();
5633 HandleScope scope(isolate); 5633 HandleScope scope(isolate);
5634 5634
5635 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 5635 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
5636 5636
5637 __ addiupc(v0, imm19); 5637 __ addiupc(v0, imm19);
5638 __ jr(ra); 5638 __ jr(ra);
5639 __ nop(); 5639 __ nop();
5640 5640
5641 CodeDesc desc; 5641 CodeDesc desc;
5642 assm.GetCode(&desc); 5642 assm.GetCode(isolate, &desc);
5643 Handle<Code> code = isolate->factory()->NewCode( 5643 Handle<Code> code = isolate->factory()->NewCode(
5644 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5644 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5645 5645
5646 F2 f = FUNCTION_CAST<F2>(code->entry()); 5646 F2 f = FUNCTION_CAST<F2>(code->entry());
5647 PC = (uint64_t) f; // Set the program counter. 5647 PC = (uint64_t) f; // Set the program counter.
5648 5648
5649 uint64_t res = reinterpret_cast<uint64_t>( 5649 uint64_t res = reinterpret_cast<uint64_t>(
5650 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5650 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5651 5651
5652 return res; 5652 return res;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
5708 uint32_t addiu_start_2 = 0x25000000; 5708 uint32_t addiu_start_2 = 0x25000000;
5709 for (int32_t i = 0x80000; i <= 0xbffff; ++i) { 5709 for (int32_t i = 0x80000; i <= 0xbffff; ++i) {
5710 uint32_t addiu_new = addiu_start_2 + i; 5710 uint32_t addiu_new = addiu_start_2 + i;
5711 __ dd(addiu_new); 5711 __ dd(addiu_new);
5712 } 5712 }
5713 5713
5714 __ jr(ra); 5714 __ jr(ra);
5715 __ nop(); 5715 __ nop();
5716 5716
5717 CodeDesc desc; 5717 CodeDesc desc;
5718 assm.GetCode(&desc); 5718 assm.GetCode(isolate, &desc);
5719 Handle<Code> code = isolate->factory()->NewCode( 5719 Handle<Code> code = isolate->factory()->NewCode(
5720 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5720 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5721 5721
5722 F2 f = FUNCTION_CAST<F2>(code->entry()); 5722 F2 f = FUNCTION_CAST<F2>(code->entry());
5723 5723
5724 uint64_t res = reinterpret_cast<uint64_t>( 5724 uint64_t res = reinterpret_cast<uint64_t>(
5725 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5725 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5726 5726
5727 return res; 5727 return res;
5728 } 5728 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
5797 5797
5798 for (int32_t i = 0; i <= 99; ++i) { 5798 for (int32_t i = 0; i <= 99; ++i) {
5799 __ addiu(v0, v0, 1); 5799 __ addiu(v0, v0, 1);
5800 } 5800 }
5801 5801
5802 __ pop(ra); 5802 __ pop(ra);
5803 __ jr(ra); 5803 __ jr(ra);
5804 __ nop(); 5804 __ nop();
5805 5805
5806 CodeDesc desc; 5806 CodeDesc desc;
5807 assm.GetCode(&desc); 5807 assm.GetCode(isolate, &desc);
5808 Handle<Code> code = isolate->factory()->NewCode( 5808 Handle<Code> code = isolate->factory()->NewCode(
5809 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5809 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5810 5810
5811 F2 f = FUNCTION_CAST<F2>(code->entry()); 5811 F2 f = FUNCTION_CAST<F2>(code->entry());
5812 5812
5813 int64_t res = reinterpret_cast<int64_t>( 5813 int64_t res = reinterpret_cast<int64_t>(
5814 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5814 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5815 5815
5816 return res; 5816 return res;
5817 } 5817 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
5879 __ jr(ra); // 2 5879 __ jr(ra); // 2
5880 __ nop(); // 3 5880 __ nop(); // 3
5881 5881
5882 for (int32_t i = 4; i <= 44; ++i) { 5882 for (int32_t i = 4; i <= 44; ++i) {
5883 __ dd(instruction_addiu); 5883 __ dd(instruction_addiu);
5884 } 5884 }
5885 __ jr(ra); 5885 __ jr(ra);
5886 __ nop(); 5886 __ nop();
5887 5887
5888 CodeDesc desc; 5888 CodeDesc desc;
5889 assm.GetCode(&desc); 5889 assm.GetCode(isolate, &desc);
5890 Handle<Code> code = isolate->factory()->NewCode( 5890 Handle<Code> code = isolate->factory()->NewCode(
5891 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5891 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5892 5892
5893 F2 f = FUNCTION_CAST<F2>(code->entry()); 5893 F2 f = FUNCTION_CAST<F2>(code->entry());
5894 5894
5895 int64_t res = reinterpret_cast<int64_t>( 5895 int64_t res = reinterpret_cast<int64_t>(
5896 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 5896 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
5897 5897
5898 return res; 5898 return res;
5899 } 5899 }
(...skipping 29 matching lines...) Expand all
5929 Isolate* isolate = CcTest::i_isolate(); 5929 Isolate* isolate = CcTest::i_isolate();
5930 HandleScope scope(isolate); 5930 HandleScope scope(isolate);
5931 5931
5932 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 5932 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
5933 5933
5934 __ dsll(v0, a0, sa_value); 5934 __ dsll(v0, a0, sa_value);
5935 __ jr(ra); 5935 __ jr(ra);
5936 __ nop(); 5936 __ nop();
5937 5937
5938 CodeDesc desc; 5938 CodeDesc desc;
5939 assm.GetCode(&desc); 5939 assm.GetCode(isolate, &desc);
5940 Handle<Code> code = isolate->factory()->NewCode( 5940 Handle<Code> code = isolate->factory()->NewCode(
5941 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5941 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5942 5942
5943 F4 f = FUNCTION_CAST<F4>(code->entry()); 5943 F4 f = FUNCTION_CAST<F4>(code->entry());
5944 5944
5945 uint64_t res = reinterpret_cast<uint64_t>( 5945 uint64_t res = reinterpret_cast<uint64_t>(
5946 CALL_GENERATED_CODE(isolate, f, rt_value, 0, 0, 0, 0)); 5946 CALL_GENERATED_CODE(isolate, f, rt_value, 0, 0, 0, 0));
5947 5947
5948 return res; 5948 return res;
5949 } 5949 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
5985 5985
5986 __ mov(ra, t0); 5986 __ mov(ra, t0);
5987 __ jr(ra); 5987 __ jr(ra);
5988 __ nop(); 5988 __ nop();
5989 5989
5990 __ li(v0, 1); 5990 __ li(v0, 1);
5991 __ jr(ra); 5991 __ jr(ra);
5992 __ nop(); 5992 __ nop();
5993 5993
5994 CodeDesc desc; 5994 CodeDesc desc;
5995 assm.GetCode(&desc); 5995 assm.GetCode(isolate, &desc);
5996 Handle<Code> code = isolate->factory()->NewCode( 5996 Handle<Code> code = isolate->factory()->NewCode(
5997 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 5997 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
5998 5998
5999 F2 f = FUNCTION_CAST<F2>(code->entry()); 5999 F2 f = FUNCTION_CAST<F2>(code->entry());
6000 6000
6001 uint64_t res = reinterpret_cast<uint64_t>( 6001 uint64_t res = reinterpret_cast<uint64_t>(
6002 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 6002 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
6003 6003
6004 return res; 6004 return res;
6005 } 6005 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
6039 size_t nr_calls = kMaxBranchOffset / (2 * Instruction::kInstrSize) + 2; 6039 size_t nr_calls = kMaxBranchOffset / (2 * Instruction::kInstrSize) + 2;
6040 6040
6041 for (size_t i = 0; i < nr_calls; ++i) { 6041 for (size_t i = 0; i < nr_calls; ++i) {
6042 __ BranchShort(&done, eq, a0, Operand(a1)); 6042 __ BranchShort(&done, eq, a0, Operand(a1));
6043 } 6043 }
6044 __ bind(&done); 6044 __ bind(&done);
6045 __ Ret(USE_DELAY_SLOT); 6045 __ Ret(USE_DELAY_SLOT);
6046 __ mov(v0, zero_reg); 6046 __ mov(v0, zero_reg);
6047 6047
6048 CodeDesc desc; 6048 CodeDesc desc;
6049 assm.GetCode(&desc); 6049 assm.GetCode(isolate, &desc);
6050 Handle<Code> code = isolate->factory()->NewCode( 6050 Handle<Code> code = isolate->factory()->NewCode(
6051 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6051 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6052 F2 f = FUNCTION_CAST<F2>(code->entry()); 6052 F2 f = FUNCTION_CAST<F2>(code->entry());
6053 6053
6054 int64_t res = reinterpret_cast<int64_t>( 6054 int64_t res = reinterpret_cast<int64_t>(
6055 CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0)); 6055 CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0));
6056 CHECK_EQ(0, res); 6056 CHECK_EQ(0, res);
6057 } 6057 }
6058 6058
6059 template <class T> 6059 template <class T>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
6106 } else { 6106 } else {
6107 UNREACHABLE(); 6107 UNREACHABLE();
6108 } 6108 }
6109 6109
6110 func(assm); 6110 func(assm);
6111 6111
6112 __ jr(ra); 6112 __ jr(ra);
6113 __ nop(); 6113 __ nop();
6114 6114
6115 CodeDesc desc; 6115 CodeDesc desc;
6116 assm.GetCode(&desc); 6116 assm.GetCode(isolate, &desc);
6117 Handle<Code> code = isolate->factory()->NewCode( 6117 Handle<Code> code = isolate->factory()->NewCode(
6118 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6118 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6119 F3 f = FUNCTION_CAST<F3>(code->entry()); 6119 F3 f = FUNCTION_CAST<F3>(code->entry());
6120 6120
6121 const size_t kTableLength = sizeof(test_cases) / sizeof(TestCaseMaddMsub<T>); 6121 const size_t kTableLength = sizeof(test_cases) / sizeof(TestCaseMaddMsub<T>);
6122 TestCaseMaddMsub<T> tc; 6122 TestCaseMaddMsub<T> tc;
6123 for (size_t i = 0; i < kTableLength; i++) { 6123 for (size_t i = 0; i < kTableLength; i++) {
6124 tc.fr = test_cases[i].fr; 6124 tc.fr = test_cases[i].fr;
6125 tc.fs = test_cases[i].fs; 6125 tc.fs = test_cases[i].fs;
6126 tc.ft = test_cases[i].ft; 6126 tc.ft = test_cases[i].ft;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
6189 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 6189 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
6190 6190
6191 Label code_start; 6191 Label code_start;
6192 __ bind(&code_start); 6192 __ bind(&code_start);
6193 __ Subu(v0, zero_reg, Operand(imm)); 6193 __ Subu(v0, zero_reg, Operand(imm));
6194 CHECK_EQ(assm.InstructionsGeneratedSince(&code_start), num_instr); 6194 CHECK_EQ(assm.InstructionsGeneratedSince(&code_start), num_instr);
6195 __ jr(ra); 6195 __ jr(ra);
6196 __ nop(); 6196 __ nop();
6197 6197
6198 CodeDesc desc; 6198 CodeDesc desc;
6199 assm.GetCode(&desc); 6199 assm.GetCode(isolate, &desc);
6200 Handle<Code> code = isolate->factory()->NewCode( 6200 Handle<Code> code = isolate->factory()->NewCode(
6201 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6201 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6202 F2 f = FUNCTION_CAST<F2>(code->entry()); 6202 F2 f = FUNCTION_CAST<F2>(code->entry());
6203 6203
6204 uint64_t res = reinterpret_cast<uint64_t>( 6204 uint64_t res = reinterpret_cast<uint64_t>(
6205 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 6205 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
6206 6206
6207 return res; 6207 return res;
6208 } 6208 }
6209 6209
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
6268 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 6268 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
6269 6269
6270 Label code_start; 6270 Label code_start;
6271 __ bind(&code_start); 6271 __ bind(&code_start);
6272 __ Dsubu(v0, zero_reg, Operand(imm)); 6272 __ Dsubu(v0, zero_reg, Operand(imm));
6273 CHECK_EQ(assm.InstructionsGeneratedSince(&code_start), num_instr); 6273 CHECK_EQ(assm.InstructionsGeneratedSince(&code_start), num_instr);
6274 __ jr(ra); 6274 __ jr(ra);
6275 __ nop(); 6275 __ nop();
6276 6276
6277 CodeDesc desc; 6277 CodeDesc desc;
6278 assm.GetCode(&desc); 6278 assm.GetCode(isolate, &desc);
6279 Handle<Code> code = isolate->factory()->NewCode( 6279 Handle<Code> code = isolate->factory()->NewCode(
6280 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6280 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6281 F2 f = FUNCTION_CAST<F2>(code->entry()); 6281 F2 f = FUNCTION_CAST<F2>(code->entry());
6282 6282
6283 uint64_t res = reinterpret_cast<uint64_t>( 6283 uint64_t res = reinterpret_cast<uint64_t>(
6284 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 6284 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
6285 6285
6286 return res; 6286 return res;
6287 } 6287 }
6288 6288
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
6355 6355
6356 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes); 6356 MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
6357 6357
6358 __ li(v0, imm); 6358 __ li(v0, imm);
6359 __ li(t0, source); 6359 __ li(t0, source);
6360 __ Dins(v0, t0, pos, size); 6360 __ Dins(v0, t0, pos, size);
6361 __ jr(ra); 6361 __ jr(ra);
6362 __ nop(); 6362 __ nop();
6363 6363
6364 CodeDesc desc; 6364 CodeDesc desc;
6365 assm.GetCode(&desc); 6365 assm.GetCode(isolate, &desc);
6366 Handle<Code> code = isolate->factory()->NewCode( 6366 Handle<Code> code = isolate->factory()->NewCode(
6367 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6367 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6368 F2 f = FUNCTION_CAST<F2>(code->entry()); 6368 F2 f = FUNCTION_CAST<F2>(code->entry());
6369 6369
6370 uint64_t res = reinterpret_cast<uint64_t>( 6370 uint64_t res = reinterpret_cast<uint64_t>(
6371 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); 6371 CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
6372 6372
6373 return res; 6373 return res;
6374 } 6374 }
6375 6375
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
6451 __ copy_s_w(t1, w4, 1); 6451 __ copy_s_w(t1, w4, 1);
6452 __ sd(t1, MemOperand(a0, offsetof(T, s32))); 6452 __ sd(t1, MemOperand(a0, offsetof(T, s32)));
6453 __ copy_s_d(t1, w6, 0); 6453 __ copy_s_d(t1, w6, 0);
6454 __ sd(t1, MemOperand(a0, offsetof(T, s64))); 6454 __ sd(t1, MemOperand(a0, offsetof(T, s64)));
6455 6455
6456 __ jr(ra); 6456 __ jr(ra);
6457 __ nop(); 6457 __ nop();
6458 } 6458 }
6459 6459
6460 CodeDesc desc; 6460 CodeDesc desc;
6461 assm.GetCode(&desc); 6461 assm.GetCode(isolate, &desc);
6462 Handle<Code> code = isolate->factory()->NewCode( 6462 Handle<Code> code = isolate->factory()->NewCode(
6463 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6463 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6464 #ifdef OBJECT_PRINT 6464 #ifdef OBJECT_PRINT
6465 code->Print(std::cout); 6465 code->Print(std::cout);
6466 #endif 6466 #endif
6467 F3 f = FUNCTION_CAST<F3>(code->entry()); 6467 F3 f = FUNCTION_CAST<F3>(code->entry());
6468 6468
6469 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 6469 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
6470 USE(dummy); 6470 USE(dummy);
6471 6471
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
6515 6515
6516 STORE_MSA_REG(w0, a0, t2) 6516 STORE_MSA_REG(w0, a0, t2)
6517 STORE_MSA_REG(w2, a1, t2) 6517 STORE_MSA_REG(w2, a1, t2)
6518 #undef STORE_MSA_REG 6518 #undef STORE_MSA_REG
6519 6519
6520 __ jr(ra); 6520 __ jr(ra);
6521 __ nop(); 6521 __ nop();
6522 } 6522 }
6523 6523
6524 CodeDesc desc; 6524 CodeDesc desc;
6525 assm.GetCode(&desc); 6525 assm.GetCode(isolate, &desc);
6526 Handle<Code> code = isolate->factory()->NewCode( 6526 Handle<Code> code = isolate->factory()->NewCode(
6527 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6527 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6528 #ifdef OBJECT_PRINT 6528 #ifdef OBJECT_PRINT
6529 code->Print(std::cout); 6529 code->Print(std::cout);
6530 #endif 6530 #endif
6531 F5 f = FUNCTION_CAST<F5>(code->entry()); 6531 F5 f = FUNCTION_CAST<F5>(code->entry());
6532 6532
6533 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0); 6533 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0);
6534 USE(dummy); 6534 USE(dummy);
6535 6535
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
6569 __ fill_d(w2, t1); 6569 __ fill_d(w2, t1);
6570 6570
6571 __ Sdc1(f0, MemOperand(a0, offsetof(T, d0))); 6571 __ Sdc1(f0, MemOperand(a0, offsetof(T, d0)));
6572 __ Sdc1(f2, MemOperand(a1, offsetof(T, d0))); 6572 __ Sdc1(f2, MemOperand(a1, offsetof(T, d0)));
6573 6573
6574 __ jr(ra); 6574 __ jr(ra);
6575 __ nop(); 6575 __ nop();
6576 } 6576 }
6577 6577
6578 CodeDesc desc; 6578 CodeDesc desc;
6579 assm.GetCode(&desc); 6579 assm.GetCode(isolate, &desc);
6580 Handle<Code> code = isolate->factory()->NewCode( 6580 Handle<Code> code = isolate->factory()->NewCode(
6581 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6581 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6582 #ifdef OBJECT_PRINT 6582 #ifdef OBJECT_PRINT
6583 code->Print(std::cout); 6583 code->Print(std::cout);
6584 #endif 6584 #endif
6585 F5 f = FUNCTION_CAST<F5>(code->entry()); 6585 F5 f = FUNCTION_CAST<F5>(code->entry());
6586 6586
6587 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0); 6587 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0);
6588 USE(dummy); 6588 USE(dummy);
6589 6589
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
6632 __ sw(t2, MemOperand(a0, 4)); 6632 __ sw(t2, MemOperand(a0, 4));
6633 __ copy_u_w(t2, w0, 2); 6633 __ copy_u_w(t2, w0, 2);
6634 __ sw(t2, MemOperand(a0, 8)); 6634 __ sw(t2, MemOperand(a0, 8));
6635 __ copy_u_w(t2, w0, 3); 6635 __ copy_u_w(t2, w0, 3);
6636 __ sw(t2, MemOperand(a0, 12)); 6636 __ sw(t2, MemOperand(a0, 12));
6637 6637
6638 __ jr(ra); 6638 __ jr(ra);
6639 __ nop(); 6639 __ nop();
6640 6640
6641 CodeDesc desc; 6641 CodeDesc desc;
6642 assm.GetCode(&desc); 6642 assm.GetCode(isolate, &desc);
6643 Handle<Code> code = isolate->factory()->NewCode( 6643 Handle<Code> code = isolate->factory()->NewCode(
6644 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6644 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6645 #ifdef OBJECT_PRINT 6645 #ifdef OBJECT_PRINT
6646 code->Print(std::cout); 6646 code->Print(std::cout);
6647 #endif 6647 #endif
6648 F3 f = FUNCTION_CAST<F3>(code->entry()); 6648 F3 f = FUNCTION_CAST<F3>(code->entry());
6649 6649
6650 (CALL_GENERATED_CODE(isolate, f, w, 0, 0, 0, 0)); 6650 (CALL_GENERATED_CODE(isolate, f, w, 0, 0, 0, 0));
6651 } 6651 }
6652 6652
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
6789 __ sw(t2, MemOperand(a0, 8)); 6789 __ sw(t2, MemOperand(a0, 8));
6790 __ copy_u_w(t2, w2, 3); 6790 __ copy_u_w(t2, w2, 3);
6791 __ sw(t2, MemOperand(a0, 12)); 6791 __ sw(t2, MemOperand(a0, 12));
6792 6792
6793 __ jr(ra); 6793 __ jr(ra);
6794 __ nop(); 6794 __ nop();
6795 6795
6796 #undef LOAD_W_REG 6796 #undef LOAD_W_REG
6797 6797
6798 CodeDesc desc; 6798 CodeDesc desc;
6799 assm.GetCode(&desc); 6799 assm.GetCode(isolate, &desc);
6800 Handle<Code> code = isolate->factory()->NewCode( 6800 Handle<Code> code = isolate->factory()->NewCode(
6801 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 6801 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
6802 #ifdef OBJECT_PRINT 6802 #ifdef OBJECT_PRINT
6803 code->Print(std::cout); 6803 code->Print(std::cout);
6804 #endif 6804 #endif
6805 F3 f = FUNCTION_CAST<F3>(code->entry()); 6805 F3 f = FUNCTION_CAST<F3>(code->entry());
6806 6806
6807 (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0)); 6807 (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
6808 6808
6809 uint64_t mask = i8 * 0x0101010101010101ull; 6809 uint64_t mask = i8 * 0x0101010101010101ull;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
6955 }; 6955 };
6956 6956
6957 for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) { 6957 for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) {
6958 run_msa_i8(SHF_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8); 6958 run_msa_i8(SHF_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
6959 run_msa_i8(SHF_H, tc[i].input_lo, tc[i].input_hi, tc[i].i8); 6959 run_msa_i8(SHF_H, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
6960 run_msa_i8(SHF_W, tc[i].input_lo, tc[i].input_hi, tc[i].i8); 6960 run_msa_i8(SHF_W, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
6961 } 6961 }
6962 } 6962 }
6963 6963
6964 #undef __ 6964 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-mips.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698