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

Unified Diff: runtime/vm/simulator_mips.cc

Issue 17502002: Enables more tests for SIMMIPS. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/simulator_mips.h ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_mips.cc
===================================================================
--- runtime/vm/simulator_mips.cc (revision 24294)
+++ runtime/vm/simulator_mips.cc (working copy)
@@ -1408,8 +1408,8 @@
uint32_t lo = get_lo_register();
uint32_t hi = get_hi_register();
uint64_t accum = Utils::LowHighTo64Bits(lo, hi);
- uint64_t rs = static_cast<int64_t>(get_register(instr->RsField()));
- uint64_t rt = static_cast<int64_t>(get_register(instr->RtField()));
+ uint64_t rs = static_cast<uint64_t>(get_register(instr->RsField()));
+ uint64_t rt = static_cast<uint64_t>(get_register(instr->RtField()));
uint64_t res = accum + rs * rt;
set_hi_register(Utils::High32Bits(res));
set_lo_register(Utils::Low32Bits(res));
@@ -1662,6 +1662,22 @@
}
break;
}
+ case COP1_CVT_S: {
+ switch (instr->FormatField()) {
+ case FMT_D: {
+ double fs_dbl = get_fregister_double(instr->FsField());
+ float fs_flt = static_cast<float>(fs_dbl);
+ set_fregister_float(instr->FdField(), fs_flt);
+ break;
+ }
+ default: {
+ OS::PrintErr("DecodeCop1: 0x%x\n", instr->InstructionBits());
+ UnimplementedInstruction(instr);
+ break;
+ }
+ }
+ break;
+ }
default: {
OS::PrintErr("DecodeCop1: 0x%x\n", instr->InstructionBits());
UnimplementedInstruction(instr);
@@ -2054,15 +2070,23 @@
int32_t parameter1,
int32_t parameter2,
int32_t parameter3,
- bool fp_return) {
+ bool fp_return,
+ bool fp_args) {
// Save the SP register before the call so we can restore it.
int32_t sp_before_call = get_register(SP);
// Setup parameters.
- set_register(A0, parameter0);
- set_register(A1, parameter1);
- set_register(A2, parameter2);
- set_register(A3, parameter3);
+ if (fp_args) {
+ set_fregister(F0, parameter0);
+ set_fregister(F1, parameter1);
+ set_fregister(F2, parameter2);
+ set_fregister(F3, parameter3);
+ } else {
+ set_register(A0, parameter0);
+ set_register(A1, parameter1);
+ set_register(A2, parameter2);
+ set_register(A3, parameter3);
+ }
// Make sure the activation frames are properly aligned.
int32_t stack_pointer = sp_before_call;
« no previous file with comments | « runtime/vm/simulator_mips.h ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698