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

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

Issue 20369003: Implements far branch targets for MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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') | 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 <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 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 DoBranch(instr, rs_val >= 0, false); 1482 DoBranch(instr, rs_val >= 0, false);
1483 break; 1483 break;
1484 } 1484 }
1485 case BGEZAL: { 1485 case BGEZAL: {
1486 int32_t rs_val = get_register(instr->RsField()); 1486 int32_t rs_val = get_register(instr->RsField());
1487 // Return address is one after the delay slot. 1487 // Return address is one after the delay slot.
1488 set_register(RA, pc_ + (2*Instr::kInstrSize)); 1488 set_register(RA, pc_ + (2*Instr::kInstrSize));
1489 DoBranch(instr, rs_val >= 0, false); 1489 DoBranch(instr, rs_val >= 0, false);
1490 break; 1490 break;
1491 } 1491 }
1492 case BLTZAL: {
1493 int32_t rs_val = get_register(instr->RsField());
1494 // Return address is one after the delay slot.
1495 set_register(RA, pc_ + (2*Instr::kInstrSize));
1496 DoBranch(instr, rs_val < 0, false);
1497 break;
1498 }
1492 case BGEZL: { 1499 case BGEZL: {
1493 // Format(instr, "bgezl 'rs, 'dest"); 1500 // Format(instr, "bgezl 'rs, 'dest");
1494 int32_t rs_val = get_register(instr->RsField()); 1501 int32_t rs_val = get_register(instr->RsField());
1495 DoBranch(instr, rs_val >= 0, true); 1502 DoBranch(instr, rs_val >= 0, true);
1496 break; 1503 break;
1497 } 1504 }
1498 case BLTZ: { 1505 case BLTZ: {
1499 // Format(instr, "bltz 'rs, 'dest"); 1506 // Format(instr, "bltz 'rs, 'dest");
1500 int32_t rs_val = get_register(instr->RsField()); 1507 int32_t rs_val = get_register(instr->RsField());
1501 DoBranch(instr, rs_val < 0, false); 1508 DoBranch(instr, rs_val < 0, false);
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 2231 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
2225 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 2232 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
2226 buf->Longjmp(); 2233 buf->Longjmp();
2227 } 2234 }
2228 2235
2229 } // namespace dart 2236 } // namespace dart
2230 2237
2231 #endif // !defined(HOST_ARCH_MIPS) 2238 #endif // !defined(HOST_ARCH_MIPS)
2232 2239
2233 #endif // defined TARGET_ARCH_MIPS 2240 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698