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

Side by Side Diff: test/cctest/test-macro-assembler-mips64.cc

Issue 1812193003: MIPS64: Fix test Cvt_s_uw_Trunc_uw_s. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 CALL_GENERATED_CODE(isolate, f, x, 0, 0, 0, 0)); 597 CALL_GENERATED_CODE(isolate, f, x, 0, 0, 0, 0));
598 } 598 }
599 599
600 TEST(Cvt_s_uw_Trunc_uw_s) { 600 TEST(Cvt_s_uw_Trunc_uw_s) {
601 CcTest::InitializeVM(); 601 CcTest::InitializeVM();
602 FOR_UINT32_INPUTS(i) { 602 FOR_UINT32_INPUTS(i) {
603 uint32_t input = *i; 603 uint32_t input = *i;
604 CHECK_EQ(static_cast<float>(input), 604 CHECK_EQ(static_cast<float>(input),
605 run_Cvt<uint64_t>(input, [](MacroAssembler* masm) { 605 run_Cvt<uint64_t>(input, [](MacroAssembler* masm) {
606 __ Cvt_s_uw(f0, a0); 606 __ Cvt_s_uw(f0, a0);
607 __ mthc1(zero_reg, f2);
607 __ Trunc_uw_s(f2, f0, f1); 608 __ Trunc_uw_s(f2, f0, f1);
608 })); 609 }));
609 } 610 }
610 } 611 }
611 612
612 TEST(Cvt_s_ul_Trunc_ul_s) { 613 TEST(Cvt_s_ul_Trunc_ul_s) {
613 CcTest::InitializeVM(); 614 CcTest::InitializeVM();
614 FOR_UINT64_INPUTS(i) { 615 FOR_UINT64_INPUTS(i) {
615 uint64_t input = *i; 616 uint64_t input = *i;
616 CHECK_EQ(static_cast<float>(input), 617 CHECK_EQ(static_cast<float>(input),
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 __ mtc1(a0, f4); 670 __ mtc1(a0, f4);
670 __ cvt_d_w(f0, f4); 671 __ cvt_d_w(f0, f4);
671 __ Trunc_w_d(f2, f0); 672 __ Trunc_w_d(f2, f0);
672 __ mfc1(v1, f2); 673 __ mfc1(v1, f2);
673 __ dmtc1(v1, f2); 674 __ dmtc1(v1, f2);
674 })); 675 }));
675 } 676 }
676 } 677 }
677 678
678 #undef __ 679 #undef __
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698