OLD | NEW |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // Addition. | 69 // Addition. |
70 __ addu(v0, a0, a1); | 70 __ addu(v0, a0, a1); |
71 __ jr(ra); | 71 __ jr(ra); |
72 __ nop(); | 72 __ nop(); |
73 | 73 |
74 CodeDesc desc; | 74 CodeDesc desc; |
75 assm.GetCode(&desc); | 75 assm.GetCode(&desc); |
76 Object* code = HEAP->CreateCode( | 76 Object* code = HEAP->CreateCode( |
77 desc, | 77 desc, |
78 Code::ComputeFlags(Code::STUB), | 78 Code::ComputeFlags(Code::STUB), |
79 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 79 Handle<Code>())->ToObjectChecked(); |
80 CHECK(code->IsCode()); | 80 CHECK(code->IsCode()); |
81 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry()); | 81 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry()); |
82 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); | 82 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); |
83 ::printf("f() = %d\n", res); | 83 ::printf("f() = %d\n", res); |
84 CHECK_EQ(0xabc, res); | 84 CHECK_EQ(0xabc, res); |
85 } | 85 } |
86 | 86 |
87 | 87 |
88 TEST(MIPS1) { | 88 TEST(MIPS1) { |
89 InitializeVM(); | 89 InitializeVM(); |
(...skipping 17 matching lines...) Expand all Loading... |
107 __ nop(); | 107 __ nop(); |
108 | 108 |
109 __ jr(ra); | 109 __ jr(ra); |
110 __ nop(); | 110 __ nop(); |
111 | 111 |
112 CodeDesc desc; | 112 CodeDesc desc; |
113 assm.GetCode(&desc); | 113 assm.GetCode(&desc); |
114 Object* code = HEAP->CreateCode( | 114 Object* code = HEAP->CreateCode( |
115 desc, | 115 desc, |
116 Code::ComputeFlags(Code::STUB), | 116 Code::ComputeFlags(Code::STUB), |
117 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 117 Handle<Code>())->ToObjectChecked(); |
118 CHECK(code->IsCode()); | 118 CHECK(code->IsCode()); |
119 F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry()); | 119 F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry()); |
120 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0)); | 120 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0)); |
121 ::printf("f() = %d\n", res); | 121 ::printf("f() = %d\n", res); |
122 CHECK_EQ(1275, res); | 122 CHECK_EQ(1275, res); |
123 } | 123 } |
124 | 124 |
125 | 125 |
126 TEST(MIPS2) { | 126 TEST(MIPS2) { |
127 InitializeVM(); | 127 InitializeVM(); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 __ bind(&exit); | 248 __ bind(&exit); |
249 __ jr(ra); | 249 __ jr(ra); |
250 __ nop(); | 250 __ nop(); |
251 | 251 |
252 CodeDesc desc; | 252 CodeDesc desc; |
253 assm.GetCode(&desc); | 253 assm.GetCode(&desc); |
254 Object* code = HEAP->CreateCode( | 254 Object* code = HEAP->CreateCode( |
255 desc, | 255 desc, |
256 Code::ComputeFlags(Code::STUB), | 256 Code::ComputeFlags(Code::STUB), |
257 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 257 Handle<Code>())->ToObjectChecked(); |
258 CHECK(code->IsCode()); | 258 CHECK(code->IsCode()); |
259 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry()); | 259 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry()); |
260 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); | 260 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); |
261 ::printf("f() = %d\n", res); | 261 ::printf("f() = %d\n", res); |
262 CHECK_EQ(0x31415926, res); | 262 CHECK_EQ(0x31415926, res); |
263 } | 263 } |
264 | 264 |
265 | 265 |
266 TEST(MIPS3) { | 266 TEST(MIPS3) { |
267 // Test floating point instructions. | 267 // Test floating point instructions. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 } | 322 } |
323 | 323 |
324 __ jr(ra); | 324 __ jr(ra); |
325 __ nop(); | 325 __ nop(); |
326 | 326 |
327 CodeDesc desc; | 327 CodeDesc desc; |
328 assm.GetCode(&desc); | 328 assm.GetCode(&desc); |
329 Object* code = HEAP->CreateCode( | 329 Object* code = HEAP->CreateCode( |
330 desc, | 330 desc, |
331 Code::ComputeFlags(Code::STUB), | 331 Code::ComputeFlags(Code::STUB), |
332 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 332 Handle<Code>())->ToObjectChecked(); |
333 CHECK(code->IsCode()); | 333 CHECK(code->IsCode()); |
334 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 334 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
335 t.a = 1.5e14; | 335 t.a = 1.5e14; |
336 t.b = 2.75e11; | 336 t.b = 2.75e11; |
337 t.c = 0.0; | 337 t.c = 0.0; |
338 t.d = 0.0; | 338 t.d = 0.0; |
339 t.e = 0.0; | 339 t.e = 0.0; |
340 t.f = 0.0; | 340 t.f = 0.0; |
341 t.h = 1.5; | 341 t.h = 1.5; |
342 t.i = 2.75; | 342 t.i = 2.75; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, c)) ); | 391 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, c)) ); |
392 | 392 |
393 __ jr(ra); | 393 __ jr(ra); |
394 __ nop(); | 394 __ nop(); |
395 | 395 |
396 CodeDesc desc; | 396 CodeDesc desc; |
397 assm.GetCode(&desc); | 397 assm.GetCode(&desc); |
398 Object* code = HEAP->CreateCode( | 398 Object* code = HEAP->CreateCode( |
399 desc, | 399 desc, |
400 Code::ComputeFlags(Code::STUB), | 400 Code::ComputeFlags(Code::STUB), |
401 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 401 Handle<Code>())->ToObjectChecked(); |
402 CHECK(code->IsCode()); | 402 CHECK(code->IsCode()); |
403 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 403 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
404 t.a = 1.5e22; | 404 t.a = 1.5e22; |
405 t.b = 2.75e11; | 405 t.b = 2.75e11; |
406 t.c = 17.17; | 406 t.c = 17.17; |
407 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 407 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
408 USE(dummy); | 408 USE(dummy); |
409 | 409 |
410 CHECK_EQ(2.75e11, t.a); | 410 CHECK_EQ(2.75e11, t.a); |
411 CHECK_EQ(2.75e11, t.b); | 411 CHECK_EQ(2.75e11, t.b); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 __ sdc1(f2, MemOperand(a0, OFFSET_OF(T, b)) ); | 460 __ sdc1(f2, MemOperand(a0, OFFSET_OF(T, b)) ); |
461 | 461 |
462 __ jr(ra); | 462 __ jr(ra); |
463 __ nop(); | 463 __ nop(); |
464 | 464 |
465 CodeDesc desc; | 465 CodeDesc desc; |
466 assm.GetCode(&desc); | 466 assm.GetCode(&desc); |
467 Object* code = HEAP->CreateCode( | 467 Object* code = HEAP->CreateCode( |
468 desc, | 468 desc, |
469 Code::ComputeFlags(Code::STUB), | 469 Code::ComputeFlags(Code::STUB), |
470 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 470 Handle<Code>())->ToObjectChecked(); |
471 CHECK(code->IsCode()); | 471 CHECK(code->IsCode()); |
472 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 472 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
473 t.a = 1.5e4; | 473 t.a = 1.5e4; |
474 t.b = 2.75e8; | 474 t.b = 2.75e8; |
475 t.i = 12345678; | 475 t.i = 12345678; |
476 t.j = -100000; | 476 t.j = -100000; |
477 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 477 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
478 USE(dummy); | 478 USE(dummy); |
479 | 479 |
480 CHECK_EQ(12345678.0, t.a); | 480 CHECK_EQ(12345678.0, t.a); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 __ sh(t5, MemOperand(a0, OFFSET_OF(T, r6)) ); | 533 __ sh(t5, MemOperand(a0, OFFSET_OF(T, r6)) ); |
534 | 534 |
535 __ jr(ra); | 535 __ jr(ra); |
536 __ nop(); | 536 __ nop(); |
537 | 537 |
538 CodeDesc desc; | 538 CodeDesc desc; |
539 assm.GetCode(&desc); | 539 assm.GetCode(&desc); |
540 Object* code = HEAP->CreateCode( | 540 Object* code = HEAP->CreateCode( |
541 desc, | 541 desc, |
542 Code::ComputeFlags(Code::STUB), | 542 Code::ComputeFlags(Code::STUB), |
543 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 543 Handle<Code>())->ToObjectChecked(); |
544 CHECK(code->IsCode()); | 544 CHECK(code->IsCode()); |
545 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 545 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
546 t.ui = 0x11223344; | 546 t.ui = 0x11223344; |
547 t.si = 0x99aabbcc; | 547 t.si = 0x99aabbcc; |
548 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 548 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
549 USE(dummy); | 549 USE(dummy); |
550 | 550 |
551 CHECK_EQ(0x11223344, t.r1); | 551 CHECK_EQ(0x11223344, t.r1); |
552 CHECK_EQ(0x3344, t.r2); | 552 CHECK_EQ(0x3344, t.r2); |
553 CHECK_EQ(0xffffbbcc, t.r3); | 553 CHECK_EQ(0xffffbbcc, t.r3); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 __ bind(&outa_here); | 612 __ bind(&outa_here); |
613 | 613 |
614 __ jr(ra); | 614 __ jr(ra); |
615 __ nop(); | 615 __ nop(); |
616 | 616 |
617 CodeDesc desc; | 617 CodeDesc desc; |
618 assm.GetCode(&desc); | 618 assm.GetCode(&desc); |
619 Object* code = HEAP->CreateCode( | 619 Object* code = HEAP->CreateCode( |
620 desc, | 620 desc, |
621 Code::ComputeFlags(Code::STUB), | 621 Code::ComputeFlags(Code::STUB), |
622 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 622 Handle<Code>())->ToObjectChecked(); |
623 CHECK(code->IsCode()); | 623 CHECK(code->IsCode()); |
624 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 624 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
625 t.a = 1.5e14; | 625 t.a = 1.5e14; |
626 t.b = 2.75e11; | 626 t.b = 2.75e11; |
627 t.c = 2.0; | 627 t.c = 2.0; |
628 t.d = -4.0; | 628 t.d = -4.0; |
629 t.e = 0.0; | 629 t.e = 0.0; |
630 t.f = 0.0; | 630 t.f = 0.0; |
631 t.result = 0; | 631 t.result = 0; |
632 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 632 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 __ sw(t7, MemOperand(a0, OFFSET_OF(T, result_rotrv_28)) ); | 711 __ sw(t7, MemOperand(a0, OFFSET_OF(T, result_rotrv_28)) ); |
712 | 712 |
713 __ jr(ra); | 713 __ jr(ra); |
714 __ nop(); | 714 __ nop(); |
715 | 715 |
716 CodeDesc desc; | 716 CodeDesc desc; |
717 assm.GetCode(&desc); | 717 assm.GetCode(&desc); |
718 Object* code = HEAP->CreateCode( | 718 Object* code = HEAP->CreateCode( |
719 desc, | 719 desc, |
720 Code::ComputeFlags(Code::STUB), | 720 Code::ComputeFlags(Code::STUB), |
721 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 721 Handle<Code>())->ToObjectChecked(); |
722 CHECK(code->IsCode()); | 722 CHECK(code->IsCode()); |
723 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 723 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
724 t.input = 0x12345678; | 724 t.input = 0x12345678; |
725 Object* dummy = CALL_GENERATED_CODE(f, &t, 0x0, 0, 0, 0); | 725 Object* dummy = CALL_GENERATED_CODE(f, &t, 0x0, 0, 0, 0); |
726 USE(dummy); | 726 USE(dummy); |
727 CHECK_EQ(0x81234567, t.result_rotr_4); | 727 CHECK_EQ(0x81234567, t.result_rotr_4); |
728 CHECK_EQ(0x78123456, t.result_rotr_8); | 728 CHECK_EQ(0x78123456, t.result_rotr_8); |
729 CHECK_EQ(0x67812345, t.result_rotr_12); | 729 CHECK_EQ(0x67812345, t.result_rotr_12); |
730 CHECK_EQ(0x56781234, t.result_rotr_16); | 730 CHECK_EQ(0x56781234, t.result_rotr_16); |
731 CHECK_EQ(0x45678123, t.result_rotr_20); | 731 CHECK_EQ(0x45678123, t.result_rotr_20); |
(...skipping 26 matching lines...) Expand all Loading... |
758 __ bind(&exit2); | 758 __ bind(&exit2); |
759 __ bind(&exit3); | 759 __ bind(&exit3); |
760 __ jr(ra); | 760 __ jr(ra); |
761 __ nop(); | 761 __ nop(); |
762 | 762 |
763 CodeDesc desc; | 763 CodeDesc desc; |
764 assm.GetCode(&desc); | 764 assm.GetCode(&desc); |
765 Object* code = HEAP->CreateCode( | 765 Object* code = HEAP->CreateCode( |
766 desc, | 766 desc, |
767 Code::ComputeFlags(Code::STUB), | 767 Code::ComputeFlags(Code::STUB), |
768 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 768 Handle<Code>())->ToObjectChecked(); |
769 CHECK(code->IsCode()); | 769 CHECK(code->IsCode()); |
770 } | 770 } |
771 | 771 |
772 | 772 |
773 TEST(MIPS10) { | 773 TEST(MIPS10) { |
774 // Test conversions between doubles and long integers. | 774 // Test conversions between doubles and long integers. |
775 // Test hos the long ints map to FP regs pairs. | 775 // Test hos the long ints map to FP regs pairs. |
776 InitializeVM(); | 776 InitializeVM(); |
777 v8::HandleScope scope; | 777 v8::HandleScope scope; |
778 | 778 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 __ sdc1(f10, MemOperand(a0, OFFSET_OF(T, b))); | 819 __ sdc1(f10, MemOperand(a0, OFFSET_OF(T, b))); |
820 | 820 |
821 __ jr(ra); | 821 __ jr(ra); |
822 __ nop(); | 822 __ nop(); |
823 | 823 |
824 CodeDesc desc; | 824 CodeDesc desc; |
825 assm.GetCode(&desc); | 825 assm.GetCode(&desc); |
826 Object* code = HEAP->CreateCode( | 826 Object* code = HEAP->CreateCode( |
827 desc, | 827 desc, |
828 Code::ComputeFlags(Code::STUB), | 828 Code::ComputeFlags(Code::STUB), |
829 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 829 Handle<Code>())->ToObjectChecked(); |
830 CHECK(code->IsCode()); | 830 CHECK(code->IsCode()); |
831 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 831 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
832 t.a = 2.147483647e9; // 0x7fffffff -> 0x41DFFFFFFFC00000 as double. | 832 t.a = 2.147483647e9; // 0x7fffffff -> 0x41DFFFFFFFC00000 as double. |
833 t.b_long_hi = 0x000000ff; // 0xFF00FF00FF -> 0x426FE01FE01FE000 as double. | 833 t.b_long_hi = 0x000000ff; // 0xFF00FF00FF -> 0x426FE01FE01FE000 as double. |
834 t.b_long_lo = 0x00ff00ff; | 834 t.b_long_lo = 0x00ff00ff; |
835 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 835 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
836 USE(dummy); | 836 USE(dummy); |
837 | 837 |
838 CHECK_EQ(0x41DFFFFF, t.dbl_exp); | 838 CHECK_EQ(0x41DFFFFF, t.dbl_exp); |
839 CHECK_EQ(0xFFC00000, t.dbl_mant); | 839 CHECK_EQ(0xFFC00000, t.dbl_mant); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 __ swr(t3, MemOperand(a0, OFFSET_OF(T, swr_3) + 3) ); | 951 __ swr(t3, MemOperand(a0, OFFSET_OF(T, swr_3) + 3) ); |
952 | 952 |
953 __ jr(ra); | 953 __ jr(ra); |
954 __ nop(); | 954 __ nop(); |
955 | 955 |
956 CodeDesc desc; | 956 CodeDesc desc; |
957 assm.GetCode(&desc); | 957 assm.GetCode(&desc); |
958 Object* code = HEAP->CreateCode( | 958 Object* code = HEAP->CreateCode( |
959 desc, | 959 desc, |
960 Code::ComputeFlags(Code::STUB), | 960 Code::ComputeFlags(Code::STUB), |
961 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 961 Handle<Code>())->ToObjectChecked(); |
962 CHECK(code->IsCode()); | 962 CHECK(code->IsCode()); |
963 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 963 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
964 t.reg_init = 0xaabbccdd; | 964 t.reg_init = 0xaabbccdd; |
965 t.mem_init = 0x11223344; | 965 t.mem_init = 0x11223344; |
966 | 966 |
967 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 967 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
968 USE(dummy); | 968 USE(dummy); |
969 | 969 |
970 CHECK_EQ(0x44bbccdd, t.lwl_0); | 970 CHECK_EQ(0x44bbccdd, t.lwl_0); |
971 CHECK_EQ(0x3344ccdd, t.lwl_1); | 971 CHECK_EQ(0x3344ccdd, t.lwl_1); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 | 1055 |
1056 __ mov(fp, t6); | 1056 __ mov(fp, t6); |
1057 __ jr(ra); | 1057 __ jr(ra); |
1058 __ nop(); | 1058 __ nop(); |
1059 | 1059 |
1060 CodeDesc desc; | 1060 CodeDesc desc; |
1061 assm.GetCode(&desc); | 1061 assm.GetCode(&desc); |
1062 Object* code = HEAP->CreateCode( | 1062 Object* code = HEAP->CreateCode( |
1063 desc, | 1063 desc, |
1064 Code::ComputeFlags(Code::STUB), | 1064 Code::ComputeFlags(Code::STUB), |
1065 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 1065 Handle<Code>())->ToObjectChecked(); |
1066 CHECK(code->IsCode()); | 1066 CHECK(code->IsCode()); |
1067 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 1067 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
1068 t.x = 1; | 1068 t.x = 1; |
1069 t.y = 2; | 1069 t.y = 2; |
1070 t.y1 = 3; | 1070 t.y1 = 3; |
1071 t.y2 = 4; | 1071 t.y2 = 4; |
1072 t.y3 = 0XBABA; | 1072 t.y3 = 0XBABA; |
1073 t.y4 = 0xDEDA; | 1073 t.y4 = 0xDEDA; |
1074 | 1074 |
1075 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 1075 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1114 __ swc1(f8, MemOperand(a0, OFFSET_OF(T, trunc_big_out))); | 1114 __ swc1(f8, MemOperand(a0, OFFSET_OF(T, trunc_big_out))); |
1115 | 1115 |
1116 __ jr(ra); | 1116 __ jr(ra); |
1117 __ nop(); | 1117 __ nop(); |
1118 | 1118 |
1119 CodeDesc desc; | 1119 CodeDesc desc; |
1120 assm.GetCode(&desc); | 1120 assm.GetCode(&desc); |
1121 Object* code = HEAP->CreateCode( | 1121 Object* code = HEAP->CreateCode( |
1122 desc, | 1122 desc, |
1123 Code::ComputeFlags(Code::STUB), | 1123 Code::ComputeFlags(Code::STUB), |
1124 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 1124 Handle<Code>())->ToObjectChecked(); |
1125 CHECK(code->IsCode()); | 1125 CHECK(code->IsCode()); |
1126 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 1126 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
1127 | 1127 |
1128 t.cvt_big_in = 0xFFFFFFFF; | 1128 t.cvt_big_in = 0xFFFFFFFF; |
1129 t.cvt_small_in = 333; | 1129 t.cvt_small_in = 333; |
1130 | 1130 |
1131 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 1131 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
1132 USE(dummy); | 1132 USE(dummy); |
1133 | 1133 |
1134 CHECK_EQ(t.cvt_big_out, static_cast<double>(t.cvt_big_in)); | 1134 CHECK_EQ(t.cvt_big_out, static_cast<double>(t.cvt_big_in)); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 __ ctc1(a1, FCSR); | 1238 __ ctc1(a1, FCSR); |
1239 | 1239 |
1240 __ jr(ra); | 1240 __ jr(ra); |
1241 __ nop(); | 1241 __ nop(); |
1242 | 1242 |
1243 CodeDesc desc; | 1243 CodeDesc desc; |
1244 assm.GetCode(&desc); | 1244 assm.GetCode(&desc); |
1245 Object* code = HEAP->CreateCode( | 1245 Object* code = HEAP->CreateCode( |
1246 desc, | 1246 desc, |
1247 Code::ComputeFlags(Code::STUB), | 1247 Code::ComputeFlags(Code::STUB), |
1248 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 1248 Handle<Code>())->ToObjectChecked(); |
1249 CHECK(code->IsCode()); | 1249 CHECK(code->IsCode()); |
1250 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); | 1250 F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry()); |
1251 | 1251 |
1252 t.round_up_in = 123.51; | 1252 t.round_up_in = 123.51; |
1253 t.round_down_in = 123.49; | 1253 t.round_down_in = 123.49; |
1254 t.neg_round_up_in = -123.5; | 1254 t.neg_round_up_in = -123.5; |
1255 t.neg_round_down_in = -123.49; | 1255 t.neg_round_down_in = -123.49; |
1256 t.err1_in = 123.51; | 1256 t.err1_in = 123.51; |
1257 t.err2_in = 1; | 1257 t.err2_in = 1; |
1258 t.err3_in = static_cast<double>(1) + 0xFFFFFFFF; | 1258 t.err3_in = static_cast<double>(1) + 0xFFFFFFFF; |
(...skipping 27 matching lines...) Expand all Loading... |
1286 Label target; | 1286 Label target; |
1287 __ beq(v0, v1, &target); | 1287 __ beq(v0, v1, &target); |
1288 __ nop(); | 1288 __ nop(); |
1289 __ bne(v0, v1, &target); | 1289 __ bne(v0, v1, &target); |
1290 __ nop(); | 1290 __ nop(); |
1291 __ bind(&target); | 1291 __ bind(&target); |
1292 __ nop(); | 1292 __ nop(); |
1293 } | 1293 } |
1294 | 1294 |
1295 #undef __ | 1295 #undef __ |
OLD | NEW |