| OLD | NEW |
| 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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 int32_t base_val = get_register(instr->RsField()); | 1755 int32_t base_val = get_register(instr->RsField()); |
| 1756 int32_t imm_val = instr->SImmField(); | 1756 int32_t imm_val = instr->SImmField(); |
| 1757 uword addr = base_val + imm_val; | 1757 uword addr = base_val + imm_val; |
| 1758 if (Simulator::IsIllegalAddress(addr)) { | 1758 if (Simulator::IsIllegalAddress(addr)) { |
| 1759 HandleIllegalAccess(addr, instr); | 1759 HandleIllegalAccess(addr, instr); |
| 1760 } else { | 1760 } else { |
| 1761 WriteB(addr, rt_val & 0xff); | 1761 WriteB(addr, rt_val & 0xff); |
| 1762 } | 1762 } |
| 1763 break; | 1763 break; |
| 1764 } | 1764 } |
| 1765 case SLTI: { |
| 1766 // Format(instr, "slti 'rt, 'rs, 'imms"); |
| 1767 int32_t rs_val = get_register(instr->RsField()); |
| 1768 int32_t imm_val = instr->SImmField(); |
| 1769 set_register(instr->RtField(), rs_val < imm_val ? 1 : 0); |
| 1770 break; |
| 1771 } |
| 1772 case SLTIU: { |
| 1773 // Format(instr, "slti 'rt, 'rs, 'immu"); |
| 1774 uint32_t rs_val = get_register(instr->RsField()); |
| 1775 uint32_t imm_val = instr->UImmField(); |
| 1776 set_register(instr->RtField(), rs_val < imm_val ? 1 : 0); |
| 1777 break; |
| 1778 } |
| 1765 case SDC1: { | 1779 case SDC1: { |
| 1766 // Format(instr, "sdc1 'ft, 'imms('rs)"); | 1780 // Format(instr, "sdc1 'ft, 'imms('rs)"); |
| 1767 int32_t base_val = get_register(instr->RsField()); | 1781 int32_t base_val = get_register(instr->RsField()); |
| 1768 int32_t imm_val = instr->SImmField(); | 1782 int32_t imm_val = instr->SImmField(); |
| 1769 uword addr = base_val + imm_val; | 1783 uword addr = base_val + imm_val; |
| 1770 if (Simulator::IsIllegalAddress(addr)) { | 1784 if (Simulator::IsIllegalAddress(addr)) { |
| 1771 HandleIllegalAccess(addr, instr); | 1785 HandleIllegalAccess(addr, instr); |
| 1772 } else { | 1786 } else { |
| 1773 double value = get_fregister_double(instr->FtField()); | 1787 double value = get_fregister_double(instr->FtField()); |
| 1774 WriteD(addr, value, instr); | 1788 WriteD(addr, value, instr); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 2009 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 1996 } | 2010 } |
| 1997 buf->Longjmp(); | 2011 buf->Longjmp(); |
| 1998 } | 2012 } |
| 1999 | 2013 |
| 2000 } // namespace dart | 2014 } // namespace dart |
| 2001 | 2015 |
| 2002 #endif // !defined(HOST_ARCH_MIPS) | 2016 #endif // !defined(HOST_ARCH_MIPS) |
| 2003 | 2017 |
| 2004 #endif // defined TARGET_ARCH_MIPS | 2018 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |