| 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 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 uint32_t trunc_big_out; | 1149 uint32_t trunc_big_out; |
| 1150 uint32_t trunc_small_out; | 1150 uint32_t trunc_small_out; |
| 1151 uint32_t cvt_big_in; | 1151 uint32_t cvt_big_in; |
| 1152 uint32_t cvt_small_in; | 1152 uint32_t cvt_small_in; |
| 1153 } T; | 1153 } T; |
| 1154 T t; | 1154 T t; |
| 1155 | 1155 |
| 1156 MacroAssembler assm(isolate, NULL, 0); | 1156 MacroAssembler assm(isolate, NULL, 0); |
| 1157 | 1157 |
| 1158 __ sw(a4, MemOperand(a0, offsetof(T, cvt_small_in))); | 1158 __ sw(a4, MemOperand(a0, offsetof(T, cvt_small_in))); |
| 1159 __ Cvt_d_uw(f10, a4, f22); | 1159 __ Cvt_d_uw(f10, a4, f4); |
| 1160 __ sdc1(f10, MemOperand(a0, offsetof(T, cvt_small_out))); | 1160 __ sdc1(f10, MemOperand(a0, offsetof(T, cvt_small_out))); |
| 1161 | 1161 |
| 1162 __ Trunc_uw_d(f10, f10, f22); | 1162 __ Trunc_uw_d(f10, f10, f4); |
| 1163 __ swc1(f10, MemOperand(a0, offsetof(T, trunc_small_out))); | 1163 __ swc1(f10, MemOperand(a0, offsetof(T, trunc_small_out))); |
| 1164 | 1164 |
| 1165 __ sw(a4, MemOperand(a0, offsetof(T, cvt_big_in))); | 1165 __ sw(a4, MemOperand(a0, offsetof(T, cvt_big_in))); |
| 1166 __ Cvt_d_uw(f8, a4, f22); | 1166 __ Cvt_d_uw(f8, a4, f4); |
| 1167 __ sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out))); | 1167 __ sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out))); |
| 1168 | 1168 |
| 1169 __ Trunc_uw_d(f8, f8, f22); | 1169 __ Trunc_uw_d(f8, f8, f4); |
| 1170 __ swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out))); | 1170 __ swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out))); |
| 1171 | 1171 |
| 1172 __ jr(ra); | 1172 __ jr(ra); |
| 1173 __ nop(); | 1173 __ nop(); |
| 1174 | 1174 |
| 1175 CodeDesc desc; | 1175 CodeDesc desc; |
| 1176 assm.GetCode(&desc); | 1176 assm.GetCode(&desc); |
| 1177 Handle<Code> code = isolate->factory()->NewCode( | 1177 Handle<Code> code = isolate->factory()->NewCode( |
| 1178 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1178 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1179 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1179 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2603 }; | 2603 }; |
| 2604 | 2604 |
| 2605 | 2605 |
| 2606 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); | 2606 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 2607 __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)) ); | 2607 __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 2608 __ sqrt_s(f6, f2); | 2608 __ sqrt_s(f6, f2); |
| 2609 __ sqrt_d(f12, f8); | 2609 __ sqrt_d(f12, f8); |
| 2610 __ rsqrt_d(f14, f8); | 2610 __ rsqrt_d(f14, f8); |
| 2611 __ rsqrt_s(f16, f2); | 2611 __ rsqrt_s(f16, f2); |
| 2612 __ recip_d(f18, f8); | 2612 __ recip_d(f18, f8); |
| 2613 __ recip_s(f20, f2); | 2613 __ recip_s(f4, f2); |
| 2614 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) ); | 2614 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) ); |
| 2615 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) ); | 2615 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) ); |
| 2616 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1)) ); | 2616 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1)) ); |
| 2617 __ sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1)) ); | 2617 __ sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1)) ); |
| 2618 __ swc1(f20, MemOperand(a0, offsetof(TestFloat, resultS2)) ); | 2618 __ swc1(f4, MemOperand(a0, offsetof(TestFloat, resultS2)) ); |
| 2619 __ sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2)) ); | 2619 __ sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2)) ); |
| 2620 __ jr(ra); | 2620 __ jr(ra); |
| 2621 __ nop(); | 2621 __ nop(); |
| 2622 | 2622 |
| 2623 CodeDesc desc; | 2623 CodeDesc desc; |
| 2624 assm.GetCode(&desc); | 2624 assm.GetCode(&desc); |
| 2625 Handle<Code> code = isolate->factory()->NewCode( | 2625 Handle<Code> code = isolate->factory()->NewCode( |
| 2626 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2626 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2627 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2627 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2628 | 2628 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2795 4.8, 4.8, -4.8, -0.29 | 2795 4.8, 4.8, -4.8, -0.29 |
| 2796 }; | 2796 }; |
| 2797 | 2797 |
| 2798 float outputs_S[kTableLength] = { | 2798 float outputs_S[kTableLength] = { |
| 2799 4.8, 4.8, -4.8, -0.29 | 2799 4.8, 4.8, -4.8, -0.29 |
| 2800 }; | 2800 }; |
| 2801 double outputs_D[kTableLength] = { | 2801 double outputs_D[kTableLength] = { |
| 2802 5.3, -5.3, 5.3, -2.9 | 2802 5.3, -5.3, 5.3, -2.9 |
| 2803 }; | 2803 }; |
| 2804 | 2804 |
| 2805 __ ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); | 2805 __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 2806 __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) ); | 2806 __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 2807 __ mov_s(f18, f6); | 2807 __ mov_s(f8, f6); |
| 2808 __ mov_d(f20, f2); | 2808 __ mov_d(f10, f4); |
| 2809 __ swc1(f18, MemOperand(a0, offsetof(TestFloat, d)) ); | 2809 __ swc1(f8, MemOperand(a0, offsetof(TestFloat, d)) ); |
| 2810 __ sdc1(f20, MemOperand(a0, offsetof(TestFloat, b)) ); | 2810 __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, b)) ); |
| 2811 __ jr(ra); | 2811 __ jr(ra); |
| 2812 __ nop(); | 2812 __ nop(); |
| 2813 | 2813 |
| 2814 CodeDesc desc; | 2814 CodeDesc desc; |
| 2815 assm.GetCode(&desc); | 2815 assm.GetCode(&desc); |
| 2816 Handle<Code> code = isolate->factory()->NewCode( | 2816 Handle<Code> code = isolate->factory()->NewCode( |
| 2817 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2817 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2818 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2818 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2819 for (int i = 0; i < kTableLength; i++) { | 2819 for (int i = 0; i < kTableLength; i++) { |
| 2820 test.a = inputs_D[i]; | 2820 test.a = inputs_D[i]; |
| (...skipping 2636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5457 }; | 5457 }; |
| 5458 | 5458 |
| 5459 size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseBal); | 5459 size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseBal); |
| 5460 for (size_t i = 0; i < nr_test_cases; ++i) { | 5460 for (size_t i = 0; i < nr_test_cases; ++i) { |
| 5461 CHECK_EQ(tc[i].expected_res, run_bal(tc[i].offset)); | 5461 CHECK_EQ(tc[i].expected_res, run_bal(tc[i].offset)); |
| 5462 } | 5462 } |
| 5463 } | 5463 } |
| 5464 | 5464 |
| 5465 | 5465 |
| 5466 #undef __ | 5466 #undef __ |
| OLD | NEW |