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

Side by Side Diff: runtime/vm/intrinsifier_mips.cc

Issue 1765623002: Use TRUNC.W instead of CVT.W on mips to convert from double to int as to not (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments 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 | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/simulator_mips.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 __ andi(CMPRES1, T0, Immediate(1)); // Check if the bit is set. 1531 __ andi(CMPRES1, T0, Immediate(1)); // Check if the bit is set.
1532 __ bne(T0, ZR, &is_true); // Sign bit set. True. 1532 __ bne(T0, ZR, &is_true); // Sign bit set. True.
1533 __ b(&is_false); 1533 __ b(&is_false);
1534 } 1534 }
1535 1535
1536 1536
1537 void Intrinsifier::DoubleToInteger(Assembler* assembler) { 1537 void Intrinsifier::DoubleToInteger(Assembler* assembler) {
1538 __ lw(T0, Address(SP, 0 * kWordSize)); 1538 __ lw(T0, Address(SP, 0 * kWordSize));
1539 __ LoadDFromOffset(D0, T0, Double::value_offset() - kHeapObjectTag); 1539 __ LoadDFromOffset(D0, T0, Double::value_offset() - kHeapObjectTag);
1540 1540
1541 __ cvtwd(F2, D0); 1541 __ truncwd(F2, D0);
1542 __ mfc1(V0, F2); 1542 __ mfc1(V0, F2);
1543 1543
1544 // Overflow is signaled with minint. 1544 // Overflow is signaled with minint.
1545 Label fall_through; 1545 Label fall_through;
1546 // Check for overflow and that it fits into Smi. 1546 // Check for overflow and that it fits into Smi.
1547 __ LoadImmediate(TMP, 0xC0000000); 1547 __ LoadImmediate(TMP, 0xC0000000);
1548 __ subu(CMPRES1, V0, TMP); 1548 __ subu(CMPRES1, V0, TMP);
1549 __ bltz(CMPRES1, &fall_through); 1549 __ bltz(CMPRES1, &fall_through);
1550 __ Ret(); 1550 __ Ret();
1551 __ delay_slot()->SmiTag(V0); 1551 __ delay_slot()->SmiTag(V0);
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 2228
2229 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2229 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2230 __ LoadIsolate(V0); 2230 __ LoadIsolate(V0);
2231 __ Ret(); 2231 __ Ret();
2232 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); 2232 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
2233 } 2233 }
2234 2234
2235 } // namespace dart 2235 } // namespace dart
2236 2236
2237 #endif // defined TARGET_ARCH_MIPS 2237 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698