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

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

Issue 1425143003: VM: Improve and fix double negation on MIPS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 <setjmp.h> // NOLINT 5 #include <setjmp.h> // NOLINT
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #if defined(TARGET_ARCH_MIPS) 9 #if defined(TARGET_ARCH_MIPS)
10 10
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 ASSERT(instr->FormatField() == FMT_D); // Only D supported. 1806 ASSERT(instr->FormatField() == FMT_D); // Only D supported.
1807 set_fregister_double(instr->FdField(), sqrt(fs_val)); 1807 set_fregister_double(instr->FdField(), sqrt(fs_val));
1808 break; 1808 break;
1809 } 1809 }
1810 case COP1_MOV: { 1810 case COP1_MOV: {
1811 // Format(instr, "mov.'fmt 'fd, 'fs"); 1811 // Format(instr, "mov.'fmt 'fd, 'fs");
1812 ASSERT(instr->FormatField() == FMT_D); // Only D supported. 1812 ASSERT(instr->FormatField() == FMT_D); // Only D supported.
1813 set_fregister_double(instr->FdField(), fs_val); 1813 set_fregister_double(instr->FdField(), fs_val);
1814 break; 1814 break;
1815 } 1815 }
1816 case COP1_NEG: {
1817 // Format(instr, "neg.'fmt 'fd, 'fs");
1818 ASSERT(instr->FormatField() == FMT_D);
1819 set_fregister_double(instr->FdField(), -fs_val);
1820 break;
1821 }
1816 case COP1_C_F: { 1822 case COP1_C_F: {
1817 ASSERT(instr->FormatField() == FMT_D); // Only D supported. 1823 ASSERT(instr->FormatField() == FMT_D); // Only D supported.
1818 ASSERT(instr->FdField() == F0); 1824 ASSERT(instr->FdField() == F0);
1819 set_fcsr_bit(fcsr_cc, false); 1825 set_fcsr_bit(fcsr_cc, false);
1820 break; 1826 break;
1821 } 1827 }
1822 case COP1_C_UN: { 1828 case COP1_C_UN: {
1823 ASSERT(instr->FormatField() == FMT_D); // Only D supported. 1829 ASSERT(instr->FormatField() == FMT_D); // Only D supported.
1824 ASSERT(instr->FdField() == F0); 1830 ASSERT(instr->FdField() == F0);
1825 set_fcsr_bit(fcsr_cc, isnan(fs_val) || isnan(ft_val)); 1831 set_fcsr_bit(fcsr_cc, isnan(fs_val) || isnan(ft_val));
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 2489 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
2484 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 2490 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
2485 buf->Longjmp(); 2491 buf->Longjmp();
2486 } 2492 }
2487 2493
2488 } // namespace dart 2494 } // namespace dart
2489 2495
2490 #endif // defined(USING_SIMULATOR) 2496 #endif // defined(USING_SIMULATOR)
2491 2497
2492 #endif // defined TARGET_ARCH_MIPS 2498 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698