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

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

Issue 17634003: Fixes bugs in arm and mips intrinsifier. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | tests/co19/co19-runtime.status » ('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 <math.h> // for isnan. 5 #include <math.h> // for isnan.
6 #include <setjmp.h> 6 #include <setjmp.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #if defined(TARGET_ARCH_MIPS) 10 #if defined(TARGET_ARCH_MIPS)
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 UnimplementedInstruction(instr); 1643 UnimplementedInstruction(instr);
1644 break; 1644 break;
1645 } 1645 }
1646 } 1646 }
1647 break; 1647 break;
1648 } 1648 }
1649 case COP1_CVT_W: { 1649 case COP1_CVT_W: {
1650 switch (instr->FormatField()) { 1650 switch (instr->FormatField()) {
1651 case FMT_D: { 1651 case FMT_D: {
1652 double fs_dbl = get_fregister_double(instr->FsField()); 1652 double fs_dbl = get_fregister_double(instr->FsField());
1653 int32_t fs_int = static_cast<int32_t>(fs_dbl); 1653 int32_t fs_int;
1654 if (isnan(fs_dbl) || isinf(fs_dbl) || (fs_dbl > INT_MAX) ||
1655 (fs_dbl < INT_MIN)) {
1656 fs_int = INT_MIN;
1657 } else {
1658 fs_int = static_cast<int32_t>(fs_dbl);
1659 }
1654 set_fregister(instr->FdField(), fs_int); 1660 set_fregister(instr->FdField(), fs_int);
1655 break; 1661 break;
1656 } 1662 }
1657 default: { 1663 default: {
1658 OS::PrintErr("DecodeCop1: 0x%x\n", instr->InstructionBits()); 1664 OS::PrintErr("DecodeCop1: 0x%x\n", instr->InstructionBits());
1659 UnimplementedInstruction(instr); 1665 UnimplementedInstruction(instr);
1660 break; 1666 break;
1661 } 1667 }
1662 } 1668 }
1663 break; 1669 break;
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 2228 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
2223 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 2229 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
2224 buf->Longjmp(); 2230 buf->Longjmp();
2225 } 2231 }
2226 2232
2227 } // namespace dart 2233 } // namespace dart
2228 2234
2229 #endif // !defined(HOST_ARCH_MIPS) 2235 #endif // !defined(HOST_ARCH_MIPS)
2230 2236
2231 #endif // defined TARGET_ARCH_MIPS 2237 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698