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

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

Issue 13228002: First two codegen tests passing on SIMMIPS (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/locations.h ('k') | runtime/vm/stub_code_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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 // Only build the simulator if not compiling for real MIPS hardware. 8 // Only build the simulator if not compiling for real MIPS hardware.
9 #if !defined(HOST_ARCH_MIPS) 9 #if !defined(HOST_ARCH_MIPS)
10 10
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 1023
1024 void Simulator::DecodeRegImm(Instr* instr) { 1024 void Simulator::DecodeRegImm(Instr* instr) {
1025 ASSERT(instr->OpcodeField() == REGIMM); 1025 ASSERT(instr->OpcodeField() == REGIMM);
1026 switch (instr->RegImmFnField()) { 1026 switch (instr->RegImmFnField()) {
1027 case BGEZ: { 1027 case BGEZ: {
1028 // Format(instr, "bgez 'rs, 'dest"); 1028 // Format(instr, "bgez 'rs, 'dest");
1029 int32_t rs_val = get_register(instr->RsField()); 1029 int32_t rs_val = get_register(instr->RsField());
1030 DoBranch(instr, rs_val >= 0, false); 1030 DoBranch(instr, rs_val >= 0, false);
1031 break; 1031 break;
1032 } 1032 }
1033 case BGEZAL: {
1034 int32_t rs_val = get_register(instr->RsField());
1035 // Return address is one after the delay slot.
1036 set_register(RA, pc_ + (2*Instr::kInstrSize));
1037 DoBranch(instr, rs_val >= 0, false);
1038 break;
1039 }
1033 case BGEZL: { 1040 case BGEZL: {
1034 // Format(instr, "bgezl 'rs, 'dest"); 1041 // Format(instr, "bgezl 'rs, 'dest");
1035 int32_t rs_val = get_register(instr->RsField()); 1042 int32_t rs_val = get_register(instr->RsField());
1036 DoBranch(instr, rs_val >= 0, true); 1043 DoBranch(instr, rs_val >= 0, true);
1037 break; 1044 break;
1038 } 1045 }
1039 case BLTZ: { 1046 case BLTZ: {
1040 // Format(instr, "bltz 'rs, 'dest"); 1047 // Format(instr, "bltz 'rs, 'dest");
1041 int32_t rs_val = get_register(instr->RsField()); 1048 int32_t rs_val = get_register(instr->RsField());
1042 DoBranch(instr, rs_val < 0, false); 1049 DoBranch(instr, rs_val < 0, false);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 // Restore the SP register and return R1:R0. 1402 // Restore the SP register and return R1:R0.
1396 set_register(SP, sp_before_call); 1403 set_register(SP, sp_before_call);
1397 return Utils::LowHighTo64Bits(get_register(V0), get_register(V1)); 1404 return Utils::LowHighTo64Bits(get_register(V0), get_register(V1));
1398 } 1405 }
1399 1406
1400 } // namespace dart 1407 } // namespace dart
1401 1408
1402 #endif // !defined(HOST_ARCH_MIPS) 1409 #endif // !defined(HOST_ARCH_MIPS)
1403 1410
1404 #endif // defined TARGET_ARCH_MIPS 1411 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/locations.h ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698