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

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

Issue 1289883004: Fix simulators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/longjump.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" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 static bool CanEncodeBranchOffset(int32_t offset) { 46 static bool CanEncodeBranchOffset(int32_t offset) {
47 ASSERT(Utils::IsAligned(offset, 4)); 47 ASSERT(Utils::IsAligned(offset, 4));
48 return Utils::IsInt(18, offset); 48 return Utils::IsInt(18, offset);
49 } 49 }
50 50
51 51
52 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t instr) { 52 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t instr) {
53 if (!CanEncodeBranchOffset(offset)) { 53 if (!CanEncodeBranchOffset(offset)) {
54 ASSERT(!use_far_branches()); 54 ASSERT(!use_far_branches());
55 Isolate::Current()->long_jump_base()->Jump( 55 Thread::Current()->long_jump_base()->Jump(
56 1, Object::branch_offset_error()); 56 1, Object::branch_offset_error());
57 } 57 }
58 58
59 // Properly preserve only the bits supported in the instruction. 59 // Properly preserve only the bits supported in the instruction.
60 offset >>= 2; 60 offset >>= 2;
61 offset &= kBranchOffsetMask; 61 offset &= kBranchOffsetMask;
62 return (instr & ~kBranchOffsetMask) | offset; 62 return (instr & ~kBranchOffsetMask) | offset;
63 } 63 }
64 64
65 65
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 Label stop; 1300 Label stop;
1301 b(&stop); 1301 b(&stop);
1302 Emit(reinterpret_cast<int32_t>(message)); 1302 Emit(reinterpret_cast<int32_t>(message));
1303 Bind(&stop); 1303 Bind(&stop);
1304 break_(Instr::kStopMessageCode); 1304 break_(Instr::kStopMessageCode);
1305 } 1305 }
1306 1306
1307 } // namespace dart 1307 } // namespace dart
1308 1308
1309 #endif // defined TARGET_ARCH_MIPS 1309 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/longjump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698