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

Side by Side Diff: runtime/vm/assembler_arm.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 | « no previous file | runtime/vm/assembler_arm64.h » ('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_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 return Utils::IsInt(Utils::CountOneBits(kBranchOffsetMask), offset); 2058 return Utils::IsInt(Utils::CountOneBits(kBranchOffsetMask), offset);
2059 } 2059 }
2060 2060
2061 2061
2062 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t inst) { 2062 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t inst) {
2063 // The offset is off by 8 due to the way the ARM CPUs read PC. 2063 // The offset is off by 8 due to the way the ARM CPUs read PC.
2064 offset -= Instr::kPCReadOffset; 2064 offset -= Instr::kPCReadOffset;
2065 2065
2066 if (!CanEncodeBranchOffset(offset)) { 2066 if (!CanEncodeBranchOffset(offset)) {
2067 ASSERT(!use_far_branches()); 2067 ASSERT(!use_far_branches());
2068 Isolate::Current()->long_jump_base()->Jump( 2068 Thread::Current()->long_jump_base()->Jump(
2069 1, Object::branch_offset_error()); 2069 1, Object::branch_offset_error());
2070 } 2070 }
2071 2071
2072 // Properly preserve only the bits supported in the instruction. 2072 // Properly preserve only the bits supported in the instruction.
2073 offset >>= 2; 2073 offset >>= 2;
2074 offset &= kBranchOffsetMask; 2074 offset &= kBranchOffsetMask;
2075 return (inst & ~kBranchOffsetMask) | offset; 2075 return (inst & ~kBranchOffsetMask) | offset;
2076 } 2076 }
2077 2077
2078 2078
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
3672 3672
3673 3673
3674 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3674 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3675 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3675 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3676 return fpu_reg_names[reg]; 3676 return fpu_reg_names[reg];
3677 } 3677 }
3678 3678
3679 } // namespace dart 3679 } // namespace dart
3680 3680
3681 #endif // defined TARGET_ARCH_ARM 3681 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698